Bug 36649: Correctly embed biblio when retrieving items when adding to a train
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Mon, 22 Apr 2024 12:33:33 +0000 (14:33 +0200)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 23 May 2024 15:06:39 +0000 (17:06 +0200)
commit27aed4c7e59431bf2d896cb830c28210e930c01a
treeb4a584dd675f35515c2979c4f0a0fc6d72c55a1d
parent69d8b560d9753a5d1192afc267b19602465190f6
Bug 36649: Correctly embed biblio when retrieving items when adding to a train

I didn't find when this regression has been introduced but the third
parameter here is the headers, not parameters, we should not repeat
"headers".

Test plan:
1. Add a new processing that contains columns from the database, for example biblio.title and biblio.author.
2. Create a new train.
3. Add items to the waiting list.
4. Click on "Add last x items to the train" button.
5. Choose the train you created on number 2.
6. Choose the processing you added on number 1.
7. Try to click the Submit button.
=> Without the patch nothing happens and there is a JS error in the
console: Uncaught TypeError: item.biblio is undefined
=> With this patch applied the item is correctly added to the train and
the attribute is properly populated.

Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit 63612311e32a546a6ea1067e0c65ac3199f2f292)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
koha-tmpl/intranet-tmpl/prog/js/vue/components/Preservation/TrainsFormAddItems.vue