Bug 15783

Summary: C4::Koha::AddAuthorisedValue can be replaced with Koha::AuthorisedValue->new->store
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Architecture, internals, and plumbingAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: brendan, veron
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 15779, 15800    
Attachments: Bug 15783: AddAuthorisedValue - Replace existing calls
Bug 15783: AddAuthorisedValue - Remove the subroutine
Bug 15783: AddAuthorisedValue - Replace existing calls
Bug 15783: AddAuthorisedValue - Remove the subroutine
Bug 15783: AddAuthorisedValue - Replace existing calls
Bug 15783: AddAuthorisedValue - Remove the subroutine

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 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 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!