Bug 16852 - Remove C4::Members::GetBorrowerCategorycode
Summary: Remove C4::Members::GetBorrowerCategorycode
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 15407
Blocks: 16846
  Show dependency treegraph
 
Reported: 2016-07-04 17:08 UTC by Jonathan Druart
Modified: 2017-06-14 22:15 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16852: Remove GetBorrowerCategorycode (2.58 KB, patch)
2016-07-04 17:15 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16852: Remove GetBorrowerCategorycode (2.57 KB, patch)
2016-09-15 08:01 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16852: Remove GetBorrowerCategorycode (2.62 KB, patch)
2016-10-13 12:55 UTC, Claire Gravely
Details | Diff | Splinter Review
[PASSED QA] Bug 16852: Remove GetBorrowerCategorycode (2.69 KB, patch)
2016-11-01 22:14 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 Jonathan Druart 2016-07-04 17:08:05 UTC

    
Comment 1 Jonathan Druart 2016-07-04 17:15:12 UTC Comment hidden (obsolete)
Comment 2 Srdjan Jankovic 2016-07-20 00:36:01 UTC
This would ideally go one step further:

If we are doing Koha::Patrons->find( $data{borrowernumber} ) there's no reason to do it again a couple of lines below:

C4/Members.pm:

my $rs = $schema->resultset('Borrower')->search({
        borrowernumber => $new_borrower->{borrowernumber},
     });


tools/modborrowers.pl:

Two for my $borrowernumber ( @borrowernumbers ) {} loops should be merged
Comment 3 Jonathan Druart 2016-07-20 14:36:08 UTC
(In reply to Srdjan Jankovic from comment #2)

Hi Srdjan,
Yes you are right, both remarks are valid.
I'd prefer to do that changes on another report.
Comment 4 Jonathan Druart 2016-09-15 08:01:20 UTC
Created attachment 55579 [details] [review]
Bug 16852: Remove GetBorrowerCategorycode

And use Koha::Patron->categorycode instead

Test plan:
- Restrict a patron attribute to a patron category
- Use the batch patron modification tool to update a patron of this
  category
You should not see the the patron attribute
Comment 5 Claire Gravely 2016-10-13 12:55:10 UTC
Created attachment 56388 [details] [review]
Bug 16852: Remove GetBorrowerCategorycode

And use Koha::Patron->categorycode instead

Test plan:
- Restrict a patron attribute to a patron category
- Use the batch patron modification tool to update a patron of this
  category
You should not see the the patron attribute

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Comment 6 Katrin Fischer 2016-11-01 22:14:54 UTC
Created attachment 57057 [details] [review]
[PASSED QA] Bug 16852: Remove GetBorrowerCategorycode

And use Koha::Patron->categorycode instead

Test plan:
- Restrict a patron attribute to a patron category
- Use the batch patron modification tool to update a patron of this
  category
You should not see the the patron attribute

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 7 Kyle M Hall 2016-11-02 10:57:01 UTC
Pushed to master for 16.11, thanks Jonathan!
Comment 8 Mason James 2016-11-30 08:19:39 UTC
enhancement, passing for 16.05