Bug 17818 - Duplicating a subfield yields an empty subfield tag [follow-up]
authorSophie Meynieux <sophie.meynieux@biblibre.com>
Wed, 28 Dec 2016 14:04:51 +0000 (15:04 +0100)
committerJulian Maurice <julian.maurice@biblibre.com>
Wed, 10 May 2017 11:24:15 +0000 (13:24 +0200)
The problem is the same as Bug 17477 but also for dropdown selection list

Steps to reproduce error:
- On the cataloging screen (basic screen), create a new record
- Go to a field with repetable subfields and associated with authorised values
- Select a value for the subfield
 583$x)
 - Clone the subfield
 - select another value for the new subfield
 - Save the record
 - Edit the record to modify => the clone subfield has desappeared.
If you look in DB in marcxml, the subfield is present but without code

 - Apply patch
 - Clean cache browser and reload page
 - Repeat steps above
 - Verify that works as expected

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>

koha-tmpl/intranet-tmpl/prog/en/js/cataloging.js

index edd48da..0b8e9bb 100644 (file)
@@ -281,6 +281,7 @@ function CloneSubfield(index, advancedMARCEditor){
         id_input = selects[i].getAttribute('id')+new_key;
         selects[i].setAttribute('id',selects[i].getAttribute('id')+new_key);
         selects[i].setAttribute('name',selects[i].getAttribute('name')+new_key);
+        linkid = id_input;
     }
 
     // textarea