Bugzilla – Attachment 149726 Details for
Bug 33238
Error adding suggestion to basket as non-superlibrarian (Bug 29886 follow-up)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33238 (Bug 29886 follow-up) With IndependentBranches Koha explodes with Error 500 when a non superlibrarian tries to add to basket from suggestions
Bug-33238-Bug-29886-follow-up-With-IndependentBran.patch (text/plain), 1.62 KB, created by
Katrin Fischer
on 2023-04-16 11:11:00 UTC
(
hide
)
Description:
Bug 33238 (Bug 29886 follow-up) With IndependentBranches Koha explodes with Error 500 when a non superlibrarian tries to add to basket from suggestions
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-04-16 11:11:00 UTC
Size:
1.62 KB
patch
obsolete
>From 1f4caaceac6a749e3397ee4a4abcdb8c27105bf1 Mon Sep 17 00:00:00 2001 >From: Janusz Kaczmarek <januszop@gmail.com> >Date: Wed, 15 Mar 2023 20:25:53 +0100 >Subject: [PATCH] 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> >--- > Koha/Suggestions.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Suggestions.pm b/Koha/Suggestions.pm >index 9b1d266586..fe40715854 100644 >--- a/Koha/Suggestions.pm >+++ b/Koha/Suggestions.pm >@@ -56,7 +56,7 @@ sub search_limited { > # from other libraries) > my $userenv = C4::Context->userenv; > >- $resultset = $self->search({ branchcode => $userenv->{branch} }) >+ $resultset = $self->search({ 'me.branchcode' => $userenv->{branch} }) > if $userenv && $userenv->{branch}; > } > >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33238
:
148245
|
149726
|
149751