[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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 Gretchen Maxeiner <maxeinergl@gcc.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply CC| |maxeinergl@gcc.edu --- Comment #8 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- I got failures when trying to apply these patches in sandbox. Seeing the test plan step 1 in Comment 5, I also started over with a fresh sandbox and tried applying patches for Bug 42667 first, but that failed as well. -- 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 --- Comment #9 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Thanks for letting me know. I've rebased these patches on top of main. Note that bug 42667 is no longer required as that's been pushed. -- 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 #203401|0 |1 is obsolete| | Attachment #203402|0 |1 is obsolete| | Attachment #203403|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 #10 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 208571 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208571&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. Apply patches. 2. Log in as a user with edit_all_reports permission (such as koha on KTD). 3. 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. 4. Verify editing the new report shows a "Report owner" field with the cardnumber of your user. 5. Verify typing a patron name in this field autocompletes correctly. 6. Verify changing this owner field, saving, and reloading the edit page displays the change correctly. 7. Log in as a librarian without edit_all_reports but with create_reports permission. 8. Create a new report. 9. Verify this librarian does not see the "Report owner" field. 10. 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 #11 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 208572 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208572&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 #12 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 208573 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208573&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 Olivia Reynolds <olivia.reynolds@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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42826 Gretchen Maxeiner <maxeinergl@gcc.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #13 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- Thank you for the rebase! I have given this some testing and have feedback. These features were easy to use and generally worked smoothly. I hit on a couple of issues and then also have a few comments. New Report Owner field (Test plan 1) • On the Edit SQL screen in the Report Owner field, autocomplete offers ALL patrons, not just those with staff permissions, let alone those with reports permissions. This means reports can be assigned to people with no ability to access them. It would seem best to limit the selection to just staff. If it isn’t possible to restrict the autocomplete, a warning that the person selected isn’t appropriate would be helpful. • On the Edit SQL screen in the Report Owner field, it is possible to not select one of the options from autocomplete or to type too short a text for autocomplete to activate, and thus to fill out the field without matching to a person and save. This essentially blanks the field after save. It would be good to have a warning before saving if what’s been entered hasn’t matched to a person. • I could not get the autocomplete to work for a staff with edit_all_reports permission. It also failed if I gave all Reports permissions (reports). It only worked when I assigned superlibrarian permissions. • I wasn’t sure how to do step 11, but I did test creating guided reports at the various permission levels and the Report Owner field on the Edit SQL page’s visibility was correct as described for the other steps. • Otherwise, all works correctly as described. Orphan report adoption (Test plan 2) • This all worked correctly as described. Bulk ownership transfer (Test plan 3) • Here again I could not get autocomplete to work at the edit_all_reports permission level. This effectively blocks bulk transfer for these users. • Also, it is again possible to fill in the field without selecting an autocomplete suggestion, or filling in too little for autocomplete to activate, and then move on to the transfer. This brings up an ugly error screen. • Otherwise, this worked very smoothly. • I notice that the bulk transfer option is present (for users with edit_all_reports permission) not only on the Saved Reports list page but also in the options section on many other Reports pages (guide reports, edit SQL, reports results page, and perhaps more). I don’t think it is needed these places, but it may not be a concern. General • It is awkward to name the field “Report Owner” on the Edit SQL screen but “Author” in the reports list. Could these be sync’ed? “Report Owner” is the more accurate label if we are overwriting the original author for ownership changes. • It is also awkward that the “Report Owner” field on the Edit SQL screen shows the cardnumber but it is name and borrowernumber in the “Author” field in the reports list. I think these should be sync’ed also. • It might be nice to have a “me” option in here when editing “Report Owner” on the SQL edit page and on the Bulk Transfer page in the to or from fields. In a large number of instances, I expect the person making the changes will be the patron being entered. -- 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|Failed QA |Needs Signoff --- Comment #14 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Thanks for taking the time to test this out! I've done some further development to address the issues you've run into. As far as I know it's a problem across Koha that you need the list_borrowers permission to use patron autocompletes, so that it can do the search for patrons matching the current text. As part of bug 30557 I've added support for filtering to only staff members, so hopefully that can be brought to more places over time. I've made disowning a report an explicit action in the dropdown alongside "Adopt" to try and prevent this happening by accident. If you leave the "author" field blank now or specify an invalid patron you get a much nicer error message. I've also made the "Bulk transfer" button only appear on the list of reports, made the "report owner" field into the "author" field for consistency, and switched to borrowernumbers from cardnumbers, also for consistency. Finally, I've added "Me" buttons to the bulk transfer screen to make that common operation easier. Hopefully having "adopt" covers that usecase for single reports. Thanks again for all of the feedback! -- 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 #208571|0 |1 is obsolete| | Attachment #208572|0 |1 is obsolete| | Attachment #208573|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 #15 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 208922 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208922&action=edit Bug 42826: Allow changing report authors This patch adds an "Author" field to the edit form for reports, only usable by users with the edit_all_reports. Test plan: 1. Apply patches. 2. Log in as a user with edit_all_reports permission (such as koha on KTD). 3. 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. 4. Verify editing the new report shows an "Author" field with the borrowernumber of your user. 5. Verify typing a patron name in this field autocompletes correctly. 6. Verify changing this author field, saving, and reloading the edit page displays the change correctly. 7. Verify that changing the author to an invalid borrowernumber or to an empty string produces an error on save. 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 "Author" field. 11. Prove t/db_dependent/Reports/Guided.t and verify all the tests pass. 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 #16 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 208923 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208923&action=edit Bug 42826: Allow adopting and disowning reports This patch allows any user with create_reports permission to adopt reports that don't have an author set and disown reports they're the author of. Users with edit_all_reports permission can adopt and disown any report. Test plan (following on from previous patch): 1. As a user with create_reports, create a new report. 2. Navigate to the list of reports, and verify there is a "Disown" option in the actions dropdown for this report. 3. Verify using this "Disown" option clears the author of the report. 4. Verify there is now an "Adopt" option in the actions dropdown for the report. 5. Verify clicking "Adopt" redirects you to the edit page for the report. 6. Verify the authorship of this report has been restored in the list of reports. 7. As a user with edit_all_reports, verify you can directly adopt this report from the other user. 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 #17 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 208924 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=208924&action=edit Bug 42826: Allow bulk transferring reports This patch allows users with edit_all_reports permission to bulk transfer reports from one author 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. Verify that clicking the "Me" button next to either "Transfer from" or "Transfer to" fills the relevant field with your current borrowernumber. 5. Fill in your user as "Transfer from", and another user as "Transfer to". Click "Transfer". 6. Verify you are asked to confirm the number of reports being transferred. Click "Confirm". 7. 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 Gretchen Maxeiner <maxeinergl@gcc.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Failed QA --- Comment #18 from Gretchen Maxeiner <maxeinergl@gcc.edu> --- Things are looking good but the "Disown" function doesn't work for a staff with just create_reports permission. The "Disown" button correctly appears only on this staff's own reports, but after clicking it gives an error that starts with this: Exception 'Koha::Exceptions::Report::EditPermission' thrown 'You do not have permission to edit this report' with report_id => 5 at /usr/share/perl5/Exception/Class/Base.pm line 88 Otherwise, all things seem to work as they should! Adding list_borrowers permission solved the troubles I had with searching authors. The "Adopt" and "Disown" options show or don't show in the correct situations, and Bulk Transfer is a breeze with the Me button. The error message for not selecting a new author from the Edit screen is also clear. -- 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|Failed QA |Needs Signoff --- Comment #19 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Thanks again for the testing, and apologies for missing that. This new set of patches includes much better permissions checking for changing the author of a report, but the only visible change should be that it's now possible to correctly disown your own report if you don't have the edit_all_reports permission. -- 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 #208922|0 |1 is obsolete| | Attachment #208923|0 |1 is obsolete| | Attachment #208924|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 #20 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 209157 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209157&action=edit Bug 42826: Allow changing report authors This patch adds an "Author" field to the edit form for reports, only usable by users with the edit_all_reports. Test plan: 1. Apply patches. 2. Log in as a user with edit_all_reports permission (such as koha on KTD). 3. 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. 4. Verify editing the new report shows an "Author" field with the borrowernumber of your user. 5. Verify typing a patron name in this field autocompletes correctly. 6. Verify changing this author field, saving, and reloading the edit page displays the change correctly. 7. Verify that changing the author to an invalid borrowernumber or to an empty string produces an error on save. 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 "Author" field. 11. Prove t/db_dependent/Reports/Guided.t and verify all the tests pass. 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 #21 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 209158 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209158&action=edit Bug 42826: Process changing report author in permission checks Now that changing report author is possible, check_edit_permission can't assume that the current borrowernumber was also the previous borrowernumber. It must use the old borrowernumber to decide whether the current patron can edit the report. This patch also allows disowning as an explicit extra case, when a report can go from being owned by a patron to being owned by nobody - but not directly from one patron to another. Test plan: 1. Apply patch. 2. Prove t/db_dependent/Koha/Reports.t, and verify all of the tests pass. 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 #22 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 209159 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209159&action=edit Bug 42826: Allow adopting and disowning reports This patch allows any user with create_reports permission to adopt reports that don't have an author set and disown reports they're the author of. Users with edit_all_reports permission can adopt and disown any report. Test plan (following on from previous patch): 1. As a user with create_reports, create a new report. 2. Navigate to the list of reports, and verify there is a "Disown" option in the actions dropdown for this report. 3. Verify using this "Disown" option clears the author of the report. 4. Verify there is now an "Adopt" option in the actions dropdown for the report. 5. Verify clicking "Adopt" redirects you to the edit page for the report. 6. Verify the authorship of this report has been restored in the list of reports. 7. As a user with edit_all_reports, verify you can directly adopt this report from the other user. 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 #23 from Olivia Reynolds <olivia.reynolds@openfifth.co.uk> --- Created attachment 209160 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=209160&action=edit Bug 42826: Allow bulk transferring reports This patch allows users with edit_all_reports permission to bulk transfer reports from one author 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. Verify that clicking the "Me" button next to either "Transfer from" or "Transfer to" fills the relevant field with your current borrowernumber. 5. Fill in your user as "Transfer from", and another user as "Transfer to". Click "Transfer". 6. Verify you are asked to confirm the number of reports being transferred. Click "Confirm". 7. 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