Summary: | Updating suggestion status can result in 500 error | ||
---|---|---|---|
Product: | Koha | Reporter: | Kyle M Hall (khall) <kyle> |
Component: | Acquisitions | Assignee: | Lucas Gass (lukeg) <lucas> |
Status: | RESOLVED FIXED | QA Contact: | Testopia <testopia> |
Severity: | major | ||
Priority: | P5 - low | CC: | csq, lucas, martin.renvoize, mchen, pm |
Version: | Main | Keywords: | rel_22_11_candidate, rel_23_05_candidate |
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34601 | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
23.11.00,23.05.02,22.11.08
|
|
Circulation function: | |||
Bug Depends on: | 33322 | ||
Bug Blocks: | |||
Attachments: |
Bug 34080 - Updating suggestion status can result in 500 error
Bug 34080: Make suggestions_batch_ops a class Bug 34080: Make suggestions_batch_ops a class Bug 34080: Make suggestions_batch_ops a class |
Description
Kyle M Hall (khall)
2023-06-21 14:49:57 UTC
Created attachment 152524 [details] [review] Bug 34080 - Updating suggestion status can result in 500 error Sometimes using "Mark selection as" to update a suggestions can result in a 500 error with the logged error: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'suggestion_itemtype' in 'where clause' at /usr/share/koha/lib/Koha/Objects.pm line 394 It appears that the search params are built from *all* the form fields and then some form fields are removed from the hashref, but not all ( hence the error ). This patch stops the 500 error from occurring. However, with it applied I am unable to switch the status of suggestions. To recreate: 1. Make some suggestions with different statuses. 2. Try moving some suggestion to different statuses. 3. Going from PENDING to another status works fine. 4. Moving from other status (REJECTED, ORDERED, etc ) will cause a 500 error. The suggestions_batch_ops div is repeated and therefore should be a class not and an ID. Created attachment 152643 [details] [review] Bug 34080: Make suggestions_batch_ops a class To test: 1. Make some suggestions with different statuses. 2. Try moving some suggestion to different statuses. 3. Going from PENDING to another status works fine. 4. Moving from other status (REJECTED, ORDERED, etc ) will cause a 500 error. 5. Apply patch 6. Try 2 - 4 again, no more 500 errors, yay! Marked as major because this effects libraries ability to manage purchase suggestions. Created attachment 152644 [details] [review] Bug 34080: Make suggestions_batch_ops a class To test: 1. Make some suggestions with different statuses. 2. Try moving some suggestion to different statuses. 3. Going from PENDING to another status works fine. 4. Moving from other status (REJECTED, ORDERED, etc ) will cause a 500 error. 5. Apply patch 6. Try 2 - 4 again, no more 500 errors, yay! Signed-off-by: Sam Lau <samalau@gmail.com> Created attachment 152645 [details] [review] Bug 34080: Make suggestions_batch_ops a class To test: 1. Make some suggestions with different statuses. 2. Try moving some suggestion to different statuses. 3. Going from PENDING to another status works fine. 4. Moving from other status (REJECTED, ORDERED, etc ) will cause a 500 error. 5. Apply patch 6. Try 2 - 4 again, no more 500 errors, yay! Signed-off-by: Sam Lau <samalau@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Trivial fix works as expected.. Passing QA Pushed to master for 23.11. Nice work everyone, thanks! Is this bug going to be backported to 22.11? Thanks for all the hard work! Pushed to 23.05.x for the next release Nice work everyone! Pushed to 22.11.x for next release |