[Bug 40128] New: StripWhitespaceChars can create empty subfields
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Bug ID: 40128 Summary: StripWhitespaceChars can create empty subfields Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl When StripWhitespaceChars is enabled and the user by chance enters some white spaces in the input field, Koha generates empty subfield (or even entirely empty field). To reproduce: 1. Enable StripWhitespaceChars system preference. 2. Edit an existing record, putting just some spaces into an empty subfield. Save the record. 3. Go to bibliographic record Normal view and in modal "MARC preview" notice that the subfield you entered spaces in exists as an empty subfield. If it was the only subfield in a field, the field exists with no data at all. This is wrong. Koha::Filter::MARC::TrimFields::filter should be corrected to avoid this. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 183259 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183259&action=edit Bug 40128: StripWhitespaceChars can create empty subfields When StripWhitespaceChars is enabled and the user by chance enters some white spaces in the input field, Koha generates empty subfield (or even entirely empty field). Test plan: ========== 1. Enable StripWhitespaceChars system preference. 2. Edit an existing record, putting just some spaces into an empty subfield. Save the record. 3. Go to bibliographic record Normal view and in modal "MARC preview" notice that the subfield you entered spaces in exists as an empty subfield. If it was the only subfield in a field, the field exists with no data at all. This is wrong. 4. Apply the patch ; restart_all. 5. Repeat 2. and 3. You should not see any empty subfield now. If the empty subbfield was the only subfield in a field, the field should have been removed from the record. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 --- Comment #2 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 183260 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183260&action=edit Bug 40128: Unit tests -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |januszop@gmail.com |ity.org | CC| |tomascohen@gmail.com -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183259|0 |1 is obsolete| | --- Comment #3 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 183261 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183261&action=edit Bug 40128: StripWhitespaceChars can create empty subfields When StripWhitespaceChars is enabled and the user by chance enters some white spaces in the input field, Koha generates empty subfield (or even entirely empty field). Test plan: ========== 1. Enable StripWhitespaceChars system preference. 2. Edit an existing record, putting just some spaces into an empty subfield. Save the record. 3. Go to bibliographic record Normal view and in modal "MARC preview" notice that the subfield you entered spaces in exists as an empty subfield. If it was the only subfield in a field, the field exists with no data at all. This is wrong. 4. Apply the patch ; restart_all. 5. Repeat 2. and 3. You should not see any empty subfield now. If the empty subbfield was the only subfield in a field, the field should have been removed from the record. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183260|0 |1 is obsolete| | --- Comment #4 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 183262 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183262&action=edit Bug 40128: Unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |roman.dolny@jezuici.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183261|0 |1 is obsolete| | --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 183895 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183895&action=edit Bug 40128: StripWhitespaceChars can create empty subfields When StripWhitespaceChars is enabled and the user by chance enters some white spaces in the input field, Koha generates empty subfield (or even entirely empty field). Test plan: ========== 1. Enable StripWhitespaceChars system preference. 2. Edit an existing record, putting just some spaces into an empty subfield. Save the record. 3. Go to bibliographic record Normal view and in modal "MARC preview" notice that the subfield you entered spaces in exists as an empty subfield. If it was the only subfield in a field, the field exists with no data at all. This is wrong. 4. Apply the patch ; restart_all. 5. Repeat 2. and 3. You should not see any empty subfield now. If the empty subbfield was the only subfield in a field, the field should have been removed from the record. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #183262|0 |1 is obsolete| | --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 183896 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=183896&action=edit Bug 40128: Unit tests Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.11.00 |25.11.00,25.05.02 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 --- Comment #8 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable CC| |fridolin.somers@biblibre.co | |m Version(s)|25.11.00,25.05.02 |25.11.00,25.05.02,24.11.08 released in| | --- Comment #9 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.08 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40128 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting --- Comment #10 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x as it wasn't backported to 24.05.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org