[Bug 42699] New: Editing an already received serial with a duplicate barcode leads to Error 500
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42699 Bug ID: 42699 Summary: Editing an already received serial with a duplicate barcode leads to Error 500 Initiative type: --- Sponsorship --- status: Product: Koha Version: 25.05 Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Serials Assignee: koha-bugs@lists.koha-community.org Reporter: lauri.hanninen@lahti.fi QA Contact: testopia@bugs.koha-community.org When you edit an already received serial from Serial collection page using Edit serials and edit items buttons, and try to save a barcode that already exists on another item, saving leads to Error 500. Apparently there's no validation on the serial module's edit page which causes that problem. Steps to Reproduce: -Go to serials module -Search for a serial that is not expired to edit and click on the title -Go to Serial collection from the menu -Use the checkboxes to mark an already received (eg. usually older, arrived, not expected) serial and click Edit serials -Click on Edit item -Replace the barcode with a unique barcode that is already in use and hit save -> Error 500 Actual Results: Saving changes returns Error 500. Expected Results: Validation returns a duplicate barcode value/already in use error and doesn't try to save before a valid and unique barcode is given. -- 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=42699 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |emmi.takkinen@koha-suomi.fi |ity.org | Status|NEW |Needs Signoff CC| |emmi.takkinen@koha-suomi.fi --- Comment #1 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 200003 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200003&action=edit Bug 42699: Display Koha error message when attempting to save non-unique barcode in Edit serials When you edit an already received serial from Serial collection page using Edit serials and edit items buttons, and try to save a barcode that already exists on another item, saving leads to Error 500. There is no barcode validation for editing serials, this patch adds it. To test: 1. Go to serials module. 2. Search for a serial that is not expired to edit and click on the title. 3. Go to Serial collection from the menu. 4. Use the checkboxes to mark an already received (eg. usually older, arrived, not expected) serial and click Edit serials. 5. Click on Edit item. 6. Replace the barcode with a unique barcode that is already in use and hit save. => Error 500 is raised. 7. Apply this patch and restart services. 8. Attempt to save serial with already used barcode again. => A standard Koha error message is displayed stating that barcode must be unique. Sponsored-by: Koha-Suomi Oy -- 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=42699 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Sponsorship status|--- |Sponsored Status|Needs Signoff |Signed Off Comma delimited| |Koha-Suomi Oy list of Sponsors| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42699 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200003|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42699 --- Comment #2 from David Nind <david@davidnind.com> --- Created attachment 200037 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200037&action=edit Bug 42699: Display Koha error message when attempting to save non-unique barcode in Edit serials When you edit an already received serial from Serial collection page using Edit serials and edit items buttons, and try to save a barcode that already exists on another item, saving leads to Error 500. There is no barcode validation for editing serials, this patch adds it. To test: 1. Go to serials module. 2. Search for a serial that is not expired to edit and click on the title. 3. Go to Serial collection from the menu. 4. Use the checkboxes to mark an already received (eg. usually older, arrived, not expected) serial and click Edit serials. 5. Click on Edit item. 6. Replace the barcode with a unique barcode that is already in use and hit save. => Error 500 is raised. 7. Apply this patch and restart services. 8. Attempt to save serial with already used barcode again. => A standard Koha error message is displayed stating that barcode must be unique. Sponsored-by: Koha-Suomi Oy Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42699 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- Note: There is a spelling mistake in the code comments (nnot): if found itemnumber is nnot same as modified items itemnumber assume that barcode was changed Testing notes (using KTD): 1. Add a serial, when creating select "Create an item record " for "When receiving this serial". 2. Go to receive the first issue, and select "Add item" under the issue number. 3. For the barcode add 39999000019194 (for some reason it is not auto-populating the next barcode for me). 4. Then, from the test plan, you can edit this item: - Serial collection - Select the "Arrived" issue that you have created an item for - Click the "Edit" button - Click the "Edit item" button for the issue 5. When editing the item, change the barcode to 39999000019193 to generate the error. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42699 Emmi Takkinen <emmi.takkinen@koha-suomi.fi> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200037|0 |1 is obsolete| | --- Comment #4 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Created attachment 200178 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200178&action=edit Bug 42699: Display Koha error message when attempting to save non-unique barcode in Edit serials When you edit an already received serial from Serial collection page using Edit serials and edit items buttons, and try to save a barcode that already exists on another item, saving leads to Error 500. There is no barcode validation for editing serials, this patch adds it. To test: 1. Go to serials module. 2. Search for a serial that is not expired to edit and click on the title. 3. Go to Serial collection from the menu. 4. Use the checkboxes to mark an already received (eg. usually older, arrived, not expected) serial and click Edit serials. 5. Click on Edit item. 6. Replace the barcode with a unique barcode that is already in use and hit save. => Error 500 is raised. 7. Apply this patch and restart services. 8. Attempt to save serial with already used barcode again. => A standard Koha error message is displayed stating that barcode must be unique. Sponsored-by: Koha-Suomi Oy Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42699 --- Comment #5 from Emmi Takkinen <emmi.takkinen@koha-suomi.fi> --- Typo "nnot" fixed. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org