Bug 15783 - C4::Koha::AddAuthorisedValue can be replaced with Koha::AuthorisedValue->new->store
Summary: C4::Koha::AddAuthorisedValue can be replaced with Koha::AuthorisedValue->new-...
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
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 15779 15800
  Show dependency treegraph
 
Reported: 2016-02-10 10:36 UTC by Jonathan Druart
Modified: 2017-06-14 22:05 UTC (History)
2 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:
Circulation function:


Attachments
Bug 15783: AddAuthorisedValue - Replace existing calls (2.29 KB, patch)
2016-02-10 10:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15783: AddAuthorisedValue - Remove the subroutine (5.42 KB, patch)
2016-02-10 10:41 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 15783: AddAuthorisedValue - Replace existing calls (2.43 KB, patch)
2016-02-11 13:03 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15783: AddAuthorisedValue - Remove the subroutine (5.55 KB, patch)
2016-02-11 13:04 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 15783: AddAuthorisedValue - Replace existing calls (2.48 KB, patch)
2016-02-12 19:29 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 15783: AddAuthorisedValue - Remove the subroutine (5.60 KB, patch)
2016-02-12 19:29 UTC, Kyle M Hall (khall)
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-10 10:36:52 UTC
The C4::Koha::AddAuthorisedValue is only called twice from reports/guided_reports.pl and insert an authorised value.
This job can be achieve easily using the Koha::AuthorisedValue module.
Comment 1 Jonathan Druart 2016-02-10 10:41:38 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2016-02-10 10:41:41 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2016-02-11 13:03:04 UTC Comment hidden (obsolete)
Comment 4 Marc Véron 2016-02-11 13:04:51 UTC Comment hidden (obsolete)
Comment 5 Kyle M Hall (khall) 2016-02-12 19:29:19 UTC
Created attachment 48021 [details] [review]
Bug 15783: AddAuthorisedValue - Replace existing calls

The C4::Koha::AddAuthorisedValue is only called twice from
reports/guided_reports.pl and insert an authorised value.
This job can be achieve easily using the Koha::AuthorisedValue module.

Test plan:
1/ Create a new guided report
2/ Use an existing group and/or subgroup of reports
3/ Save
4/ Update an existing report
5/ Use an existing group and/or subgroup of reports
6/ Save
7/ Create or update an existing report
8/ Remove its assigned group and subgroup
9/ Save

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 6 Kyle M Hall (khall) 2016-02-12 19:29:45 UTC
Created attachment 48022 [details] [review]
Bug 15783: AddAuthorisedValue - Remove the subroutine

Test plan:
  prove t/db_dependent/Koha.t
should return green

  git grep AddAuthorisedValue
should not return any results

Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 7 Brendan Gallagher 2016-02-24 03:47:33 UTC
Pushed to Master - Should be in the May 2016 release.  Thanks!