[Koha-bugs] [Bug 23166] Simplify code related to orders in catalogue/*detail.pl

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Mon Aug 24 16:54:06 CEST 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23166

Nick Clemens <nick at bywatersolutions.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #104370|0                           |1
        is obsolete|                            |

--- Comment #20 from Nick Clemens <nick at bywatersolutions.com> ---
Created attachment 108996
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=108996&action=edit
Bug 23166: Call the methods from the .inc

We do not longer need the order variables to be passed from the
controllers, we can call the methods on the biblio object instead.

There is something wrong with our ->search method and TT behaviours, it
is hard to retrieve object list in a scalar context.
If [% objects.method.count %] is called, objects.method will get the
first object of the list and count will explode (Koha::Object->count
does not exist)

We need to force the call in a scalar context to retrieve an iterator
and prevent to fetch all the objects (we could have called all then
size, but it's not efficient)

If adopted I will move the plugin on a separate bug report to ease
backport

Signed-off-by: Nick Clemens <nick at bywatersolutions.com>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list