Bug 30251 - With IndependentBranches non-superlibrarians do not get autocomplete list in circulation module
Summary: With IndependentBranches non-superlibrarians do not get autocomplete list in ...
Status: Pushed to stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Circulation (show other bugs)
Version: master
Hardware: All All
: P3 major (vote)
Assignee: Janusz Kaczmarek
QA Contact: Testopia
URL:
Keywords: rel_21_11_candidate
Depends on: 10902
Blocks:
  Show dependency treegraph
 
Reported: 2022-03-08 21:52 UTC by Janusz Kaczmarek
Modified: 2022-04-01 10:37 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.05.00,21.11.05


Attachments
Bug 30251: (bug 10902 follow-up) With IndependentBranches non-superlibrarians do not get autocomplete list in circulation module (1.72 KB, patch)
2022-03-08 21:57 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 30251: (bug 10902 follow-up) With IndependentBranches non-superlibrarians do not get autocomplete list in circulation module (1.75 KB, patch)
2022-03-08 22:30 UTC, Janusz Kaczmarek
Details | Diff | Splinter Review
Bug 30251: (bug 10902 follow-up) With IndependentBranches non-superlibrarians do not get autocomplete list in circulation module (1.83 KB, patch)
2022-03-09 08:43 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 30251: (bug 10902 follow-up) With IndependentBranches non-superlibrarians do not get autocomplete list in circulation module (1.89 KB, patch)
2022-03-24 16:50 UTC, Martin Renvoize
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Janusz Kaczmarek 2022-03-08 21:52:05 UTC
Having IndependentBranches on, a librarian who is not superlibrarian
does not get a autocomplete hint list when entering a part of the
patron's name (while performing check out, etc.)  Koha registers
an error:

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Column 'branchcode' in where clause is ambiguous at
.../Koha/Objects.pm line 312

This is due to fix to the bug 10902 -- addig "prefetch => 'branchcode'" to
the attributes of the query in circ/ysearch.pl, while having branchcode
in the search parameters.
Comment 1 Janusz Kaczmarek 2022-03-08 21:57:48 UTC
Created attachment 131503 [details] [review]
Bug 30251: (bug 10902 follow-up) With IndependentBranches non-superlibrarians do not get autocomplete list in circulation module

Having IndependentBranches on, a librarian who is not superlibrarian
does not get a autocomplete hint list when entering a part of the
patron's name (while performing check out, etc.)  Koha registers
an error:

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Column 'branchcode' in where clause is ambiguous at
.../Koha/Objects.pm line 312

This is due to fix to the bug 10902 -- addig "prefetch => 'branchcode'" to
the attributes of the query in circ/ysearch.pl, while having branchcode
in the search parameters.

Test plan:
----------

1. Have  IndependentBranches on.  Be a librarian without superlibrarian
   privileges.  Have some patrons defined.
2. In the main input field on the top, with Check out active, try to
   put 3+ characters from the known user name/cardnumber etc. You
   will get no hint.
3. Apply the patch.
4. Repeat 2.  You should now see an autocomplete hint list.
Comment 2 Janusz Kaczmarek 2022-03-08 22:30:22 UTC
Created attachment 131504 [details] [review]
Bug 30251: (bug 10902 follow-up) With IndependentBranches non-superlibrarians do not get autocomplete list in circulation module

Having IndependentBranches on, a librarian who is not superlibrarian
does not get a autocomplete hint list when entering a part of the
patron's name (while performing check out, etc.)  Koha registers
an error:

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Column 'branchcode' in where clause is ambiguous at
.../Koha/Objects.pm line 312

This is due to fix to the bug 10902 -- addig "prefetch => 'branchcode'" to
the attributes of the query in circ/ysearch.pl, while having branchcode
in the search parameters.

Test plan:
----------

1. Have IndependentBranches on, PatronAutoComplete set to 'Try.  
   Be a librarian without superlibrarian privileges.  Have some 
   patrons defined.
2. In the main input field on the top, with Check out active, try to
   put 3+ characters from the known user name/cardnumber etc. You
   will get no hint.
3. Apply the patch.
4. Repeat 2.  You should now see an autocomplete hint list.
Comment 3 Jonathan Druart 2022-03-09 08:43:03 UTC
Created attachment 131509 [details] [review]
Bug 30251: (bug 10902 follow-up) With IndependentBranches non-superlibrarians do not get autocomplete list in circulation module

Having IndependentBranches on, a librarian who is not superlibrarian
does not get a autocomplete hint list when entering a part of the
patron's name (while performing check out, etc.)  Koha registers
an error:

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Column 'branchcode' in where clause is ambiguous at
.../Koha/Objects.pm line 312

This is due to fix to the bug 10902 -- addig "prefetch => 'branchcode'" to
the attributes of the query in circ/ysearch.pl, while having branchcode
in the search parameters.

Test plan:
----------

1. Have IndependentBranches on, PatronAutoComplete set to 'Try.
   Be a librarian without superlibrarian privileges.  Have some
   patrons defined.
2. In the main input field on the top, with Check out active, try to
   put 3+ characters from the known user name/cardnumber etc. You
   will get no hint.
3. Apply the patch.
4. Repeat 2.  You should now see an autocomplete hint list.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Martin Renvoize 2022-03-24 16:50:49 UTC
Created attachment 132184 [details] [review]
Bug 30251: (bug 10902 follow-up) With IndependentBranches non-superlibrarians do not get autocomplete list in circulation module

Having IndependentBranches on, a librarian who is not superlibrarian
does not get a autocomplete hint list when entering a part of the
patron's name (while performing check out, etc.)  Koha registers
an error:

DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st
execute failed: Column 'branchcode' in where clause is ambiguous at
.../Koha/Objects.pm line 312

This is due to fix to the bug 10902 -- addig "prefetch => 'branchcode'" to
the attributes of the query in circ/ysearch.pl, while having branchcode
in the search parameters.

Test plan:
----------

1. Have IndependentBranches on, PatronAutoComplete set to 'Try.
   Be a librarian without superlibrarian privileges.  Have some
   patrons defined.
2. In the main input field on the top, with Check out active, try to
   put 3+ characters from the known user name/cardnumber etc. You
   will get no hint.
3. Apply the patch.
4. Repeat 2.  You should now see an autocomplete hint list.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2022-03-24 16:51:13 UTC
Works as expected, no regressions found.

PQA
Comment 6 Fridolin Somers 2022-03-25 21:02:15 UTC
Pushed to master for 22.05, thanks to everybody involved 🦄
Comment 7 Kyle M Hall 2022-04-01 10:37:00 UTC
Pushed to 21.11.x for 21.11.05