Bug 15803 - Koha::AuthorisedValues - Remove GetAuthorisedValueCategories
Summary: Koha::AuthorisedValues - Remove GetAuthorisedValueCategories
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: 15797 15801
Blocks: 15799 17537
  Show dependency treegraph
 
Reported: 2016-02-11 15:27 UTC by Jonathan Druart
Modified: 2018-06-04 20:10 UTC (History)
4 users (show)

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


Attachments
Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories (28.30 KB, patch)
2016-02-11 15:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories (27.30 KB, patch)
2016-06-05 17:05 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories (27.32 KB, patch)
2016-08-10 07:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories (27.39 KB, patch)
2016-08-23 00:58 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories (26.54 KB, patch)
2016-10-14 09:30 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories (26.61 KB, patch)
2016-10-14 13:34 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories (26.51 KB, patch)
2016-10-28 15:59 UTC, Jonathan Druart
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-02-11 15:27:57 UTC
The subroutine C4::Koha::GetAuthorisedValueCategories just retrieves all the authorised value categories.
We already have a method in the Koha::AuthorisedValues module to do this job, let's use it!
Comment 1 Jonathan Druart 2016-02-11 15:41:22 UTC Comment hidden (obsolete)
Comment 2 Chris Cormack 2016-06-03 11:26:28 UTC
I applied 15801, but when I try to  apply this one it wont apply
Comment 3 Jonathan Druart 2016-06-05 17:05:57 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2016-08-10 07:26:05 UTC Comment hidden (obsolete)
Comment 5 Aleisha Amohia 2016-08-23 00:58:41 UTC
Created attachment 54731 [details] [review]
[SIGNED-OFF] Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories

The subroutine C4::Koha::GetAuthorisedValueCategories just retrieves all
the authorised value categories.
We already have a method in the Koha::AuthorisedValues module to do this
job, let's use it!

Technical explanations:
The new subroutine of the AuthorisedValues TT plugin will allow to get
the authorised value categories from the templates.
The new html_helpers include file will get rid of the if selected else
end statements. Bug 15758 already uses this file, see the commit
description for more informations.

Test plan:
1/ Create or edit a new fund (aqbudgets.pl), the fields "statistic 1"
and "statistic 2" should be correctly filled with the list of authorised
value categories
2/ Edit subfields for a biblio and authority framework.
The "Authorized value" dropdown list should be correctly filled on both
pages
3/ Create new items search fields (from the administration area), same
as previously, the authorised value category dropdown list should be
correctly filled
4/ Add and edit patron attribute types, check the authorised value
category list.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 6 Nick Clemens 2016-10-14 08:24:40 UTC
Tried on top of 15801, needs a rebase
Comment 7 Jonathan Druart 2016-10-14 09:30:33 UTC
Created attachment 56497 [details] [review]
Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories

The subroutine C4::Koha::GetAuthorisedValueCategories just retrieves all
the authorised value categories.
We already have a method in the Koha::AuthorisedValues module to do this
job, let's use it!

Technical explanations:
The new subroutine of the AuthorisedValues TT plugin will allow to get
the authorised value categories from the templates.
The new html_helpers include file will get rid of the if selected else
end statements. Bug 15758 already uses this file, see the commit
description for more informations.

Test plan:
1/ Create or edit a new fund (aqbudgets.pl), the fields "statistic 1"
and "statistic 2" should be correctly filled with the list of authorised
value categories
2/ Edit subfields for a biblio and authority framework.
The "Authorized value" dropdown list should be correctly filled on both
pages
3/ Create new items search fields (from the administration area), same
as previously, the authorised value category dropdown list should be
correctly filled
4/ Add and edit patron attribute types, check the authorised value
category list.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Comment 8 Jonathan Druart 2016-10-14 09:31:09 UTC
FYI,

 FAIL   koha-tmpl/intranet-tmpl/prog/en/includes/admin-items-search-field-form.inc
   FAIL   valid_template
                options_for_authorised_value_categories: not found

Is a false positive
Comment 9 Nick Clemens 2016-10-14 13:34:28 UTC
Created attachment 56540 [details] [review]
Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories

The subroutine C4::Koha::GetAuthorisedValueCategories just retrieves all
the authorised value categories.
We already have a method in the Koha::AuthorisedValues module to do this
job, let's use it!

Technical explanations:
The new subroutine of the AuthorisedValues TT plugin will allow to get
the authorised value categories from the templates.
The new html_helpers include file will get rid of the if selected else
end statements. Bug 15758 already uses this file, see the commit
description for more informations.

Test plan:
1/ Create or edit a new fund (aqbudgets.pl), the fields "statistic 1"
and "statistic 2" should be correctly filled with the list of authorised
value categories
2/ Edit subfields for a biblio and authority framework.
The "Authorized value" dropdown list should be correctly filled on both
pages
3/ Create new items search fields (from the administration area), same
as previously, the authorised value category dropdown list should be
correctly filled
4/ Add and edit patron attribute types, check the authorised value
category list.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 10 Kyle M Hall 2016-10-28 15:01:34 UTC
Jonathan, can you please rebase this patch? Thanks!
Comment 11 Jonathan Druart 2016-10-28 15:59:02 UTC
Created attachment 56960 [details] [review]
Bug 15803: Koha::AuthorisedValues - Remove C4::Koha::GetAuthorisedValueCategories

The subroutine C4::Koha::GetAuthorisedValueCategories just retrieves all
the authorised value categories.
We already have a method in the Koha::AuthorisedValues module to do this
job, let's use it!

Technical explanations:
The new subroutine of the AuthorisedValues TT plugin will allow to get
the authorised value categories from the templates.
The new html_helpers include file will get rid of the if selected else
end statements. Bug 15758 already uses this file, see the commit
description for more informations.

Test plan:
1/ Create or edit a new fund (aqbudgets.pl), the fields "statistic 1"
and "statistic 2" should be correctly filled with the list of authorised
value categories
2/ Edit subfields for a biblio and authority framework.
The "Authorized value" dropdown list should be correctly filled on both
pages
3/ Create new items search fields (from the administration area), same
as previously, the authorised value category dropdown list should be
correctly filled
4/ Add and edit patron attribute types, check the authorised value
category list.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 12 Kyle M Hall 2016-10-28 16:39:15 UTC
Pushed to master for 16.11, thanks Jonathan!
Comment 13 Mason James 2016-12-14 12:05:17 UTC
Enhancement, skipping for 16.05.x