Bug 42740: Fix suggestion status when editing
To test: 1. Make a purchase suggestion. 2. Set the status to something, anything. 3. Edit that suggestion, notice that the "Status:" is set to 'No Status' 4. Now when you save, they actual status is lost. 5. APPLY PATCH, restart_all 6. Try steps 1 - 3. This time at step 3 the suggestion status should be properly set. 7. Save the suggestion, make sure it saves with the correct status. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> Signed-off-by: Pedro Amorim <pedro.amorim@openfifth.co.uk>
This commit is contained in:
parent
d1476c8184
commit
86b2eb9a3a
|
|
@ -549,11 +549,12 @@ foreach my $r ( @{$sugg_budgets} ) {
|
|||
@{$sugg_budget_loop} = sort { uc( $a->{b_txt} ) cmp uc( $b->{b_txt} ) } @{$sugg_budget_loop};
|
||||
$template->param( sugg_budgets => $sugg_budget_loop );
|
||||
|
||||
if ( $suggestion_ref->{STATUS} ) {
|
||||
if ( $stored_suggestion && $stored_suggestion->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
|
||||
"statusselected_" . $stored_suggestion->STATUS => 1,
|
||||
selected_status => $stored_suggestion->STATUS,
|
||||
|
||||
# We need template var selected_status in the second part of the template where template var suggestion.STATUS is out of scope
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue