Summary: | Add Koha::Patron->category | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | josef.moravec, kyle, mtj, tomascohen |
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | --- |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: | ||
Bug Depends on: | |||
Bug Blocks: | 17556, 17578, 17604 | ||
Attachments: |
Bug 17555: Add Koha::Patron->category
[SIGNED-OFF] Bug 17555: Add Koha::Patron->category Bug 17555: Add Koha::Patron->category |
Description
Jonathan Druart
2016-11-04 15:17:07 UTC
Created attachment 57211 [details] [review] Bug 17555: Add Koha::Patron->category We need to use the DBIx::Class relationship to retrieve the patron category. It is more convenient to have a Koha::Patron->category method to retrieve the category of a given patron. Test plan: Make sure that the tests in t/db_dependent/Koha/Patron* return green (In reply to Jonathan Druart from comment #1) > Test plan: > Make sure that the tests in t/db_dependent/Koha/Patron* return green Note that t/db_dependent/Koha/Patron/Messages.t is broken in master. Created attachment 57224 [details] [review] [SIGNED-OFF] Bug 17555: Add Koha::Patron->category We need to use the DBIx::Class relationship to retrieve the patron category. It is more convenient to have a Koha::Patron->category method to retrieve the category of a given patron. Test plan: Make sure that the tests in t/db_dependent/Koha/Patron* return green Signed-off-by: Josef Moravec <josef.moravec@gmail.com> With combination of 1st patch from 17558 also Messages.t pass... Why do u use Koha::Patron::Category->_new_from_dbic instead of Koha::Patron::Categories->find($self->categorycode)? (In reply to Tomás Cohen Arazi from comment #5) > Why do u use Koha::Patron::Category->_new_from_dbic instead of > Koha::Patron::Categories->find($self->categorycode)? Because we want to use the DBIx::Class relationship Created attachment 57495 [details] [review] Bug 17555: Add Koha::Patron->category We need to use the DBIx::Class relationship to retrieve the patron category. It is more convenient to have a Koha::Patron->category method to retrieve the category of a given patron. Test plan: Make sure that the tests in t/db_dependent/Koha/Patron* return green Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Pushed to master for 16.11, thanks Jonathan! enhancement, passing for 16.05 |