[Bug 42621] New: Extend report limitations by library to use library groups
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 Bug ID: 42621 Summary: Extend report limitations by library to use library groups Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Reports Assignee: koha-bugs@lists.koha-community.org Reporter: andrew@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com Depends on: 16631 Bug 16631 implements limitations on report access based on library. We'd like to make that also work with library groups. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16631 [Bug 16631] Limit listing of reports using patron library -- 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=42621 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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> 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=42621 --- Comment #1 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200213 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200213&action=edit Bug 42621: Add a ft_reports column to library_groups Patch from commit a283fa7 -- 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=42621 --- Comment #2 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200214 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200214&action=edit Bug 42621: Update the LimitReportsByLibrary to LimitReportsBy Patch from commit 40da003 -- 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=42621 --- Comment #3 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200215 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200215&action=edit Bug 42621: Handle the new ft_reports column in the UI Patch from commit 4ae0505 -- 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=42621 --- Comment #4 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200216 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200216&action=edit Bug 42621: Add library group limit classes Designed to work as an extra layer on top of library_limits by using the same column but expanding the search to also include any branches in a library group -- 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=42621 --- Comment #5 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200217 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200217&action=edit Bug 42621: Update reports search to be able to look up by library group Patch from commit 7e47801 -- 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=42621 --- Comment #6 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200218 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200218&action=edit Bug 42621: Update logic involving the old syspref to reflect the new LimitReportsBy Patch from commit 137e8c6 -- 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=42621 --- Comment #7 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200219 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200219&action=edit Bug 42621: Add unit test for lib group limits Test plan: Prerequisites 1. Three branches: Centerville, Fairfield, Fairview 2. Admin - Library groups: create root group "Test Group", enable Limit report access by group, add Centerville and Fairfield as child libraries (not Fairview) 3. Create an admin user with manage_report_limits permission (or superlibrarian) at branch Centerville 4. Create regular users with reports + execute_reports only (no manage_report_limits), one at each of Centerville, Fairfield, and Fairview 5. Admin - Administration - Columns settings - Reports - Saved reports (table_reports) - enable the Library limits column (it is hidden by default) Baseline - LimitReportsBy = No restriction 6. Set LimitReportsBy = No restriction 7. Admin user - create Report A - no "Library limitation" field visible, save report with any parameters, content is not important 8. Admin user - Reports list - no "Library limits" column visible even if enabled in column settings. Library mode - regression 9. Set LimitReportsBy = Library 10. Admin user - Reports list - "Library limits" column visible (if enabled in column settings) 11. Log in as the Fairview user - Reports list - "Library limits" column not visible as user doesn’t have manage_reports_limit permission 12. Admin user - edit Report A - Library limitation field should be visible - set limit to Centerville - report saves with Centerville limit 13. Fairview user - Reports list - Report A not visible 14. Regular user at Centerville - Reports list - Report A visible 15. Regular user at Centerville - edit Report A - save - limits preserved (fieldset not shown; backend preserves existing limits silently) 16. Admin user - Report A visible with "1 library limitation" tooltip showing Centerville. Delete Report A Library group mode - setup and limits column 17. Set LimitReportsBy = library_group 18. Admin user - Reports list - "Library limits" column still visible 19. Regular user at Centerville - Reports list - "Library limits" column not visible 20. Admin user - create Report B, set limit to Centerville - "Library limitation" fieldset visible, saves with Centerville as the limit 21. Admin user - Reports list - Report B shows "Test Group" in limits column 22. Admin user - create Report C with no limit - Report C shows "No limitation" in limits column Library group mode - access by group membership 23. Fairfield user - Reports list - Report B visible (Fairfield is in the same group as Centerville). Report C also visible (no limitation) 24. Fairview user - Reports list - Report B not visible (Fairview not in group) 25. Fairview user - navigate directly to Report B URL - access denied 26. Fairview user - Reports list - Report C visible (no limitation) Library group mode - ft_reports flag required 27. Admin - Library groups: disable "Limit report access by group" on "Test Group" 28. Regular user at Fairfield - Reports list - Report B no longer visible as it was limited to Centerville 29. Admin user - Report B limits column - shows "No limitation" 30. Re-enable the flag - Fairfield can see Report B again Library group mode - non-admin save behaviour 31. Regular user at Centerville - create new Report D - save - Report D automatically limited to Centerville (backend sets own branch; no fieldset shown). Verify by viewing the saved reports table as the Admin user - should show Test group as the limitation 32. Regular user at Centerville - edit Report B - save - existing limits preserved unchanged Switching modes 33. With Report B limited to Centerville and LimitReportsBy = library_group - Fairfield can access 34. Switch to LimitReportsBy to Library - Fairfield can no longer access Report B (exact branch match only) 35. Switch back to library_group - Fairfield can access Report B again 36. Switch to none - all reports accessible; no limits column or fieldset anywhere -- 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=42621 --- Comment #8 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200220 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200220&action=edit Bug 42621: DBIC Patch from commit 54f0c48 -- 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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |matt.blenkinsop@openfifth.c |ity.org |o.uk CC| |matt.blenkinsop@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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200213|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200214|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200215|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200216|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200217|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200218|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200219|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200220|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=42621 --- Comment #9 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200234 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200234&action=edit Bug 42621: Add a ft_reports column to library_groups Patch from commit a283fa7 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #10 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200235 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200235&action=edit Bug 42621: Update the LimitReportsByLibrary to LimitReportsBy Patch from commit 40da003 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #11 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200236 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200236&action=edit Bug 42621: Handle the new ft_reports column in the UI Patch from commit 4ae0505 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #12 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200237 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200237&action=edit Bug 42621: Add library group limit classes Designed to work as an extra layer on top of library_limits by using the same column but expanding the search to also include any branches in a library group -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #13 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200238 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200238&action=edit Bug 42621: Update reports search to be able to look up by library group Patch from commit 42cfe07 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #14 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200239 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200239&action=edit Bug 42621: Update logic involving the old syspref to reflect the new LimitReportsBy Patch from commit 1ce739d -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #15 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200240 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200240&action=edit Bug 42621: Add unit test for lib group limits Test plan: Prerequisites 1. Three branches: Centerville, Fairfield, Fairview 2. Admin - Library groups: create root group "Test Group", enable Limit report access by group, add Centerville and Fairfield as child libraries (not Fairview) 3. Create an admin user with manage_report_limits permission (or superlibrarian) at branch Centerville 4. Create regular users with reports + execute_reports only (no manage_report_limits), one at each of Centerville, Fairfield, and Fairview 5. Admin - Administration - Columns settings - Reports - Saved reports (table_reports) - enable the Library limits column (it is hidden by default) Baseline - LimitReportsBy = No restriction 6. Set LimitReportsBy = No restriction 7. Admin user - create Report A - no "Library limitation" field visible, save report with any parameters, content is not important 8. Admin user - Reports list - no "Library limits" column visible even if enabled in column settings. Library mode - regression 9. Set LimitReportsBy = Library 10. Admin user - Reports list - "Library limits" column visible (if enabled in column settings) 11. Log in as the Fairview user - Reports list - "Library limits" column not visible as user doesn’t have manage_reports_limit permission 12. Admin user - edit Report A - Library limitation field should be visible - set limit to Centerville - report saves with Centerville limit 13. Fairview user - Reports list - Report A not visible 14. Regular user at Centerville - Reports list - Report A visible 15. Regular user at Centerville - edit Report A - save - limits preserved (fieldset not shown; backend preserves existing limits silently) 16. Admin user - Report A visible with "1 library limitation" tooltip showing Centerville. Delete Report A Library group mode - setup and limits column 17. Set LimitReportsBy = library_group 18. Admin user - Reports list - "Library limits" column still visible 19. Regular user at Centerville - Reports list - "Library limits" column not visible 20. Admin user - create Report B, set limit to Centerville - "Library limitation" fieldset visible, saves with Centerville as the limit 21. Admin user - Reports list - Report B shows "Test Group" in limits column 22. Admin user - create Report C with no limit - Report C shows "No limitation" in limits column Library group mode - access by group membership 23. Fairfield user - Reports list - Report B visible (Fairfield is in the same group as Centerville). Report C also visible (no limitation) 24. Fairview user - Reports list - Report B not visible (Fairview not in group) 25. Fairview user - navigate directly to Report B URL - access denied 26. Fairview user - Reports list - Report C visible (no limitation) Library group mode - ft_reports flag required 27. Admin - Library groups: disable "Limit report access by group" on "Test Group" 28. Regular user at Fairfield - Reports list - Report B no longer visible as it was limited to Centerville 29. Admin user - Report B limits column - shows "No limitation" 30. Re-enable the flag - Fairfield can see Report B again Library group mode - non-admin save behaviour 31. Regular user at Centerville - create new Report D - save - Report D automatically limited to Centerville (backend sets own branch; no fieldset shown). Verify by viewing the saved reports table as the Admin user - should show Test group as the limitation 32. Regular user at Centerville - edit Report B - save - existing limits preserved unchanged Switching modes 33. With Report B limited to Centerville and LimitReportsBy = library_group - Fairfield can access 34. Switch to LimitReportsBy to Library - Fairfield can no longer access Report B (exact branch match only) 35. Switch back to library_group - Fairfield can access Report B again 36. Switch to none - all reports accessible; no limits column or fieldset anywhere -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #16 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200241 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200241&action=edit Bug 42621: DBIC Patch from commit c0c2150 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |42623 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42623 [Bug 42623] Add ability to restrict which libraries can be selected in a report runtime parameter -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA CC| |blawlor@clamsnet.org --- Comment #17 from Brendan Lawlor <blawlor@clamsnet.org> --- This works quite nicely as described. I'm only failing QA because the qa script picks up a tidy issue: [FAIL] t/db_dependent/Koha/Reports.t FAIL tidiness File is not tidy, please run `perl misc/devel/tidy.pl t/db_dependent/Koha/Reports.t` Also, I'm not sure if this is an issue with the atomic update, but if you run updatedatabase twice you get an error: DEV atomic update /kohadevbox/koha/installer/data/mysql/atomicupdate/bug_42621.pl [19:29:08]: Bug 42621 - Extend report limitations by library to use library groups ERROR: {UNKNOWN}: DBI Exception: DBD::mysql::db do failed: Duplicate entry 'LimitReportsBy' for key 'PRIMARY' at /kohadevbox/koha/C4/Installer.pm line 818 Other than that this is looking good. Nice work! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200234|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200235|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200236|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200237|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200238|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200239|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200240|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=42621 Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200241|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=42621 --- Comment #18 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200424&action=edit Bug 42621: Add a ft_reports column to library_groups Patch from commit 66e0762 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #19 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200425 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200425&action=edit Bug 42621: Update the LimitReportsByLibrary to LimitReportsBy Patch from commit 04b44eb -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #20 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200426 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200426&action=edit Bug 42621: Handle the new ft_reports column in the UI Patch from commit 2968c35 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #21 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200427 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200427&action=edit Bug 42621: Add library group limit classes Designed to work as an extra layer on top of library_limits by using the same column but expanding the search to also include any branches in a library group -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #22 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200428 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200428&action=edit Bug 42621: Update reports search to be able to look up by library group Patch from commit e83e6fa -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #23 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200429 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200429&action=edit Bug 42621: Update logic involving the old syspref to reflect the new LimitReportsBy Patch from commit a36701e -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #24 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200430 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200430&action=edit Bug 42621: Add unit test for lib group limits Test plan: Prerequisites 1. Three branches: Centerville, Fairfield, Fairview 2. Admin - Library groups: create root group "Test Group", enable Limit report access by group, add Centerville and Fairfield as child libraries (not Fairview) 3. Create an admin user with manage_report_limits permission (or superlibrarian) at branch Centerville 4. Create regular users with reports + execute_reports only (no manage_report_limits), one at each of Centerville, Fairfield, and Fairview 5. Admin - Administration - Columns settings - Reports - Saved reports (table_reports) - enable the Library limits column (it is hidden by default) Baseline - LimitReportsBy = No restriction 6. Set LimitReportsBy = No restriction 7. Admin user - create Report A - no "Library limitation" field visible, save report with any parameters, content is not important 8. Admin user - Reports list - no "Library limits" column visible even if enabled in column settings. Library mode - regression 9. Set LimitReportsBy = Library 10. Admin user - Reports list - "Library limits" column visible (if enabled in column settings) 11. Log in as the Fairview user - Reports list - "Library limits" column not visible as user doesn’t have manage_reports_limit permission 12. Admin user - edit Report A - Library limitation field should be visible - set limit to Centerville - report saves with Centerville limit 13. Fairview user - Reports list - Report A not visible 14. Regular user at Centerville - Reports list - Report A visible 15. Regular user at Centerville - edit Report A - save - limits preserved (fieldset not shown; backend preserves existing limits silently) 16. Admin user - Report A visible with "1 library limitation" tooltip showing Centerville. Delete Report A Library group mode - setup and limits column 17. Set LimitReportsBy = library_group 18. Admin user - Reports list - "Library limits" column still visible 19. Regular user at Centerville - Reports list - "Library limits" column not visible 20. Admin user - create Report B, set limit to Centerville - "Library limitation" fieldset visible, saves with Centerville as the limit 21. Admin user - Reports list - Report B shows "Test Group" in limits column 22. Admin user - create Report C with no limit - Report C shows "No limitation" in limits column Library group mode - access by group membership 23. Fairfield user - Reports list - Report B visible (Fairfield is in the same group as Centerville). Report C also visible (no limitation) 24. Fairview user - Reports list - Report B not visible (Fairview not in group) 25. Fairview user - navigate directly to Report B URL - access denied 26. Fairview user - Reports list - Report C visible (no limitation) Library group mode - ft_reports flag required 27. Admin - Library groups: disable "Limit report access by group" on "Test Group" 28. Regular user at Fairfield - Reports list - Report B no longer visible as it was limited to Centerville 29. Admin user - Report B limits column - shows "No limitation" 30. Re-enable the flag - Fairfield can see Report B again Library group mode - non-admin save behaviour 31. Regular user at Centerville - create new Report D - save - Report D automatically limited to Centerville (backend sets own branch; no fieldset shown). Verify by viewing the saved reports table as the Admin user - should show Test group as the limitation 32. Regular user at Centerville - edit Report B - save - existing limits preserved unchanged Switching modes 33. With Report B limited to Centerville and LimitReportsBy = library_group - Fairfield can access 34. Switch to LimitReportsBy to Library - Fairfield can no longer access Report B (exact branch match only) 35. Switch back to library_group - Fairfield can access Report B again 36. Switch to none - all reports accessible; no limits column or fieldset anywhere -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #25 from Matt Blenkinsop <matt.blenkinsop@openfifth.co.uk> --- Created attachment 200431 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200431&action=edit Bug 42621: DBIC Patch from commit 83ecde8 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Sponsorship status|--- |Sponsored Comma delimited| |CLAMS list of Sponsors| | 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=42621 Brendan Lawlor <blawlor@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #200424|0 |1 is obsolete| | Attachment #200425|0 |1 is obsolete| | Attachment #200426|0 |1 is obsolete| | Attachment #200427|0 |1 is obsolete| | Attachment #200428|0 |1 is obsolete| | Attachment #200429|0 |1 is obsolete| | Attachment #200430|0 |1 is obsolete| | Attachment #200431|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=42621 --- Comment #26 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 200462 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200462&action=edit Bug 42621: Add a ft_reports column to library_groups Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #27 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 200463 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200463&action=edit Bug 42621: Update the LimitReportsByLibrary to LimitReportsBy Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #28 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 200464 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200464&action=edit Bug 42621: Handle the new ft_reports column in the UI Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #29 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 200465 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200465&action=edit Bug 42621: Add library group limit classes Designed to work as an extra layer on top of library_limits by using the same column but expanding the search to also include any branches in a library group Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #30 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 200466 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200466&action=edit Bug 42621: Update reports search to be able to look up by library group Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #31 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 200467 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200467&action=edit Bug 42621: Update logic involving the old syspref to reflect the new LimitReportsBy Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #32 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 200468 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200468&action=edit Bug 42621: Add unit test for lib group limits Test plan: Prerequisites 1. Three branches: Centerville, Fairfield, Fairview 2. Admin - Library groups: create root group "Test Group", enable Limit report access by group, add Centerville and Fairfield as child libraries (not Fairview) 3. Create an admin user with manage_report_limits permission (or superlibrarian) at branch Centerville 4. Create regular users with reports + execute_reports only (no manage_report_limits), one at each of Centerville, Fairfield, and Fairview 5. Admin - Administration - Columns settings - Reports - Saved reports (table_reports) - enable the Library limits column (it is hidden by default) Baseline - LimitReportsBy = No restriction 6. Set LimitReportsBy = No restriction 7. Admin user - create Report A - no "Library limitation" field visible, save report with any parameters, content is not important 8. Admin user - Reports list - no "Library limits" column visible even if enabled in column settings. Library mode - regression 9. Set LimitReportsBy = Library 10. Admin user - Reports list - "Library limits" column visible (if enabled in column settings) 11. Log in as the Fairview user - Reports list - "Library limits" column not visible as user doesn’t have manage_reports_limit permission 12. Admin user - edit Report A - Library limitation field should be visible - set limit to Centerville - report saves with Centerville limit 13. Fairview user - Reports list - Report A not visible 14. Regular user at Centerville - Reports list - Report A visible 15. Regular user at Centerville - edit Report A - save - limits preserved (fieldset not shown; backend preserves existing limits silently) 16. Admin user - Report A visible with "1 library limitation" tooltip showing Centerville. Delete Report A Library group mode - setup and limits column 17. Set LimitReportsBy = library_group 18. Admin user - Reports list - "Library limits" column still visible 19. Regular user at Centerville - Reports list - "Library limits" column not visible 20. Admin user - create Report B, set limit to Centerville - "Library limitation" fieldset visible, saves with Centerville as the limit 21. Admin user - Reports list - Report B shows "Test Group" in limits column 22. Admin user - create Report C with no limit - Report C shows "No limitation" in limits column Library group mode - access by group membership 23. Fairfield user - Reports list - Report B visible (Fairfield is in the same group as Centerville). Report C also visible (no limitation) 24. Fairview user - Reports list - Report B not visible (Fairview not in group) 25. Fairview user - navigate directly to Report B URL - access denied 26. Fairview user - Reports list - Report C visible (no limitation) Library group mode - ft_reports flag required 27. Admin - Library groups: disable "Limit report access by group" on "Test Group" 28. Regular user at Fairfield - Reports list - Report B no longer visible as it was limited to Centerville 29. Admin user - Report B limits column - shows "No limitation" 30. Re-enable the flag - Fairfield can see Report B again Library group mode - non-admin save behaviour 31. Regular user at Centerville - create new Report D - save - Report D automatically limited to Centerville (backend sets own branch; no fieldset shown). Verify by viewing the saved reports table as the Admin user - should show Test group as the limitation 32. Regular user at Centerville - edit Report B - save - existing limits preserved unchanged Switching modes 33. With Report B limited to Centerville and LimitReportsBy = library_group - Fairfield can access 34. Switch to LimitReportsBy to Library - Fairfield can no longer access Report B (exact branch match only) 35. Switch back to library_group - Fairfield can access Report B again 36. Switch to none - all reports accessible; no limits column or fieldset anywhere Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #33 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 200469 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=200469&action=edit Bug 42621: DBIC Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42621 --- Comment #34 from Brendan Lawlor <blawlor@clamsnet.org> --- This works as described and is a big improvement for consortia that need to manage a lot of reports. For example some reports only need to be used by system administrators, and this will allow us to display only relevant reports to the right people. Just noting here the qa script flags one other issue: [FAIL] C4/Reports/Guided.pm FAIL pod_coverage sub _build_query has no pod coverage. sub _get_columns has no pod coverage. sub _get_display_value has no pod coverage. But that is an issue before the patch too. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org