@@ -, +, @@ --- catalogue/stockrotation.pl | 3 ++- misc/cronjobs/stockrotation.pl | 2 +- tools/stockrotation.pl | 7 ++++++- 3 files changed, 9 insertions(+), 3 deletions(-) --- a/catalogue/stockrotation.pl +++ a/catalogue/stockrotation.pl @@ -78,7 +78,8 @@ if (!defined $op) { }, { join => 'stockrotationstages', - collapse => 1 + collapse => 1, + order_by => 'title' } ); --- a/misc/cronjobs/stockrotation.pl +++ a/misc/cronjobs/stockrotation.pl @@ -500,7 +500,7 @@ sub emit { #### Main Code # Compile Stockrotation Report data -my $rotas = Koha::StockRotationRotas->search; +my $rotas = Koha::StockRotationRotas->search(undef,{ order_by => { '-asc' => 'title' }}); my $data = $rotas->investigate; # Perform db updates if requested --- a/tools/stockrotation.pl +++ a/tools/stockrotation.pl @@ -69,7 +69,12 @@ my $op = $params{op}; if (!defined $op) { # No operation is supplied, we're just displaying the list of rotas - my $rotas = Koha::StockRotationRotas->search->as_list; + my $rotas = Koha::StockRotationRotas->search( + undef, + { + order_by => { -asc => 'title' } + } + )->as_list; $template->param( existing_rotas => $rotas, --