[Bug 30933] New: Add a fallback for keeping lists when deleting anonymized patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Bug ID: 30933 Summary: Add a fallback for keeping lists when deleting anonymized patrons Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Lists Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Follow-up of 11889 -- 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=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |25498 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25498 [Bug 25498] Cannot change owner of list -- 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=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |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=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add a fallback for keeping |Add a designated fallback |lists when deleting |owner for shared and public |anonymized patrons |lists at patron deletion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Add a designated fallback |Add a designated owner for |owner for shared and public |shared and public lists at |lists at patron deletion |patron deletion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 136420 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136420&action=edit Bug 30933: Database revision (new pref) Adds pref ListOwnerDesignated. Generalize description of ListOwnershipUponPatronDeletion a bit. Test plan: Run updatedatabase. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 136421 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136421&action=edit Bug 30933: Change for patron->delete Test plan: Run t/db_dependent/Koha/Patrons.t Set pref ListOwnershipUponPatronDeletion to transfer. Set pref ListOwnerDesignated to some valid borrowernumber. Pick a user with public or shared list, delete from interface. Pick a user with public or shared list, delete by script. (*) Verify in both cases that new list owner is the designated one. (*) Tip: Create another branch. Move the patron to be deleted to that branch. And delete by script with: misc/cronjobs/delete_patons.pl -c -v -library YOUR_CODE Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #3 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 136422 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136422&action=edit Bug 30933: Adjust pref description, include ListOwnerDesignated Test plan: View the pref on the System preferences, Patrons tab. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #4 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 136423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136423&action=edit Bug 30933: (follow-up) Consolidate transfer checks Adding shelf->cannot_be_transferred with unit tests. Note: This follow-up actually refers to comment42 on the preceding report 25498. Furthermore, we could still improve later on using error code more effectively (adding codes). Here we concentrate on moving the checks to module level. Test plan: Run t/db_dependent/Virtualshelves.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #5 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 136424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=136424&action=edit Bug 30933: (follow-up) Use cannot_be_transferred in shelves scripts Test plan: Verify if transfer shared list on OPAC still works as expected. Same for intranet counterpart for public lists. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This report adds pref release notes| |ListOwnerDesignated. It | |serves as the new owner of | |public or shared lists when | |a patron is deleted as long | |as | |ListOwnershipUponPatronDele | |tion has been set to | |transfer. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This report adds pref |This report adds pref release notes|ListOwnerDesignated. It |ListOwnerDesignated. It |serves as the new owner of |serves as the new owner of |public or shared lists when |public or shared lists when |a patron is deleted as long |a patron is deleted as long |as |as |ListOwnershipUponPatronDele |ListOwnershipUponPatronDele |tion has been set to |tion has been set to |transfer. |transfer. | | | |Another | |advantage is that deleting | |patrons in scripts or cron | |jobs now allows you to | |preserve their public or | |shared lists. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |martin.renvoize@ptfs-europe | |.com --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Martin, the two follow-up patches cover comment42 on the preceding report. It only reduces the code in the scripts slightly, but offers much more testing opportunities. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136420|0 |1 is obsolete| | --- Comment #7 from David Nind <david@davidnind.com> --- Created attachment 137241 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137241&action=edit Bug 30933: Database revision (new pref) Adds pref ListOwnerDesignated. Generalize description of ListOwnershipUponPatronDeletion a bit. Test plan: Run updatedatabase. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136421|0 |1 is obsolete| | --- Comment #8 from David Nind <david@davidnind.com> --- Created attachment 137242 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137242&action=edit Bug 30933: Change for patron->delete Test plan: Run t/db_dependent/Koha/Patrons.t Set pref ListOwnershipUponPatronDeletion to transfer. Set pref ListOwnerDesignated to some valid borrowernumber. Pick a user with public or shared list, delete from interface. Pick a user with public or shared list, delete by script. (*) Verify in both cases that new list owner is the designated one. (*) Tip: Create another branch. Move the patron to be deleted to that branch. And delete by script with: misc/cronjobs/delete_patons.pl -c -v -library YOUR_CODE Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136422|0 |1 is obsolete| | --- Comment #9 from David Nind <david@davidnind.com> --- Created attachment 137243 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137243&action=edit Bug 30933: Adjust pref description, include ListOwnerDesignated Test plan: View the pref on the System preferences, Patrons tab. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136423|0 |1 is obsolete| | --- Comment #10 from David Nind <david@davidnind.com> --- Created attachment 137244 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137244&action=edit Bug 30933: (follow-up) Consolidate transfer checks Adding shelf->cannot_be_transferred with unit tests. Note: This follow-up actually refers to comment42 on the preceding report 25498. Furthermore, we could still improve later on using error code more effectively (adding codes). Here we concentrate on moving the checks to module level. Test plan: Run t/db_dependent/Virtualshelves.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #136424|0 |1 is obsolete| | --- Comment #11 from David Nind <david@davidnind.com> --- Created attachment 137245 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137245&action=edit Bug 30933: (follow-up) Use cannot_be_transferred in shelves scripts Test plan: Verify if transfer shared list on OPAC still works as expected. Same for intranet counterpart for public lists. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Text to go in the|This report adds pref |This enhancement enables release notes|ListOwnerDesignated. It |the transfer of public list |serves as the new owner of |ownership when a patron is |public or shared lists when |deleted (from both the |a patron is deleted as long |staff interface, and |as |scripts or cron jobs such |ListOwnershipUponPatronDele |as |tion has been set to |misc/cronjobs/delete_patons |transfer. |.pl). A new system | |preference |Another |ListOwnershipUponPatronDele |advantage is that deleting |tion sets the action to |patrons in scripts or cron |take when a patron with |jobs now allows you to |public lists is deleted |preserve their public or |(options: delete the lists |shared lists. |or change owner of these | |lists). If set to change | |the owner, then the lists | |are transferred to the | |borrower number set in the | |new ListOwnerDesignated | |system preference. --- Comment #12 from David Nind <david@davidnind.com> --- Testing notes (using koha-testing-docker): 1. Test plan correction for patch Bug 30933: Change for patron->delete, the script name at the end to delete patrons is not spelt correctly - this should be ..patrons.pl.. not patons.pl: misc/cronjobs/delete_patons.pl -c -v -library YOUR_CODE 2. Testing that lists continue to work after transfer from the staff interface: . Can delete public lists as the super librarian (koha) . Can transfer . Can edit . Can't add or remove items if 'Allow changes to contents from:' is set to 'Owner only', but can change this then add or remove items 2. Testing that lists continue to work as expected after transfer from the OPAC: . If changes can only be made by the owner, another OPAC user can't make any changes (as expected) . If changes can be made by anyone seeing the list, another OPAC user can add and remove items from the list (as expected), can't delete or edit the list (as expected) . If changes can be made by staff only, then they can only delete, edit, etc., if they have the correct permissions (as expected) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to David Nind from comment #11)
Signed-off-by: David Nind <david@davidnind.com>
Thx David. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the|This enhancement enables |This enhancement enables release notes|the transfer of public list |the transfer of public list |ownership when a patron is |ownership when a patron is |deleted (from both the |deleted (from the staff |staff interface, and |interface, and scripts or |scripts or cron jobs such |cron jobs such as |as |misc/cronjobs/delete_patron |misc/cronjobs/delete_patons |s.pl). A new system |.pl). A new system |preference |preference |ListOwnershipUponPatronDele |ListOwnershipUponPatronDele |tion sets the action to |tion sets the action to |take when a patron with |take when a patron with |public lists is deleted |public lists is deleted |(options: delete the lists |(options: delete the lists |or change owner of these |or change owner of these |lists). If set to change |lists). If set to change |the owner, the lists are |the owner, then the lists |transferred to the borrower |are transferred to the |number set in the new |borrower number set in the |ListOwnerDesignated system |new ListOwnerDesignated |preference. |system preference. | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137241|0 |1 is obsolete| | --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137421 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137421&action=edit Bug 30933: Database revision (new pref) Adds pref ListOwnerDesignated. Generalize description of ListOwnershipUponPatronDeletion a bit. Test plan: Run updatedatabase. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137242|0 |1 is obsolete| | --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137422 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137422&action=edit Bug 30933: Change for patron->delete Test plan: Run t/db_dependent/Koha/Patrons.t Set pref ListOwnershipUponPatronDeletion to transfer. Set pref ListOwnerDesignated to some valid borrowernumber. Pick a user with public or shared list, delete from interface. Pick a user with public or shared list, delete by script. (*) Verify in both cases that new list owner is the designated one. (*) Tip: Create another branch. Move the patron to be deleted to that branch. And delete by script with: misc/cronjobs/delete_patons.pl -c -v -library YOUR_CODE Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137243|0 |1 is obsolete| | --- Comment #16 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137423 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137423&action=edit Bug 30933: Adjust pref description, include ListOwnerDesignated Test plan: View the pref on the System preferences, Patrons tab. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137244|0 |1 is obsolete| | --- Comment #17 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137424 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137424&action=edit Bug 30933: (follow-up) Consolidate transfer checks Adding shelf->cannot_be_transferred with unit tests. Note: This follow-up actually refers to comment42 on the preceding report 25498. Furthermore, we could still improve later on using error code more effectively (adding codes). Here we concentrate on moving the checks to module level. Test plan: Run t/db_dependent/Virtualshelves.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137245|0 |1 is obsolete| | --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137425 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137425&action=edit Bug 30933: (follow-up) Use cannot_be_transferred in shelves scripts Test plan: Verify if transfer shared list on OPAC still works as expected. Same for intranet counterpart for public lists. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #19 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I did wonder if we could save ourselves a syspref and just use the anonymous user.. but I decided the clarity here was probably better. All works as expected, QA scripts are happy and tests are passing Passing QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@ptfs-europe |y.org |.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #20 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 137879 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137879&action=edit Bug 30933: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #21 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 137880 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137880&action=edit Bug 30933: Add lists methods for disowning This patch aims to tidy things a bit by doing the following changes: * Koha::Virtualshelf gets the 'transfer_ownership' method * Koha::Virtualshelves gets the 'disown_or_delete' method * Koha::Patron->delete gets rewritten/simplified by using disown_or_delete The idea is to capture the current behavior in more fine grained methods. So current tests should be passing as they do now. To test: 1. Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t \ t/db_dependent/Virtualshelves.t => SUCCESS: Tests pass 2. Apply this patches 3. Repeat 1 => SUCCESS: Tests still pass! 4. Run: k$ prove t/db_dependent/Koha/Virtualshelf.t \ t/db_dependent/Koha/Virtualshelves.t => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Signed Off CC| |tomascohen@gmail.com --- Comment #22 from Tomás Cohen Arazi <tomascohen@gmail.com> --- @Marcel and @Martin. Please review my follow-ups. I'll push the tree if we agree with them. Would like your signature, though. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137879|0 |1 is obsolete| | --- Comment #23 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 137906 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137906&action=edit Bug 30933: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137880|0 |1 is obsolete| | --- Comment #24 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 137907 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137907&action=edit Bug 30933: Add lists methods for disowning This patch aims to tidy things a bit by doing the following changes: * Koha::Virtualshelf gets the 'transfer_ownership' method * Koha::Virtualshelves gets the 'disown_or_delete' method * Koha::Patron->delete gets rewritten/simplified by using disown_or_delete The idea is to capture the current behavior in more fine grained methods. So current tests should be passing as they do now. To test: 1. Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t \ t/db_dependent/Virtualshelves.t => SUCCESS: Tests pass 2. Apply this patches 3. Repeat 1 => SUCCESS: Tests still pass! 4. Run: k$ prove t/db_dependent/Koha/Virtualshelf.t \ t/db_dependent/Koha/Virtualshelves.t => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #25 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Tomás Cohen Arazi from comment #22)
@Marcel and @Martin. Please review my follow-ups. I'll push the tree if we agree with them. Would like your signature, though.
They are fine with me. Please wait a bit still, looking at a small interface issue in the middle patch set. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137421|0 |1 is obsolete| | --- Comment #26 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 137909 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137909&action=edit Bug 30933: Database revision (new pref) Adds pref ListOwnerDesignated. Generalize description of ListOwnershipUponPatronDeletion a bit. Test plan: Run updatedatabase. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137422|0 |1 is obsolete| | --- Comment #27 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 137910 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137910&action=edit Bug 30933: Change for patron->delete Test plan: Run t/db_dependent/Koha/Patrons.t Set pref ListOwnershipUponPatronDeletion to transfer. Set pref ListOwnerDesignated to some valid borrowernumber. Pick a user with public or shared list, delete from interface. Pick a user with public or shared list, delete by script. (*) Verify in both cases that new list owner is the designated one. (*) Tip: Create another branch. Move the patron to be deleted to that branch. And delete by script with: misc/cronjobs/delete_patons.pl -c -v -library YOUR_CODE Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137423|0 |1 is obsolete| | --- Comment #28 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 137911 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137911&action=edit Bug 30933: Adjust pref description, include ListOwnerDesignated Test plan: View the pref on the System preferences, Patrons tab. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137424|0 |1 is obsolete| | --- Comment #29 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 137912 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137912&action=edit Bug 30933: (follow-up) Consolidate transfer checks Adding shelf->cannot_be_transferred with unit tests. Note: This follow-up actually refers to comment42 on the preceding report 25498. Furthermore, we could still improve later on using error code more effectively (adding codes). Here we concentrate on moving the checks to module level. Test plan: Run t/db_dependent/Virtualshelves.t Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137425|0 |1 is obsolete| | --- Comment #30 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 137913 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137913&action=edit Bug 30933: (follow-up) Use cannot_be_transferred in shelves scripts Test plan: Verify if transfer shared list on OPAC still works as expected. Same for intranet counterpart for public lists. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137906|0 |1 is obsolete| | --- Comment #31 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 137914 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137914&action=edit Bug 30933: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137907|0 |1 is obsolete| | --- Comment #32 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 137915 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137915&action=edit Bug 30933: Add lists methods for disowning This patch aims to tidy things a bit by doing the following changes: * Koha::Virtualshelf gets the 'transfer_ownership' method * Koha::Virtualshelves gets the 'disown_or_delete' method * Koha::Patron->delete gets rewritten/simplified by using disown_or_delete The idea is to capture the current behavior in more fine grained methods. So current tests should be passing as they do now. To test: 1. Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t \ t/db_dependent/Virtualshelves.t => SUCCESS: Tests pass 2. Apply this patches 3. Repeat 1 => SUCCESS: Tests still pass! 4. Run: k$ prove t/db_dependent/Koha/Virtualshelf.t \ t/db_dependent/Koha/Virtualshelves.t => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #33 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Rebased Bug 30933: (follow-up) Use cannot_be_transferred in shelves scripts for change on 25498 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #34 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Looks like a great improvement to the code readability to me.. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137914|0 |1 is obsolete| | --- Comment #35 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137916 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137916&action=edit Bug 30933: Unit tests Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #137915|0 |1 is obsolete| | --- Comment #36 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 137917 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=137917&action=edit Bug 30933: Add lists methods for disowning This patch aims to tidy things a bit by doing the following changes: * Koha::Virtualshelf gets the 'transfer_ownership' method * Koha::Virtualshelves gets the 'disown_or_delete' method * Koha::Patron->delete gets rewritten/simplified by using disown_or_delete The idea is to capture the current behavior in more fine grained methods. So current tests should be passing as they do now. To test: 1. Run: $ kshell k$ prove t/db_dependent/Koha/Patrons.t \ t/db_dependent/Virtualshelves.t => SUCCESS: Tests pass 2. Apply this patches 3. Repeat 1 => SUCCESS: Tests still pass! 4. Run: k$ prove t/db_dependent/Koha/Virtualshelf.t \ t/db_dependent/Koha/Virtualshelves.t => SUCCESS: Tests pass! 5. Sign off :-D Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to master Version(s)| |22.11.00 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #37 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 22.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 --- Comment #38 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- - my $userenv = C4::Context->userenv; - return $userenv->{'number'} if $userenv; Replaced by: + $new_owner = C4::Context->userenv->{number}; Will open a new bug. Saw this already: perl t/db_dependent/Koha/AdditionalContents.t 1..5 # Subtest: ->author 1..3 ok 1 - Koha::AdditionalContent->author returns a Koha::Patron object # Looks like you planned 3 tests but ran 1. not ok 4 - ->author # Failed test '->author' # at t/db_dependent/Koha/AdditionalContents.t line 156. {UNKNOWN}: Can't use an undefined value as a HASH reference at /usr/share/koha/Koha/Virtualshelves.pm line 59. at /usr/share/koha/Koha/Virtualshelves.pm line 73 # Looks like your test exited with 255 just after 4. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |31288 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31288 [Bug 31288] Check userenv in ->disown_or_delete -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Bug 30933 depends on bug 25498, which changed state. Bug 25498 Summary: Allow to change owner of public or shared list https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25498 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Bug 30933 depends on bug 25498, which changed state. Bug 25498 Summary: Allow to change owner of public or shared list https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25498 What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |Needs documenting Resolution|FIXED |--- -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com Status|Pushed to master |RESOLVED Resolution|--- |FIXED --- Comment #39 from Lucas Gass <lucas@bywatersolutions.com> --- Enhancement will not be backported to 22.05.x series -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Documentation| |https://gitlab.com/koha-com submission| |munity/koha-manual/-/merge_ | |requests/658 CC| |caroline.cyr-la-rose@inlibr | |o.com Documentation| |Caroline Cyr La Rose contact| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Bug 30933 depends on bug 25498, which changed state. Bug 25498 Summary: Allow to change owner of public or shared list https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25498 What |Removed |Added ---------------------------------------------------------------------------- Status|Needs documenting |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30933 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=39052 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org