Bug 27127: Make Koha::BackgroundJob->messages return a scalar
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Tue, 1 Dec 2020 14:35:11 +0000 (15:35 +0100)
committerFridolin Somers <fridolin.somers@biblibre.com>
Mon, 28 Dec 2020 13:51:28 +0000 (14:51 +0100)
commit6331d5302ac83b7b2871c2fa52cbed970c7d5274
treebea5afa23980aebac460350adeaf1cbce134e263
parent05ba6b702e1e267ec110c83f0b3e133a023d7948
Bug 27127: Make Koha::BackgroundJob->messages return a scalar

Otherwise the code in the template is not handled correctly:
112                     [% FOR m IN job.messages %]

m will become each key/val of the message hash:
{"type":"success","biblionumber":"1","code":"biblio_modified"}
And not the whole hash

Test plan:
Modify one biblio using the batch record modification tool
Modify two biblios using the batch record modification tool
Go to the detail view of each job and confirm that with this patch the
display is correct

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit c5efece0dc8db3a1438bab40afbcaa7f164f2f75)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Koha/BackgroundJob.pm