Bug 37879 - Whitespaces mess with report results
Summary: Whitespaces mess with report results
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 23.05
Hardware: All All
: P5 - low new feature
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-09-10 09:56 UTC by Afroditi Fragkou
Modified: 2024-09-10 09:59 UTC (History)
1 user (show)

See Also:
GIT URL:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Afroditi Fragkou 2024-09-10 09:56:12 UTC
When a whitespace character (such as a space, tab, or line break) is accidentally added at the end of a subfield, it can cause issues in SQL reports. Specifically, it shifts all subsequent fields to the next columns, which disrupts the results.

For example, if I select authid, 670$a, and 670$b from the auth_header table, and a space or tab has been added at the end of the 670$a subfield data in, say, the 3rd authority record, the resulting CSV will have an empty 670$b column. The data from 670$b will appear in the 1st column of the 4th line, the authid of the 4th record will be in the 670$a column, and so on.

Therefore, would it be possible to add a tool or something that prevents catalogers from adding or pasting text that starts or ends with a whitespace character?
Comment 1 Afroditi Fragkou 2024-09-10 09:59:13 UTC
Also if double spaces in between could be omitted would be great too :D