Bug 36156: None value selected on clone field/subfield linked to AV
authorThibaud Guillot <thibaud.guillot@biblibre.com>
Fri, 23 Feb 2024 12:12:42 +0000 (13:12 +0100)
committerKatrin Fischer <katrin.fischer@bsz-bw.de>
Thu, 7 Mar 2024 14:02:40 +0000 (15:02 +0100)
commited037fb2740418816b192abe06a250193ad05e40
treee997487353fb68f7ab0aeb99ed20a928e5dc336f
parentfa745c3b1d13643e08cacd0cf3a0cb10d25fd8ec
Bug 36156: None value selected on clone field/subfield linked to AV

When a field or subfield is linked to a list of authorized values and cloned, the selected value is repeated in the clone. This is linked to the default behavior of Select2Utils, so I've added a precise index (-1) to ensure that no value is selected in the clone.

Test plan:

1) Create a repeatable field and subfield and link a list of authorised values to the subfield.
2) Edit a record, clone the field and see which value is automatically selected in the clone.
3) Apply the patch
4) Repeat step 2

Sponsored by : BibLibre

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
koha-tmpl/intranet-tmpl/prog/js/cataloging.js