[Bug 40668] New: Library groups and seperateholdings with itemgroups prevents adding items to itemgroup
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40668 Bug ID: 40668 Summary: Library groups and seperateholdings with itemgroups prevents adding items to itemgroup Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Staff interface Assignee: koha-bugs@lists.koha-community.org Reporter: lisette@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com To recreate: 1. On a single record, create at least 20 items at Centerville, 10 at Fairfield, 10 at Fairview 2. create a library group that has Fairfield and Fairview and check Limit item editing to items owned inside of this group. 3. Enable EnableItemGroups & SeparateHoldings 4. Set a patron (I used Henry) to have a password you know and the following permissions: -Staff access (catalogue) -Edit Catalog -Edit Items -Create, update and delete item groups, add or remove items from an item group 5. Set their library to Fairfield 6. Create an item group on your record. 7. In another browser/guest window, log in as your patron from step 4. 8. Navigate to your record. 9. Navigate to the "Other holdings" page, there should be no checkboxes. 10. Use the filters or the table search to filter to Fairview, there should now be checkboxes. 11. If you click a checkbox, you are not shown the section: Actions: Add/move to item group Remove from item group The check only happens when the table loads based on if the first page of results has s selectable items or not. -- 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=40668 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=35211 -- 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=40668 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40668 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40668 --- Comment #1 from Lisette Scheer <lisette@bywatersolutions.com> --- I confirmed that Bug 35211 solves this if you use SeparateHoldingsByGroup. It still won't work if they aren't using that, so I'm going to leave this open for now. -- 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=40668 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=40668 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited| |Open Fifth list of Sponsors| | Patch complexity|--- |Trivial patch Sponsorship status|--- |Sponsored Status|NEW |Needs Signoff -- 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=40668 --- Comment #2 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 202588 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202588&action=edit Bug 40668: Don't depend on checkboxes existing in drawCallback The checkboxes this callback listens to events on are conditionally rendered, depending on whether the user has permission to edit each item. When moving from a page with no checkboxes displayed to one with checkboxes displayed, the checkbox elements may not exist at the time of this callback, so the listener is not attached and the checkboxes are inoperable. This patch fixes this by using a delegated event handler on the row, which doesn't depend on the checkbox existing at the time. Test plan: 1. Enable the system preference EnableItemGroups. 2. Set up a non-super-librarian patron, with permission to: - view the catalogue (catalogue) - create update and delete item groups (manage_item_groups) 3. Place this patron's library in a group by itself, with "limit item editing" enabled. The patron should only be able to edit items from their own library. 4. Pick an item in the catalogue, and add at least 40 items to it from a library the patron cannot edit items from. Add at least one item from the patron's library that they can edit. The 40 items are to ensure there is a complete (20 item) page that the patron cannot edit anything on. 5. Create an (empty) item group on this catalogue entry. 6. Log in as the unprivileged patron and navigate to the holdings view for the relevant catalogue entry. 7. Navigate through the holdings table pages until there is a page with no checkboxes. 8. Navigate to a table page with a checkbox. Select one of the checkboxes, and verify no actions appear at the top of table, even though you should have permission to add this item to a group. 9. Apply this patch, and hard refresh to load the new JavaScript. 10. Repeat steps 6-8, verifying the checkbox now appears correctly. 11. Verify you can add the item to an item group using the now-appearing action. Sponsored-by: Open Fifth -- 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=40668 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |olivia.reynolds@openfifth.c |ity.org |o.uk CC| |olivia.reynolds@openfifth.c | |o.uk -- 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=40668 David Nind <david@davidnind.com> 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=40668 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202588|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40668 --- Comment #3 from David Nind <david@davidnind.com> --- Created attachment 202652 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202652&action=edit Bug 40668: Don't depend on checkboxes existing in drawCallback The checkboxes this callback listens to events on are conditionally rendered, depending on whether the user has permission to edit each item. When moving from a page with no checkboxes displayed to one with checkboxes displayed, the checkbox elements may not exist at the time of this callback, so the listener is not attached and the checkboxes are inoperable. This patch fixes this by using a delegated event handler on the row, which doesn't depend on the checkbox existing at the time. Test plan: 1. Enable the system preference EnableItemGroups. 2. Set up a non-super-librarian patron, with permission to: - view the catalogue (catalogue) - create update and delete item groups (manage_item_groups) 3. Place this patron's library in a group by itself, with "limit item editing" enabled. The patron should only be able to edit items from their own library. 4. Pick an item in the catalogue, and add at least 40 items to it from a library the patron cannot edit items from. Add at least one item from the patron's library that they can edit. The 40 items are to ensure there is a complete (20 item) page that the patron cannot edit anything on. 5. Create an (empty) item group on this catalogue entry. 6. Log in as the unprivileged patron and navigate to the holdings view for the relevant catalogue entry. 7. Navigate through the holdings table pages until there is a page with no checkboxes. 8. Navigate to a table page with a checkbox. Select one of the checkboxes, and verify no actions appear at the top of table, even though you should have permission to add this item to a group. 9. Apply this patch, and hard refresh to load the new JavaScript. 10. Repeat steps 6-8, verifying the checkbox now appears correctly. 11. Verify you can add the item to an item group using the now-appearing action. Sponsored-by: Open Fifth Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40668 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This fixes an issue that release notes| |prevents staff patrons from | |adding items to an item | |group. Actions to add or | |remove items from an item | |group did not show, even | |though they had the correct | |permissions. | | | |Example: | |- Staff patron has | |catalogue and | |manage_item_groups | |permissions | |- Item groups are enabled | |(EnableItemGroups system | |preference) | |- There is a library group | |for the library that the | |staff patron is from | |- The "Limit item editing | |by group" is set for this | |library group (effectively, | |the staff patron can only | |edit items from their own | |library) | |- Before the fix: When | |viewing the items for a | |record there were no | |actions available to add | |items to an item group (the | |check box was selectable, | |but there were no actions | |available) | |- After the fix: Actions to | |add or remove items from an | |item group are now visible | |and work as expected --- Comment #4 from David Nind <david@davidnind.com> --- I have attempted a release note - please update as required. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40668 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |lisette@bywatersolutions.co |y.org |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40668 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #5 from Lisette Scheer <lisette@bywatersolutions.com> --- Worked great, thanks for the fix. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40668 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202652|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40668 --- Comment #6 from Lisette Scheer <lisette@bywatersolutions.com> --- Created attachment 202965 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202965&action=edit Bug 40668: Don't depend on checkboxes existing in drawCallback The checkboxes this callback listens to events on are conditionally rendered, depending on whether the user has permission to edit each item. When moving from a page with no checkboxes displayed to one with checkboxes displayed, the checkbox elements may not exist at the time of this callback, so the listener is not attached and the checkboxes are inoperable. This patch fixes this by using a delegated event handler on the row, which doesn't depend on the checkbox existing at the time. Test plan: 1. Enable the system preference EnableItemGroups. 2. Set up a non-super-librarian patron, with permission to: - view the catalogue (catalogue) - create update and delete item groups (manage_item_groups) 3. Place this patron's library in a group by itself, with "limit item editing" enabled. The patron should only be able to edit items from their own library. 4. Pick an item in the catalogue, and add at least 40 items to it from a library the patron cannot edit items from. Add at least one item from the patron's library that they can edit. The 40 items are to ensure there is a complete (20 item) page that the patron cannot edit anything on. 5. Create an (empty) item group on this catalogue entry. 6. Log in as the unprivileged patron and navigate to the holdings view for the relevant catalogue entry. 7. Navigate through the holdings table pages until there is a page with no checkboxes. 8. Navigate to a table page with a checkbox. Select one of the checkboxes, and verify no actions appear at the top of table, even though you should have permission to add this item to a group. 9. Apply this patch, and hard refresh to load the new JavaScript. 10. Repeat steps 6-8, verifying the checkbox now appears correctly. 11. Verify you can add the item to an item group using the now-appearing action. Sponsored-by: Open Fifth Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lisette Scheer <lisette@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40668 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.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=40668 --- Comment #7 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org