Bug 16158 - GetAuthorisedValues should not be called inside a loop
Summary: GetAuthorisedValues should not be called inside a loop
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 (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 16157
Blocks:
  Show dependency treegraph
 
Reported: 2016-03-29 16:07 UTC by Jonathan Druart
Modified: 2016-12-05 21:27 UTC (History)
2 users (show)

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


Attachments
Bug 16158: Move GetAuthorisedValues outside the loop (10.60 KB, patch)
2016-03-29 16:14 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16158: Move GetAuthorisedValues outside the loop (10.65 KB, patch)
2016-04-06 12:30 UTC, Mark Tompsett
Details | Diff | Splinter Review
Bug 16158: Move GetAuthorisedValues outside the loop (10.75 KB, patch)
2016-04-08 07:28 UTC, Marcel de Rooy
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-03-29 16:07:22 UTC
There are no needs to call this subroutine inside a loop (bug 16157 has removed the selected flag).
Comment 1 Jonathan Druart 2016-03-29 16:14:01 UTC Comment hidden (obsolete)
Comment 2 Mark Tompsett 2016-04-06 00:50:03 UTC
(In reply to Jonathan Druart from comment #0)
> There are no needs to call this subroutine inside a loop (bug 16157 has
> removed the selected flag).

Agreed. The Authorized Value Name for the item fields isn't going to change, since the Biblio is the same which keeps the framework code the same.
Comment 3 Mark Tompsett 2016-04-06 01:11:44 UTC
Please rebase.
Comment 4 Jonathan Druart 2016-04-06 10:22:50 UTC
(In reply to M. Tompsett from comment #3)
> Please rebase.

Apply cleanly on top of bug 16157.
Comment 5 Mark Tompsett 2016-04-06 10:53:53 UTC
(In reply to Jonathan Druart from comment #4)
> (In reply to M. Tompsett from comment #3)
> > Please rebase.
> 
> Apply cleanly on top of bug 16157.

DOH! Sorry, I missed that. It does.
Comment 6 Mark Tompsett 2016-04-06 12:30:07 UTC Comment hidden (obsolete)
Comment 7 Marcel de Rooy 2016-04-08 07:28:22 UTC
Created attachment 50048 [details] [review]
Bug 16158: Move GetAuthorisedValues outside the loop

In catalogue/detail.pl and catalogue/moredetail.pl, the
GetAuthorisedValues subroutine is called once per item. It's not needed,
only 1 call is enough.

Test plan:
Edit item and view a catalogue record.
The withdrawn, lost and damaged values should be correctly
displayed/saved.

Signed-off-by: Mark Tompsett <mtompset@hotmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 8 Brendan Gallagher 2016-04-27 16:30:39 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!