Description
Kati Sillgren
2023-11-01 09:38:46 UTC
Tab is shown automatically according to the library where Koha-user is logged in, and library is included to the library group (search group). +1 this would be helpful for large systems, consortiums, and library networks to breakdown multi-branch systems and see whats available. Created attachment 183075 [details] [review] Bug 35211: Add group_holdings tab to Holdings table Current status: ASSIGNED Created attachment 183099 [details] [review] Bug 35211: Add group_holdings tab to Holdings table Created attachment 183143 [details] [review] Bug 35211: Add group_holdings tab to Holdings table Add new system preference 'SeparateHoldingsByGroup' Adds new tab to Group Holdings to Holdings table. Separates holdings by library group. Created attachment 183144 [details] [review] Bug 35211: Add group_holdings tab to Holdings table Add new system preference 'SeparateHoldingsByGroup' Adds new tab to Group Holdings to Holdings table. Separates holdings by library group. Test Plan: 1. Apply patch, restart_all 2. Koha Administration -> System preferences -> SeparateHoldingsByGroup 3. Separate items display into two tabs and Separate holdings by library group. 4. Save preference changes 5. Koha Administration -> Library groups 6. Create a library group and add check the 'Use for staff search groups' box. 7. Add libraries to the new group including your logged in branch. 8. Do a catalog search. 9. Click on an item that libraries in your group own. 10. Notice a new tab called Group Holdings that contains only the libraries in your group 11. Return to Koha Administration -> System preferences SeparateHoldingsByGroup 12. Don't separate holdings by library group 13. Return to the item you search for and notice the tab has been removed. I found a few problems here: 1. There is a problem with the atomicupdate: ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''variable','value','options','explanation','type') VALUES ('Separ...' at line 1 at /kohadevbox/koha/C4/Installer.pm line 825 2. The "Group holdings" do not seem to include the logged in branch's holdings 3. If there are more than one groups everything gets grouped together under the single tab "Group holdings". In my opinion there should be a separate tab for every group that the logged in library is a part of. Created attachment 183420 [details] [review] Bug 35211: Add group_holdings tab to Holdings table Add new system preference 'SeparateHoldingsByGroup' Adds new tab to Group Holdings to Holdings table. Separates holdings by library group. Test Plan: 1. Apply patch, restart_all 2. Koha Administration -> System preferences -> SeparateHoldingsByGroup 3. Separate items display into two tabs and Separate holdings by library group. 4. Save preference changes 5. Koha Administration -> Library groups 6. Create a library group and add check the 'Use for staff search groups' box. 7. Add libraries to the new group including your logged in branch. 8. Do a catalog search. 9. Click on an item that libraries in your group own. 10. Notice a new tab called Group Holdings that contains only the libraries in your group 11. Return to Koha Administration -> System preferences SeparateHoldingsByGroup 12. Don't separate holdings by library group 13. Return to the item you search for and notice the tab has been removed. Created attachment 183615 [details] [review] Bug 35211: Separate group holdings Created attachment 183642 [details] [review] Bug 35211: Add group_holdings tab to Holdings table Add new system preference 'SeparateHoldingsByGroup' Adds new tab to Group Holdings to Holdings table. Separates holdings by library group. Test Plan: 1. Apply patch, restart_all 2. Koha Administration -> System preferences -> SeparateHoldingsByGroup 3. Separate items display into two tabs and Separate holdings by library group. 4. Save preference changes 5. Koha Administration -> Library groups 6. Create a library group and add check the 'Use for staff search groups' box. 7. Add libraries to the new group including your logged in branch. 8. Do a catalog search. 9. Click on an item that libraries in your group own. 10. Notice a new tab called Group Holdings that contains only the libraries in your group 11. Return to Koha Administration -> System preferences SeparateHoldingsByGroup 12. Don't separate holdings by library group 13. Return to the item you search for and notice the tab has been removed. Created attachment 183643 [details] [review] Bug 35211: Separate group holdings Created attachment 183901 [details] [review] Bug 35211: Separate group holdings into individual tabs Added SeparateHoldingsByGroup system preference Adds new tabs to Holdings table if preference is enabled Separates by library groups Created attachment 183945 [details] [review] Bug 35211: Separate group holdings into individual tabs Added SeparateHoldingsByGroup system preference Adds new tabs to Holdings table if preference is enabled Separates by library groups Test Plan: 1. Apply patch, restart_all, updatedatabase 2. Koha Administration -> System preferences -> SeparateHoldingsByGroup 3. Change to "Separate holdings by library group in subsequent tabs..." and Save 4. Koha Administration -> Library Groups 5. Create multiple library groups and check the 'Use for staff search groups' box. 6. Add your logged in library to each group and other libraries to each group. 7. Do catalog searches where the location of the item is a library in a library group 8. Notice tabs in the Holdings table for each library group if it contains a library that has the item This orders the holdings tabs as Local / Other / Group. I think Local / Group / Other would make more sense, organizationally. You've labeled the group holdings tab with "[Group title] - Group". This would be more consistent if the label were "[Group title] holdings". We should add the same functionality in the OPAC, which has a separate OpacSeparateHoldings syspref. That could be a separate bug, but might make sense to cover here if it's more of less a copy/paste. Created attachment 183949 [details] [review] Bug 35211: Reordered tabs in Holdings Table and fixed group tabnames (In reply to Andrew Fuerste-Henry from comment #14) > We should add the same functionality in the OPAC, which has a separate > OpacSeparateHoldings syspref. That could be a separate bug, but might make > sense to cover here if it's more of less a copy/paste. I think it should be a separate bug, might be more than a copy/paste Created attachment 183950 [details] [review] Bug 35211: Reordered tabs in Holdings Table and fixed group tabnames Created attachment 183966 [details]
empty group tab
Thanks for those changes! Two more issues:
1 - Set SeparateHoldings="Don't separate" and SeparateHoldingsByGroup="Separate." See attached screenshot; the group holdings tab appears and shows an accurate count of record on the tab, but contains no items
2 - With both sysprefs set to Separate, items repeat between tabs -- the Group tab repeats the item held locally and the Other tab repeats the non-local group items. Items should show in only one tab -- local items in the local tab, non-local group items in the Group tab, non-local & non-group items in the Other tab
Created attachment 183967 [details] [review] Bug 35211: Removed local items from group tabs and removed group items from other holdings tab Fixed the issues with tabs. I cannot replicate the issue in the attached screenshot. What steps did you take? (In reply to Eric Garcia from comment #19) > I cannot replicate the issue in the attached screenshot. What steps did you > take? - apply patch, updatedatabase, reset_all - log in at default branch, Centerville - go to bib 344 (E Street Shuffle, 3 items) - add 3 items to bib 344 with homebranch of Fairfield, Fairview, Franklin, respectively. holdingbranch remains Centerville - go to Admin, Groups. Create a group, check "Use for staff search groups", add Fairfield, Fairview, and Franklin to the group - in sysprefs, set SeparateHoldings="Don't Separate", SeparateHoldingsBranch="home library", SeparateHoldingsByGroup="Separate" - set your logged-in-branch to Fairfield - load bib 344 Created attachment 183968 [details] [review] Bug 35211: Fixed count on logged in holdings (In reply to Eric Garcia from comment #21) > Created attachment 183968 [details] [review] [review] > Bug 35211: Fixed count on logged in holdings I'm seeing some odd behavior now. Testing with the same setup described above (6 items on bib 344, group of F libraries). With: SeparateHoldings = Separate, SeparateHoldingsByGroup = Separate, SeparateHoldingsBranch = Home, logged in at Fairfield: I don't get a group holdings tab, just local and Other. The two non-local group items are not displayed at all With: SeparateHoldings = Separate, SeparateHoldingsByGroup = Separate, SeparateHoldingsBranch = Holding, logged in at Fairfield: No local tab, no group tab. There is not a tab selected at page load. The Other holdings tab shows a count of 4 but actually lists all 6 items. With apologies for being slow to think of this, but I don't think SeparateHoldingsByGroup can be coded to always go by homebranch; it should also follow SeparateHoldingsBranch. That further suggests these three sysprefs should get grouped together and rephrased a bit. Maybe: [Don't separate/Separate] items held by the user's logged-in library into the first tab of the items display. [Don't separate/Separate] items held by other libraries in a staff search group with the user's logged-in library into the next tab of the items display. The final tab will contain all other items. Use the items' [holding library/homelibrary] for determining these groupings. Created attachment 184016 [details] [review] Bug 35211: Set SeparateHoldingsByGroup to separate based on SeparateHoldingsBranch syspref |