From 74a2565c99dc92e390950c7ce340202efba2161c Mon Sep 17 00:00:00 2001 From: Nick Clemens Date: Thu, 18 May 2017 21:08:22 -0400 Subject: [PATCH] Bug 18635: Koha::Patron->guarantees() should return results alphabetically MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit To test: 1 - Add the same guarantor to a number of patrons, ensuring random order alphabetically 2 - View the guarantors record, note unordered list of guarantees 3 - Apply patch 4 - Guarantees are alphabetical Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Nick Clemens (cherry picked from commit fe6cb85c5580b582a0047769d88be23757df0ef5) Signed-off-by: Martin Renvoize --- Koha/Patron.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Koha/Patron.pm b/Koha/Patron.pm index 35cfce4ca1..1005de618d 100644 --- a/Koha/Patron.pm +++ b/Koha/Patron.pm @@ -175,7 +175,7 @@ Returns the guarantees (list of Koha::Patron) of this patron sub guarantees { my ( $self ) = @_; - return Koha::Patrons->search( { guarantorid => $self->borrowernumber } ); + return Koha::Patrons->search( { guarantorid => $self->borrowernumber }, { order_by => { -asc => ['surname','firstname'] } } ); } =head3 housebound_profile -- 2.39.5