[Bug 16158] New: GetAuthorisedValues should not be called inside a loop
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 Bug ID: 16158 Summary: GetAuthorisedValues should not be called inside a loop Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org Depends on: 16157 There are no needs to call this subroutine inside a loop (bug 16157 has removed the selected flag). Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16157 [Bug 16157] C4::Koha::GetAuthorisedValues should not handle the selected option -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 49644 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49644&action=edit 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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mtompset@hotmail.com --- Comment #2 from M. Tompsett <mtompset@hotmail.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Patch doesn't apply --- Comment #3 from M. Tompsett <mtompset@hotmail.com> --- Please rebase. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to M. Tompsett from comment #3)
Please rebase.
Apply cleanly on top of bug 16157. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 --- Comment #5 from M. Tompsett <mtompset@hotmail.com> --- (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. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 M. Tompsett <mtompset@hotmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49644|0 |1 is obsolete| | --- Comment #6 from M. Tompsett <mtompset@hotmail.com> --- Created attachment 49959 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49959&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49959|0 |1 is obsolete| | --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 50048 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=50048&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16158 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m Status|Passed QA |Pushed to Master --- Comment #8 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the May 2016 Release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org