Bug 20323

Summary: Batch patron modification tool broken
Product: Koha Reporter: Josef Moravec <josef.moravec>
Component: Architecture, internals, and plumbingAssignee: Josef Moravec <josef.moravec>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: cslone, nick, roch.damour
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 18403    
Bug Blocks:    
Attachments: Bug 20323: Fix batch patron modification tool
Bug 20323: Fix batch patron modification tool
Bug 20323: Fix batch patron modification tool

Description Josef Moravec 2018-03-02 10:12:25 UTC
From tools/modborrowers.pl

341 if ( $patron ) {
342     $patron = $patron->unblessed;
343     $patron->{category_description} = $patron->category->description;

This was added by bug 18403 and leads (obviosly) to error:
Can't call method "category" on unblessed reference at /home/vagrant/kohaclone/tools/modborrowers.pl
Comment 1 Josef Moravec 2018-03-02 10:18:29 UTC
Created attachment 72347 [details] [review]
Bug 20323: Fix batch patron modification tool

Test plan:
1) Go to Tools -> Batch patrons modification
2) Select some patrons and try to change any field
--> without patch - it exploads with log:
Can't call method "category" on unblessed reference at /home/vagrant/kohaclone/tools/modborrowers.pl
--> with patch - the modification is properly made
Comment 2 Roch D'Amour 2018-03-02 20:39:10 UTC
Created attachment 72384 [details] [review]
Bug 20323: Fix batch patron modification tool

Test plan:
1) Go to Tools -> Batch patrons modification
2) Select some patrons and try to change any field
--> without patch - it exploads with log:
Can't call method "category" on unblessed reference at /home/vagrant/kohaclone/tools/modborrowers.pl
--> with patch - the modification is properly made

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>
Comment 3 Katrin Fischer 2018-03-08 21:10:29 UTC
Created attachment 72541 [details] [review]
Bug 20323: Fix batch patron modification tool

Test plan:
1) Go to Tools -> Batch patrons modification
2) Select some patrons and try to change any field
--> without patch - it exploads with log:
Can't call method "category" on unblessed reference at /home/vagrant/kohaclone/tools/modborrowers.pl
--> with patch - the modification is properly made

Signed-off-by: Roch D'Amour <roch.damour@inlibro.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Nick Clemens 2018-03-15 09:22:02 UTC
Pushed to master for 18.05, thanks to all for your hard work.
Comment 5 Nick Clemens 2018-03-23 10:34:57 UTC
Depends on 18403 which is not in stable, not backporting for 17.11