With IndependentBranches Koha explodes with Error 500 when a non superlibrarian tries to add to basket from suggestions. In errorlog you would find "DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'branchcode' in where clause is ambiguous". This is apparently due to missing 'me.' in Koha::Suggestions::search_limited.
Created attachment 148245 [details] [review] Bug 33238 (Bug 29886 follow-up) With IndependentBranches Koha explodes with Error 500 when a non superlibrarian tries to add to basket from suggestions With IndependentBranches Koha explodes with Error 500 when a non superlibrarian tries to add to basket from suggestions. In errorlog you would find "DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'branchcode' in where clause is ambiguous". Test plan: ========== 1. Have a Koha instance with IndependentBranches, some accepted suggestions, and a vendor defined. 2. Be a non superlibrarian librarian with permissions to manage acquisitions. 3. Create a new basket and try to add an item to the basket "From a suggestion". 4. Koha would generate error 500. 5. Apply the patch. 6. Try to add an item to the basket "From a suggestion". 7. You should succeed.
Created attachment 149726 [details] [review] Bug 33238 (Bug 29886 follow-up) With IndependentBranches Koha explodes with Error 500 when a non superlibrarian tries to add to basket from suggestions With IndependentBranches Koha explodes with Error 500 when a non superlibrarian tries to add to basket from suggestions. In errorlog you would find "DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'branchcode' in where clause is ambiguous". Test plan: ========== 1. Have a Koha instance with IndependentBranches, some accepted suggestions, and a vendor defined. 2. Be a non superlibrarian librarian with permissions to manage acquisitions. 3. Create a new basket and try to add an item to the basket "From a suggestion". 4. Koha would generate error 500. 5. Apply the patch. 6. Try to add an item to the basket "From a suggestion". 7. You should succeed. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Using QAM privilege to put this straight to PQA.
QA script is not happy with this one.
Created attachment 149751 [details] [review] Bug 33238: Fix bad suggestions query (Bug 29886 follow-up) With IndependentBranches Koha explodes with Error 500 when a non superlibrarian tries to add to basket from suggestions. In errorlog you would find "DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'branchcode' in where clause is ambiguous". Test plan: ========== 1. Have a Koha instance with IndependentBranches, some accepted suggestions, and a vendor defined. 2. Be a non superlibrarian librarian with permissions to manage acquisitions. 3. Create a new basket and try to add an item to the basket "From a suggestion". 4. Koha would generate error 500. 5. Apply the patch. 6. Try to add an item to the basket "From a suggestion". 7. You should succeed. Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Pushed to master for 23.05. Nice work everyone, thanks!
oh, what was it?
Nice work everyone! Pushed to stable for 22.11.x
Backported to 22.05.x for upcoming 22.05.13
applied to 21.11 for 21.11.21