Bug 31288

Summary: Check userenv in ->disown_or_delete
Product: Koha Reporter: Marcel de Rooy <m.de.rooy>
Component: Architecture, internals, and plumbingAssignee: Marcel de Rooy <m.de.rooy>
Status: CLOSED FIXED QA Contact: Tomás Cohen Arazi (tcohen) <tomascohen>
Severity: normal    
Priority: P5 - low CC: lucas, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29144
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00
Circulation function:
Bug Depends on: 30933    
Bug Blocks:    
Attachments: Bug 31288: (QA follow-up) Check userenv in disown_or_delete
Bug 31288: (QA follow-up) Check userenv in disown_or_delete
Bug 31288: Regression tests
Bug 31288: (QA follow-up) Check userenv in disown_or_delete

Description Marcel de Rooy 2022-08-03 11:17:32 UTC
See bug 30933 comment38.
Comment 1 Marcel de Rooy 2022-08-03 11:29:21 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2022-08-03 11:30:04 UTC
This patch can be viewed as a late QA follow-up for the RM follow-up ;)
Comment 3 Marcel de Rooy 2022-08-03 11:34:10 UTC
Created attachment 138526 [details] [review]
Bug 31288: (QA follow-up) Check userenv in disown_or_delete

Test plan:
Run t/db_dependent/Koha/Virtualshelves.t
Set ListOwnershipUponPatronDeletion to change and leave pref
ListOwnerDesignated empty.
Run t/db_dependent/Koha/AdditionalContents.t
* Without this patch, the test would fail in this context.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Tomás Cohen Arazi (tcohen) 2022-08-03 14:45:02 UTC
Created attachment 138542 [details] [review]
Bug 31288: Regression tests

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 5 Tomás Cohen Arazi (tcohen) 2022-08-03 14:45:07 UTC
Created attachment 138543 [details] [review]
Bug 31288: (QA follow-up) Check userenv in disown_or_delete

Test plan:
1. Apply the regression tests
2. Run:
   $ kshell
  k$ t/db_dependent/Koha/Virtualshelves.t
=> FAIL: Tests fail!
3. Apply this patch
4. Repeat 2
=> SUCCESS: Tests pass!
5. Sign off :-D

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 6 Tomás Cohen Arazi (tcohen) 2022-08-03 14:50:32 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Tomás Cohen Arazi (tcohen) 2022-08-03 14:50:56 UTC
Good catch, Marcel. Thanks for the patch.
Comment 8 Lucas Gass (lukeg) 2022-09-29 16:54:50 UTC
Missing dependencies for 22.05.x, no backport