Bug 27064: (QA follow-up) Add error message only if we have one defined
This moves the DestinationEqualsHolding error message addition to if clause so the value is added to %err hash only when there is actually an error. Then we only append to the @errmsgloop array the error message if one was defined. To test: 1) Create a hold request to a pickup library where the item currently is not 2) Add transfer to the pickup library using branchtransfers.pl and notice without this patch we get and empty message box but with this patch we don't get it. Signed-off-by: Joonas Kylmälä <joonas.kylmala@helsinki.fi> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
This commit is contained in:
parent
6c1b7df3f6
commit
30fac5c75a
1 changed files with 4 additions and 2 deletions
|
@ -213,8 +213,10 @@ foreach my $code ( keys %$messages ) {
|
|||
$err{patron} = $patron;
|
||||
}
|
||||
}
|
||||
$err{errdesteqholding} = ( $code eq 'DestinationEqualsHolding' );
|
||||
push( @errmsgloop, \%err );
|
||||
elsif ( $code eq 'DestinationEqualsHolding' ) {
|
||||
$err{errdesteqholding} = 1;
|
||||
}
|
||||
push( @errmsgloop, \%err ) if (keys %err);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue