Bug 27064: (QA follow-up) Add error message only if we have one defined
authorJoonas Kylmälä <joonas.kylmala@helsinki.fi>
Mon, 7 Jun 2021 14:07:04 +0000 (17:07 +0300)
committerJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 14 Jun 2021 14:10:15 +0000 (16:10 +0200)
commitad03c9e8f83ee60bd8c7d8df85cc07e0b2326556
tree56619f71c1466e2ecfd9950f493e5467925ac650
parent630468bf08d9ebb62c9e07fb7de85824b64aef42
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>
circ/branchtransfers.pl