Bug 34818 - Cannot perform batch patron modification without selecting a patron attribute
Summary: Cannot perform batch patron modification without selecting a patron attribute
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Katrin Fischer
URL:
Keywords:
Depends on: 21083
Blocks:
  Show dependency treegraph
 
Reported: 2023-09-18 15:22 UTC by Owen Leonard
Modified: 2023-11-02 20:25 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes an issue with batch patron modifications that was introduced by bug 21083 - you can now successfully perform a batch update without needing to select patron attributes. Previously, if you submitted a batch of patrons for modification, you needed to select a patron attribute or the process will fail with an error trace.
Version(s) released in:
23.11.00


Attachments
Bug 34818: (bug 21083 follow-up) Fix batch patron modification tool (1.19 KB, patch)
2023-09-18 17:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 34818: (bug 21083 follow-up) Fix batch patron modification tool (1.24 KB, patch)
2023-09-18 19:28 UTC, David Nind
Details | Diff | Splinter Review
Bug 34818: (bug 21083 follow-up) Fix batch patron modification tool (1.29 KB, patch)
2023-09-18 19:32 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2023-09-18 15:22:32 UTC
I've been testing batch patron modification while working on Bug 33927 and have found that if I submit a batch of patrons for modification I have to select a patron attribute or the process will fail:

Can't call method "category_code" on an undefined value at /kohadevbox/koha/tools/modborrowers.pl line 407

It doesn't appear to matter how the batch is submitted, whether it be cardnumbers, borrowernumbers, or patron list.

It looks to me like Bug 21083 is the cause.
Comment 1 Jonathan Druart 2023-09-18 17:05:33 UTC
Created attachment 155854 [details] [review]
Bug 34818: (bug 21083 follow-up) Fix batch patron modification tool

It is not possible to perform batch patron modification without selecting
a patron attribute

Test plan:
Test the batch patron modification tool, with or without extended
attributes.

The error was
Can't call method "category_code" on an undefined value at /kohadevbox/koha/tools/modborrowers.pl line 407
Comment 2 David Nind 2023-09-18 19:28:24 UTC
Created attachment 155859 [details] [review]
Bug 34818: (bug 21083 follow-up) Fix batch patron modification tool

It is not possible to perform batch patron modification without selecting
a patron attribute

Test plan:
Test the batch patron modification tool, with or without extended
attributes.

The error was
Can't call method "category_code" on an undefined value at /kohadevbox/koha/tools/modborrowers.pl line 407

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 Katrin Fischer 2023-09-18 19:32:09 UTC
Created attachment 155860 [details] [review]
Bug 34818: (bug 21083 follow-up) Fix batch patron modification tool

It is not possible to perform batch patron modification without selecting
a patron attribute

Test plan:
Test the batch patron modification tool, with or without extended
attributes.

The error was
Can't call method "category_code" on an undefined value at /kohadevbox/koha/tools/modborrowers.pl line 407

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 David Nind 2023-09-18 19:38:28 UTC
Testing notes using KTD:

1. Used patrons listed at the end to test.

2. Was able to replicate the issue.

3. Changed library location and set up a patron attribute to test.

4. Noted that with Patron attributes, if you tick the box 'check to delete this field' but put a different value in the field, it updates with the new value rather than deleting. Not sure whether this is intended behavour.


Patrons used for testing:

23529000035676
23529001000463
23529000050113

19
45
5
Comment 5 Tomás Cohen Arazi 2023-09-19 19:36:00 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 6 Fridolin Somers 2023-09-21 06:05:24 UTC
Depends on Bug 21083 not yet in 23.05.x
Comment 7 Fridolin Somers 2023-11-02 20:25:29 UTC
Depends in Bug 21083 not in 23.05.x