[Bug 42826] New: Reports: Allow transfer/adoption of report ownership
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 Bug ID: 42826 Summary: Reports: Allow transfer/adoption of report ownership 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: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org CC: lisette@bywatersolutions.com Target Milestone: --- Bug 42667 introduces the edit_all_reports permission, restricting report editing to the report's creator unless the librarian holds that permission. This surfaces a gap: there is currently no mechanism to change the borrowernumber recorded as a report's owner. Two common real-world scenarios are blocked without this: 1. Staff departure. A librarian leaves the organisation. Their reports become ownerless (if the patron record is deleted) or remain locked to a departed account. Other staff with create_reports but not edit_all_reports cannot maintain them. 2. Adoption of ownerless/legacy reports. Reports created before ownership tracking was tightened, or imported via Mana, may have no owner. A librarian who wants to claim such a report and take ongoing responsibility for it has no way to do so without involving a superlibrarian. Proposed behaviour: - On the report edit form and/or via a dedicated action in the saved-reports list, a librarian holding edit_all_reports should be able to reassign the report's owner to any other staff patron, or clear the owner field. - A bulk-transfer option for the staff-departure case: reassign all reports owned by patron X to patron Y. This could live in the patron deletion workflow or in the reports administration area. - A librarian without edit_all_reports should be able to adopt an ownerless report (setting themselves as owner), since this is a tightening of access rather than a loosening. Acceptance criteria: - Single-report ownership transfer, restricted to edit_all_reports holders - Ownerless-report adoption available to any create_reports holder - Bulk transfer (move all reports from patron A to patron B), restricted to edit_all_reports holders -- 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=42826 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |42667 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42667 [Bug 42667] Split the ability to edit other librarian's reports into a separate permission -- 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=42826 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |kyle@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=42826 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |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=42826 Andrew Fuerste-Henry <andrew@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |andrew@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|kyle@bywatersolutions.com |olivia.reynolds@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited| |Open Fifth list of Sponsors| | Sponsorship status|--- |Sponsored Patch complexity|--- |Small patch Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 --- Comment #1 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 202514 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202514&action=edit Bug 42826: Allow changing report owners This patch adds a "Report owner" field to the edit form for reports, only usable by users with the edit_all_reports. Test plan: 1. Ensure the changes from Bug 42667 are applied. 2. Apply patches. 3. Log in as a user with edit_all_reports permission (such as koha on KTD). 4. Create a report under Tools > Reports. The quickest way to do this is to create a new SQL report with any title and "SELECT 1" as the SQL query. 5. Verify editing the new report shows a "Report owner" field with the cardnumber of your user. 6. Verify typing a patron name in this field autocompletes correctly. 7. Verify changing this owner field, saving, and reloading the edit page displays the change correctly. 8. Log in as a librarian without edit_all_reports but with create_reports permission. 9. Create a new report. 10. Verify this librarian does not see the "Report owner" field. 11. Prove t/db_dependent/Reports/Guided.t Sponsored-by: Open Fifth -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 --- Comment #2 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 202515 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202515&action=edit Bug 42826: Allow adopting ownerless reports This patch allows any user with create_reports permission to adopt reports that don't have an owner set. Users with edit_all_reports permission can adopt any report. Test plan (following on from previous patch): 1. As a user with edit_all_reports, use the "Report Owner" field to clear the ownership of a report. 2. As a user with create_reports but not edit_all_reports, navigate to the list of reports. 3. Verify there is an "Adopt" option in the actions dropdown for the relevant report. 4. Verify clicking "Adopt" redirects you to the edit page for the report. 5. As the user with edit_all_reports, navigate to the edit page for the relevant report and verify the owner has been filled in with the other user's cardnumber. Sponsored-by: Open Fifth -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 --- Comment #3 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 202516 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202516&action=edit Bug 42826: Allow bulk transferring reports This patch allows users with edit_all_reports permission to bulk transfer reports from one owner to another. Test plan (following on from previous patches): 1. As a user with edit_all_reports permission, create a number of reports belonging to that user. 2. Verify there is a "Bulk transfer" option above the list of reports. 3. Click this option. 4. Fill in your user as "Transfer from", and another user as "Transfer to". Click "Transfer". 5. Verify you are asked to confirm the number of reports being transferred. Click "Confirm". 6. Verify you are redirected back to the list of reports, and the relevant reports have been transferred. Sponsored-by: Open Fifth -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |roman.dolny@jezuici.pl Status|Needs Signoff |Patch doesn't apply --- Comment #4 from Roman Dolny <roman.dolny@jezuici.pl> --- ... ✓ Successfully applied 7 patch(es) from bug 42667 📋 Bug 42826 - Reports: Allow transfer/adoption of report ownership • 202514 - Bug 42826: Allow changing report owners • 202515 - Bug 42826: Allow adopting ownerless reports • 202516 - Bug 42826: Allow bulk transferring reports Apply? [(y)es, (n)o, (i)nteractive] y Preparing 3 patch(es): ✓ Prepared 3 patch(es) Applying 3 patch(es): Patch application failed for attachment 202514 - Bug 42826: Allow changing report owners ... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 Olivia Reynolds <olivia.reynolds@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202514|0 |1 is obsolete| | Attachment #202515|0 |1 is obsolete| | Attachment #202516|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=42826 --- Comment #5 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 203401 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203401&action=edit Bug 42826: Allow changing report owners This patch adds a "Report owner" field to the edit form for reports, only usable by users with the edit_all_reports. Test plan: 1. Ensure the changes from Bug 42667 are applied. 2. Apply patches. 3. Log in as a user with edit_all_reports permission (such as koha on KTD). 4. Create a report under Tools > Reports. The quickest way to do this is to create a new SQL report with any title and "SELECT 1" as the SQL query. 5. Verify editing the new report shows a "Report owner" field with the cardnumber of your user. 6. Verify typing a patron name in this field autocompletes correctly. 7. Verify changing this owner field, saving, and reloading the edit page displays the change correctly. 8. Log in as a librarian without edit_all_reports but with create_reports permission. 9. Create a new report. 10. Verify this librarian does not see the "Report owner" field. 11. Prove t/db_dependent/Reports/Guided.t Sponsored-by: Open Fifth -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 --- Comment #6 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 203402 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203402&action=edit Bug 42826: Allow adopting ownerless reports This patch allows any user with create_reports permission to adopt reports that don't have an owner set. Users with edit_all_reports permission can adopt any report. Test plan (following on from previous patch): 1. As a user with edit_all_reports, use the "Report Owner" field to clear the ownership of a report. 2. As a user with create_reports but not edit_all_reports, navigate to the list of reports. 3. Verify there is an "Adopt" option in the actions dropdown for the relevant report. 4. Verify clicking "Adopt" redirects you to the edit page for the report. 5. As the user with edit_all_reports, navigate to the edit page for the relevant report and verify the owner has been filled in with the other user's cardnumber. Sponsored-by: Open Fifth -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 --- Comment #7 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 203403 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203403&action=edit Bug 42826: Allow bulk transferring reports This patch allows users with edit_all_reports permission to bulk transfer reports from one owner to another. Test plan (following on from previous patches): 1. As a user with edit_all_reports permission, create a number of reports belonging to that user. 2. Verify there is a "Bulk transfer" option above the list of reports. 3. Click this option. 4. Fill in your user as "Transfer from", and another user as "Transfer to". Click "Transfer". 5. Verify you are asked to confirm the number of reports being transferred. Click "Confirm". 6. Verify you are redirected back to the list of reports, and the relevant reports have been transferred. Sponsored-by: Open Fifth -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org