Bug 21048: (QA follow-up) Fix authorized value statuses in filter

If you select an authorized value status in the filter, you want to keep
it too just like normal statuses as CHECKED.
The variable selected_status was not filled. The minimal fix is adding that
template variable in the script. Note that suggestion.STATUS is out of scope
within a loop using suggestion as loop var.

Note: Adding a regular status like CHECKED as an authorized value with
same code but another description works, but is kind of confusing ;) Not
in the scope of this report though.

Test plan:
Select an authval status in the filter. Apply the filter and verify again
that it is still selected under Suggestion information.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit b1e8193a84)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Marcel de Rooy 2018-07-27 09:42:06 +02:00 committed by Martin Renvoize
parent e81fdb07c6
commit f5121183d9
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
1 changed files with 6 additions and 1 deletions

View File

@ -353,7 +353,12 @@ foreach my $budget ( @{$budgets} ) {
}
$template->param( budgetsloop => \@budgets_loop);
$template->param( "statusselected_$$suggestion_ref{'STATUS'}" =>1) if ($$suggestion_ref{'STATUS'});
if( $suggestion_ref->{STATUS} ) {
$template->param(
"statusselected_".$suggestion_ref->{STATUS} => 1,
selected_status => $suggestion_ref->{STATUS}, # We need template var selected_status in the second part of the template where template var suggestion.STATUS is out of scope
);
}
my @currencies = Koha::Acquisition::Currencies->search;
$template->param(