Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib
Summary: Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 17216
Blocks: 15799 23912 17249
  Show dependency treegraph
 
Reported: 2016-09-05 14:00 UTC by Jonathan Druart
Modified: 2019-10-28 14:59 UTC (History)
2 users (show)

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


Attachments
Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib (17.25 KB, patch)
2016-09-05 14:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib (17.27 KB, patch)
2016-09-05 15:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib (17.33 KB, patch)
2016-09-06 20:47 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib (17.07 KB, patch)
2016-09-08 17:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
[PASSED QA] Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib (17.13 KB, patch)
2016-10-12 12:36 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-09-05 14:00:54 UTC
The subroutine C4::Koha::GetKohaAuthorisedValueLib just retrieves a description (lib) for a given authorised value.

We can easily replace it using:
  Koha::AuthorisedValues->search({ category => $cat, authorised_value => $av })->lib
or
  Koha::AuthorisedValues->search({ category => $cat, authorised_value => $av })->opac_description
Comment 1 Jonathan Druart 2016-09-05 14:13:24 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-09-05 15:26:46 UTC Comment hidden (obsolete)
Comment 3 Claire Gravely 2016-09-05 22:37:43 UTC
could not apply bug 17216 (depends on)
CONFLICT (content): Merge conflict in koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
Failed to merge in the changes.
Comment 4 Jonathan Druart 2016-09-06 07:21:47 UTC
(In reply to Claire Gravely from comment #3)
> could not apply bug 17216 (depends on)
> CONFLICT (content): Merge conflict in
> koha-tmpl/intranet-tmpl/prog/en/modules/admin/authorised_values.tt
> Failed to merge in the changes.

Rebased.
Comment 5 Claire Gravely 2016-09-06 20:47:27 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2016-09-08 17:47:20 UTC
Created attachment 55377 [details] [review]
Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib

The subroutine C4::Koha::GetKohaAuthorisedValueLib just retrieves a description
(lib) for a given authorised value.

We can easily replace it using:
  Koha::AuthorisedValues->search({ category => $cat, authorised_value => $av })->lib
or
  Koha::AuthorisedValues->search({ category => $cat, authorised_value => $av })->opac_description

Test plan:
- On the detail page of a bibliographic record, the description for notforloan,
restricted and stack (?) should be correctly displayed
- View a shelf, the location (LOC) description should be displayed
- On the search result page, the location description should be displayed in the
  facets
- Set AcqCreateItem=ordering and receiving items.
The description for notforloan, restricted, location, ccode, etc. field
should be displayed.
- When creating item in the acquisition module, the dropdown list for
  field linked to AV should display the AV' descriptions
- On the transfers page, the description of the location should be
  displayed.
- On the checkout list from the circulation.pl and returns.pl pages, the
  description for "materials" should be displayed
- Fill some OPAC_SUG AV and create a suggestion, the reason dropdown
  list should display the description of OPAC_SUG

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Comment 7 Jonathan Druart 2016-09-08 17:47:36 UTC
just a rebase.
Comment 8 Katrin Fischer 2016-10-12 12:36:23 UTC
Created attachment 56267 [details] [review]
[PASSED QA] Bug 17248 - Koha::AuthorisedValues - Remove GetKohaAuthorisedValueLib

The subroutine C4::Koha::GetKohaAuthorisedValueLib just retrieves a description
(lib) for a given authorised value.

We can easily replace it using:
  Koha::AuthorisedValues->search({ category => $cat, authorised_value => $av })->lib
or
  Koha::AuthorisedValues->search({ category => $cat, authorised_value => $av })->opac_description

Test plan:
- On the detail page of a bibliographic record, the description for notforloan,
restricted and stack (?) should be correctly displayed
- View a shelf, the location (LOC) description should be displayed
- On the search result page, the location description should be displayed in the
  facets
- Set AcqCreateItem=ordering and receiving items.
The description for notforloan, restricted, location, ccode, etc. field
should be displayed.
- When creating item in the acquisition module, the dropdown list for
  field linked to AV should display the AV' descriptions
- On the transfers page, the description of the location should be
  displayed.
- On the checkout list from the circulation.pl and returns.pl pages, the
  description for "materials" should be displayed
- Fill some OPAC_SUG AV and create a suggestion, the reason dropdown
  list should display the description of OPAC_SUG

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

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 9 Brendan Gallagher 2016-10-13 15:23:49 UTC
Pushed to Master - Should be in the November 16.11 Release.  Thanks!