[Bug 37383] New: No Edit Item button on biblio detail page for items where holding branch is not logged in branch
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Bug ID: 37383 Summary: No Edit Item button on biblio detail page for items where holding branch is not logged in branch Change sponsored?: --- Product: Koha Version: 24.05 Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: andrewfh@dubcolib.org QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl To recreate: - have a system with 2+ branches - have a bib with 2+ items, all with holdingbranch=A - set logged in library to A - go to bib details page, confirm each item has an Edit button in the holdings table - edit one item, set holdingbranch=B - reload bib details page - confirm the item now at branch B does not have an edit button -- 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=37383 --- Comment #1 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- I meant to include the detail that we are not using library groups to limit editing of records. -- 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=37383 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=37392 --- Comment #2 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, I think that is another side effect of bug 37392. Can you try if the view_borrower_infos_from_any_libraries makes any difference? -- 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=37383 --- Comment #3 from Andrew Fuerste-Henry <andrewfh@dubcolib.org> --- (In reply to Katrin Fischer from comment #2)
Hm, I think that is another side effect of bug 37392. Can you try if the view_borrower_infos_from_any_libraries makes any difference?
I've observed this on two different superlibrarian accounts, so I hadn't really considered a permissions-based solution. Just now I created an account with (catalogue) and (editcatalogue) permissions. They did not get an edit button for an item at a different library. When I added the view_borrower_infos_from_any_libraries permission it did not make the button appear. -- 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=37383 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|24.05 |Main --- Comment #4 from Lucas Gass <lucas@bywatersolutions.com> --- confirmed in main -- 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=37383 --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Andrew Fuerste-Henry from comment #3)
(In reply to Katrin Fischer from comment #2)
Hm, I think that is another side effect of bug 37392. Can you try if the view_borrower_infos_from_any_libraries makes any difference?
I've observed this on two different superlibrarian accounts, so I hadn't really considered a permissions-based solution. Just now I created an account with (catalogue) and (editcatalogue) permissions. They did not get an edit button for an item at a different library. When I added the view_borrower_infos_from_any_libraries permission it did not make the button appear.
You also need edit_items I believe And try to add a library group with all your libraries within and remove the view_borrower_infos_from_any_libraries... But I think it's still the same bit of code that causes both bugs, even if we cannot use the same workaround. I dug into the code making the button display yesterday, and there is definitely something wrong there. For someone looking here, please also look at my notes on bug 37392. -- 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=37383 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=37383 --- Comment #6 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 169388 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169388&action=edit Bug 37383: Use libraries_where_can_edit_items to check if items are editable To test: 1 - have a system with 2+ branches 2 - have a bib with 2+ items, all with holdingbranch=A 3 - set logged in library to A 4 - go to bib details page, confirm each item has an Edit button in the holdings table 5 - edit one item, set holdingbranch=B 6 - reload bib details page 7 - confirm the item now at branch B does not have an edit button 8 - APPLY PATCH and restart_all 9 - Try 1 - 6 again, this time you should see the proper edit buttons 10 - Set up library group: * Create a library group for library A + B * Action: Limit item editing by group 11 - Set up test user: * Create a staff patron with these permissions: * catalogue * fast_cataloguing * edit_items * view_borrower_infos_from_any_libraries * edit borrowers * Home library: library A 12 - Set up test items: * Create a record with 3 items with different home libraries: * A * B * C 13 - We expect the use to be able to edit A and B, but not C. 14 - With the same user turn OFF the view_borrower_infos_from_any_libraries permission 15 - Behavior should not change, we expect the use to be able to edit A and B, but not C. 16 - Make sure StaffLocationOnDetail still works as expected for all users. -- 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=37383 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |lucas@bywatersolutions.com |ity.org | -- 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=37383 Biblibre Sandboxes <sandboxes@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169388|0 |1 is obsolete| | --- Comment #7 from Biblibre Sandboxes <sandboxes@biblibre.com> --- Created attachment 169395 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169395&action=edit Bug 37383: Use libraries_where_can_edit_items to check if items are editable To test: 1 - have a system with 2+ branches 2 - have a bib with 2+ items, all with holdingbranch=A 3 - set logged in library to A 4 - go to bib details page, confirm each item has an Edit button in the holdings table 5 - edit one item, set holdingbranch=B 6 - reload bib details page 7 - confirm the item now at branch B does not have an edit button 8 - APPLY PATCH and restart_all 9 - Try 1 - 6 again, this time you should see the proper edit buttons 10 - Set up library group: * Create a library group for library A + B * Action: Limit item editing by group 11 - Set up test user: * Create a staff patron with these permissions: * catalogue * fast_cataloguing * edit_items * view_borrower_infos_from_any_libraries * edit borrowers * Home library: library A 12 - Set up test items: * Create a record with 3 items with different home libraries: * A * B * C 13 - We expect the use to be able to edit A and B, but not C. 14 - With the same user turn OFF the view_borrower_infos_from_any_libraries permission 15 - Behavior should not change, we expect the use to be able to edit A and B, but not C. 16 - Make sure StaffLocationOnDetail still works as expected for all users. Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off CC| |michaela.sieber@kit.edu --- Comment #8 from Michaela Sieber <michaela.sieber@kit.edu> --- Thanks Lucas! The syspref StaffLocationOnDetail does not exist yet (see bug 15461) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clemens.tubach@kit.edu, | |katrin.fischer@bsz-bw.de -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 --- Comment #9 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Michaela Sieber from comment #8)
Thanks Lucas!
The syspref StaffLocationOnDetail does not exist yet (see bug 15461)
Michaela, thanks for testing. I put the wrong system preference name in the test plan. The one I meant to mention was StaffDetailItemSelection, sorry for the confusion! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 --- Comment #10 from Michaela Sieber <michaela.sieber@kit.edu> --- (In reply to Lucas Gass from comment #9)
(In reply to Michaela Sieber from comment #8)
Thanks Lucas!
The syspref StaffLocationOnDetail does not exist yet (see bug 15461)
Michaela, thanks for testing. I put the wrong system preference name in the test plan. The one I meant to mention was StaffDetailItemSelection, sorry for the confusion!
OK, then I have bad news: StaffDetailItemSelection is enabled, but with my limited user I don't see the first column with the ckeckboxes And one more thing: on the item details page ( cgi-bin/koha/catalogue/moredetail.pl?biblionumber=131 ) I can only edit the item that matches the homebranch of my limited user -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 --- Comment #11 from Lucas Gass <lucas@bywatersolutions.com> ---
OK, then I have bad news: StaffDetailItemSelection is enabled, but with my limited user I don't see the first column with the ckeckboxes
Depending on how limited your user is, I think this is expected. In catalogue/detail.pl I see that the checkbox column should be hidden when the sys pref is on if users have certain 'tools' permissions like items_batchmod and items_batchdel:
And one more thing: on the item details page ( cgi-bin/koha/catalogue/moredetail.pl?biblionumber=131 ) I can only edit the item that matches the homebranch of my limited user
IMO, this should be a separate bug report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169395|0 |1 is obsolete| | --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Created attachment 169429 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169429&action=edit Bug 37383: Use libraries_where_can_edit_items to check if items are editable To test: 1 - have a system with 2+ branches 2 - have a bib with 2+ items, all with holdingbranch=A 3 - set logged in library to A 4 - go to bib details page, confirm each item has an Edit button in the holdings table 5 - edit one item, set holdingbranch=B 6 - reload bib details page 7 - confirm the item now at branch B does not have an edit button 8 - APPLY PATCH and restart_all 9 - Try 1 - 6 again, this time you should see the proper edit buttons 10 - Set up library group: * Create a library group for library A + B * Action: Limit item editing by group 11 - Set up test user: * Create a staff patron with these permissions: * catalogue * fast_cataloguing * edit_items * view_borrower_infos_from_any_libraries * edit borrowers * Home library: library A 12 - Set up test items: * Create a record with 3 items with different home libraries: * A * B * C 13 - We expect the use to be able to edit A and B, but not C. 14 - With the same user turn OFF the view_borrower_infos_from_any_libraries permission 15 - Behavior should not change, we expect the use to be able to edit A and B, but not C. 16 - Make sure StaffDetailItemSelection still works as expected for all users. With the sys pref on the checkbox should show up for superlibrarians and users with 'tools' permissions. Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 --- Comment #13 from Lucas Gass <lucas@bywatersolutions.com> --- New patch attached with an updated test plan, keeping Michaela's sign-off line. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |37392 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37392 [Bug 37392] Edit item permission by library group is broken -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169429|0 |1 is obsolete| | --- Comment #14 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 169435 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169435&action=edit Bug 37383: Use libraries_where_can_edit_items to check if items are editable To test: 1 - have a system with 2+ branches 2 - have a bib with 2+ items, all with holdingbranch=A 3 - set logged in library to A 4 - go to bib details page, confirm each item has an Edit button in the holdings table 5 - edit one item, set holdingbranch=B 6 - reload bib details page 7 - confirm the item now at branch B does not have an edit button 8 - APPLY PATCH and restart_all 9 - Try 1 - 6 again, this time you should see the proper edit buttons 10 - Set up library group: * Create a library group for library A + B * Action: Limit item editing by group 11 - Set up test user: * Create a staff patron with these permissions: * catalogue * fast_cataloguing * edit_items * view_borrower_infos_from_any_libraries * edit borrowers * Home library: library A 12 - Set up test items: * Create a record with 3 items with different home libraries: * A * B * C 13 - We expect the use to be able to edit A and B, but not C. 14 - With the same user turn OFF the view_borrower_infos_from_any_libraries permission 15 - Behavior should not change, we expect the use to be able to edit A and B, but not C. 16 - Make sure StaffDetailItemSelection still works as expected for all users. With the sys pref on the checkbox should show up for superlibrarians and users with 'tools' permissions. Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com QA Contact|testopia@bugs.koha-communit |nick@bywatersolutions.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Katie Bliss <kebliss@dmpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kebliss@dmpl.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to main Version(s)| |24.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 --- Comment #15 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=37383 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=37383 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|No Edit Item button on |No edit item button on |biblio detail page for |catalog detail page for |items where holding branch |items where holding library |is not logged in branch |is not logged in library -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Keywords|rel_24_05_candidate | Version(s)|24.11.00 |24.11.00,24.05.04 released in| | --- Comment #16 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=37383 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Depends on| |33568 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33568 [Bug 33568] Use the REST API to display items on the staff biblio detail view -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Needs documenting --- Comment #17 from Fridolin Somers <fridolin.somers@biblibre.com> --- Depends on Bug 33568 not in 23.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #18 from Jonathan Druart <jonathan.druart@gmail.com> --- Lucas, can you explain why the original code was not working? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 --- Comment #19 from Jonathan Druart <jonathan.druart@gmail.com> --- I see, was it because we testing the holding library instead of the home library? if ( can_edit_items_from[row.holding_library_id] ){ vs if ( can_edit_items_from[row.home_library_id] ){ If so, why didn't you simply adjusted the two lines in the template? IIRC it seemed weird to pass an empty array if items from all libraries were editable. Not blocking or requesting a follow-up, just asking ;) -- You are receiving this mail because: You are watching all bug changes.
I see, was it because we testing the holding library instead of the home library?
if ( can_edit_items_from[row.holding_library_id] ){
vs
if ( can_edit_items_from[row.home_library_id] ){ Yes, the @libraries array was only returning home libraries, not holding. So
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 --- Comment #20 from Lucas Gass <lucas@bywatersolutions.com> --- (In reply to Jonathan Druart from comment #19) that's why there was missing edit button for things that a librarian should have been able to edit.
If so, why didn't you simply adjusted the two lines in the template? Sorry for my ignorance, which 2 lines?
IIRC it seemed weird to pass an empty array if items from all libraries were editable. Agreed, the empty array is weird but it's the solution I found.
You should also look at Nick's Bug 37392. I am also happy to do additional work, or follow-up, if you think we could improve what we currently have. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 --- Comment #21 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Lucas Gass from comment #20)
(In reply to Jonathan Druart from comment #19)
If so, why didn't you simply adjusted the two lines in the template? Sorry for my ignorance, which 2 lines?
I would have expected your patch to simply adjust holding_library_id: if ( can_edit_items_from[row.holding_library_id] ){ with if ( can_edit_items_from[row.home_library_id] ){ koha-tmpl/intranet-tmpl/prog/en/includes/html_helpers/tables/items/catalogue_detail.inc lines 296 and 747 in current main. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emmi.takkinen@koha-suomi.fi --- Comment #22 from Aleisha Amohia <aleisha@catalyst.net.nz> --- *** Bug 37300 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Miranda Nero <mnero@oslri.net> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mnero@oslri.net -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |caroline.cyr-la-rose@inlibr | |o.com Status|Needs documenting |RESOLVED Resolution|--- |FIXED --- Comment #23 from Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> --- It is my understanding that this fixes a bug/regression. So there is nothing to change in the manual. Please reopen with details if a change to the manual is needed. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37383 Bug 37383 depends on bug 33568, which changed state. Bug 33568 Summary: Use the REST API to display items on the staff biblio detail view https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=33568 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org