[Bug 34147] New: Patron Search Displays "Processing" when Category Has Library Limitations that Exclude the Logged In Branch Name
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Bug ID: 34147 Summary: Patron Search Displays "Processing" when Category Has Library Limitations that Exclude the Logged In Branch Name Change sponsored?: --- Product: Koha Version: 22.05 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: jyorio@equinoxinitiative.org QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com I'll start by saying that I don't know if this relates to https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24132 or not. To replicate, you'll need more than one library in Administration | Libraries. Setup a patron category with a Library Limitation, so that one library is excluded (by not selecting it). Create a patron with a common surname in your borrowers table and assign to that category. While the logged in branch is set to one of the libraries that are not excluded for that category you created above, search for patrons with the surname of your test patron. You should get results as expected. Change the logged in branch name to the excluded library. Conduct the same search. A processing message appears and just spins. I'm not sure whether the desired result should be to exclude the patron in question from the search results or whether it should display but with some restriction on the Patron Category. -- 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=34147 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart+koha@gmail. | |com --- Comment #1 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Still valid in master? I don't recreate. If you do can you provide what you have in the console and eventually the Koha log if you got a 500? -- 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=34147 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=34145 --- Comment #2 from Jonathan Druart <jonathan.druart+koha@gmail.com> --- Is this a duplicate of bug 34145? -- 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=34147 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com, | |pedro.amorim@ptfs-europe.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Jason Robb <jrobb@sekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jrobb@sekls.org Version|22.05 |Main --- Comment #3 from Jason Robb <jrobb@sekls.org> --- I was able to replicate this in a sandbox with these steps: 1. Make sure you are logged in as Centerville 2. Do a patron search for 'Ac' -- there are two patrons: Henry (Staff) and Edna (Patron) 2. Go to Administration > Patron Categories 3. Edit the Patron (PT) category, set the Library limitations to Fairfield only 4. Do the patron search for 'Ac' again - it hangs up with a Processing box This happens when logged in with the superlibrarian account, and when logged in with an account with view_borrower_infos_from_any_library enabled. The console shows this error: Uncaught TypeError: Cannot read properties of undefined (reading 'description') at render (member.pl?quicksearch=1&searchmember=Ac&searchfieldstype=standard&branchcode_filter=&categorycode_filter=:3141:90) at datatables.min_24.0600014.js:41:12136 at e.fnGetData (datatables.min_24.0600014.js:41:15516) at S (datatables.min_24.0600014.js:41:18049) at St (datatables.min_24.0600014.js:41:20531) at y (datatables.min_24.0600014.js:41:22994) at It (datatables.min_24.0600014.js:41:28350) at datatables.min_24.0600014.js:41:26897 at Object.e [as success] (datatables.min_24.0600014.js:41:25877) at c (jquery-3.6.0.min_24.0600014.js:2:28327) -- 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=34147 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- *** Bug 37379 has been marked as a duplicate of this bug. *** -- 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=34147 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patron Search Displays |Patron search displays |"Processing" when Category |"processing" when category |Has Library Limitations |has library limitations |that Exclude the Logged In |that exclude the logged in |Branch Name |library name -- 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=34147 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=34147 --- Comment #5 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 169073 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169073&action=edit Bug 34147: Prevent crashing of patron search This is just working around the problem, I think. It fixes the crashing issue but the limited patron's category is no longer listed on the table. I dont fully understand the 'library limitation' functionality, what is the expected functionality here when following the test plan? Is 'Acosta, Edna' expected to not show up? Since its PT category? -- 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=34147 --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> ---
Is 'Acosta, Edna' expected to not show up? Since its PT category?
I think yes. If there is a library limitation and your are logged into library not included in that limitation you should see no search results for the given patron category. -- 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=34147 Jason Robb <jrobb@sekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #7 from Jason Robb <jrobb@sekls.org> --- Historically patron category library limitations only restrict the creation of patrons to libraries for which the limits are set and do not affect patron search results. In the example, I definitely do still want to see Edna show up. As a consortium with a shared patron database that limits different categories for different branches, we need to be able to see all possible patrons when searching to avoid duplicates, and so patrons from one library can be found when they walk into another library. The patch seems to work well other than what Pedro mentioned. When following the steps to replicate, the table cell in the "Category" column for Edna Acosta is blank where it should say "Patron". -- 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=34147 AspenCat Team <aspencatteam@clicweb.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aspencatteam@clicweb.org --- Comment #8 from AspenCat Team <aspencatteam@clicweb.org> --- Our consortia does not share a patron database. We use the patron category branch limitation to force libraries to only select patron categories that they use regularly. This isn't the tool we use to prevent one branch from seeing another branches patrons. For that we use a permission called "view_borrower_infos_from_any_libraries" and when that is not selected it, it prevents one branch from seeing another branches patrons, even if the share a patron category. This being set is also causing a similar failing in searching as described in bug 37378 - Bob Bennhoff -- 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=34147 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Bug 37368 has a note that makes me think it might be related - even a fix maybe? This patch adds the missing library embed from the patron search forms. This embed is required for the case where a patron is missing both first and last name or is from a different library group and thus falls into the 'Patron from library X' block. -- 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=34147 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- 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=34147 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169073|0 |1 is obsolete| | --- Comment #10 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 169417 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169417&action=edit Bug 34147: Load all categories for displaying patron results Currently we are only loading unlimited categories into the patron search, so when we return patrons from a category limited to another library we crash because we don't have the descriptions loaded. This patch removes the limit from 'categories_map' which is only used for displaying patrons. As patron visibility is a feature of permissions and groups, I don't think we should enforce if based on category limitations. NOTE: the categories for searching are still limited in the left hand filters - but not in the dropdown if you click the options button in the top search form. This is beyond the scope of this bug. To test: 1. Make sure you are logged in as Centerville 2. Do a patron search for 'Ac' -- there are two patrons: Henry (Staff) and Edna (Patron) 2. Go to Administration > Patron Categories 3. Edit the Patron (PT) category, set the Library limitations to Fairfield only 4. Do the patron search for 'Ac' again - it hangs up with a Processing box 5. Apply patch 6. Reload the page (clear cache) and confirm the results now load -- 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=34147 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | CC| |nick@bywatersolutions.com Severity|normal |major --- Comment #11 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- (In reply to Katrin Fischer from comment #9)
Bug 37368 has a note that makes me think it might be related - even a fix maybe?
This patch adds the missing library embed from the patron search forms. This embed is required for the case where a patron is missing both first and last name or is from a different library group and thus falls into the 'Patron from library X' block.
Unfortunately no, this bug is related to the fact that we are not returning the descriptions of limited categories, but returning those patrons. I think allowing all categories to be viewed is correct. As Jason points out, the limits are to restrict the categories used when adding patrons, not to enforce visibility of patrons -- 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=34147 ByWater Sandboxes <bws.sandboxes@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169417|0 |1 is obsolete| | --- Comment #12 from ByWater Sandboxes <bws.sandboxes@gmail.com> --- Created attachment 169421 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169421&action=edit Bug 34147: Load all categories for displaying patron results Currently we are only loading unlimited categories into the patron search, so when we return patrons from a category limited to another library we crash because we don't have the descriptions loaded. This patch removes the limit from 'categories_map' which is only used for displaying patrons. As patron visibility is a feature of permissions and groups, I don't think we should enforce if based on category limitations. NOTE: the categories for searching are still limited in the left hand filters - but not in the dropdown if you click the options button in the top search form. This is beyond the scope of this bug. To test: 1. Make sure you are logged in as Centerville 2. Do a patron search for 'Ac' -- there are two patrons: Henry (Staff) and Edna (Patron) 2. Go to Administration > Patron Categories 3. Edit the Patron (PT) category, set the Library limitations to Fairfield only 4. Do the patron search for 'Ac' again - it hangs up with a Processing box 5. Apply patch 6. Reload the page (clear cache) and confirm the results now load Signed-off-by: Jason Robb <jrobb@sekls.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Jason Robb <jrobb@sekls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Keywords| |rel_24_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |RM_priority -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169421|0 |1 is obsolete| | --- Comment #13 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- Created attachment 169559 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169559&action=edit Bug 34147: Load all categories for displaying patron results Currently we are only loading unlimited categories into the patron search, so when we return patrons from a category limited to another library we crash because we don't have the descriptions loaded. This patch removes the limit from 'categories_map' which is only used for displaying patrons. As patron visibility is a feature of permissions and groups, I don't think we should enforce if based on category limitations. NOTE: the categories for searching are still limited in the left hand filters - but not in the dropdown if you click the options button in the top search form. This is beyond the scope of this bug. To test: 1. Make sure you are logged in as Centerville 2. Do a patron search for 'Ac' -- there are two patrons: Henry (Staff) and Edna (Patron) 2. Go to Administration > Patron Categories 3. Edit the Patron (PT) category, set the Library limitations to Fairfield only 4. Do the patron search for 'Ac' again - it hangs up with a Processing box 5. Apply patch 6. Reload the page (clear cache) and confirm the results now load Signed-off-by: Jason Robb <jrobb@sekls.org> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA CC| |emily.lamancusa@montgomeryc | |ountymd.gov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |emily.lamancusa@montgomeryc |y.org |ountymd.gov -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|24.11.00 |24.11.00,24.05.04 released in| | --- Comment #15 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24,05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 --- Comment #16 from Jonathan Druart <jonathan.druart@gmail.com> --- Please provide tests when you are modifying the patrons search code. We have a selenium tests for that (t/db_dependent/selenium/patrons_search.t). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|rel_24_05_candidate |additional_work_needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |38444 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38444 [Bug 38444] Bug 34147 follow-up: add tests -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed, | |RM_priority | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 --- Comment #17 from Jonathan Druart <jonathan.druart@gmail.com> ---
As patron visibility is a feature of permissions and groups, I don't think we should enforce if based on category limitations.
NOTE: the categories for searching are still limited in the left hand filters - but not in the dropdown if you click the options button in the top search form. This is beyond the scope of this bug.
Then what? We need to follow-up here. Is there a consensus on the desired behaviour? IIRC the original goal of this "library limitation" at category level was to completely restrict the access. Since we now have the library groups, does it mean we should get rid of it? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Jonathan Druart from comment #17)
As patron visibility is a feature of permissions and groups, I don't think we should enforce if based on category limitations.
NOTE: the categories for searching are still limited in the left hand filters - but not in the dropdown if you click the options button in the top search form. This is beyond the scope of this bug.
Then what? We need to follow-up here.
Is there a consensus on the desired behaviour? IIRC the original goal of this "library limitation" at category level was to completely restrict the access. Since we now have the library groups, does it mean we should get rid of it?
I am not sure if the assumption is correct about the original goal. I think it's more: you cannot "use" the category as a restricted library. This means you cannot add patrons with this category for your library. The whole purpose of the feature is not always clear in all areas. But we already had the issue where libraries can see and edit patrons of other libraries and had to work around that to avoid unintentional data loss on editing these patrons. So for the "Add" buttons we should definitely enforce library limitations. For the pull down in search I think it's also helpful, but more for usability - the library restrictions can be used to "shorten" the pull downs to what you actually use. But if a datatable has patrons I can see with library categories I can't use, I think having them in the filter would not hurt? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34147 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #19 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org