Bug 17477: Duplicating a subfield yields an empty subfield tag
authorHector Castro <hector.hecaxmmx@gmail.com>
Thu, 20 Oct 2016 14:57:46 +0000 (08:57 -0600)
committerKyle M Hall <kyle@bywatersolutions.com>
Fri, 21 Oct 2016 14:12:22 +0000 (14:12 +0000)
The problem only when clone a textareas in 5XX

Steps to reproduce error:
- On the cataloging screen (basic screen), create a new record
- Go to the 5xx fields
- Put something on the 521$a subfield or other textareas (e.g. 520$u or
 583$x)
- Clone the subfield
=> FAIL: The subfield correctly doesn't include the original data,
BUT it doesn't have the subtield tag either.

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

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
koha-tmpl/intranet-tmpl/prog/js/cataloging.js

index 6f55930..ee03961 100644 (file)
@@ -288,6 +288,7 @@ function CloneSubfield(index, advancedMARCEditor){
         id_input = textareas[i].getAttribute('id')+new_key;
         textareas[i].setAttribute('id',textareas[i].getAttribute('id')+new_key);
         textareas[i].setAttribute('name',textareas[i].getAttribute('name')+new_key);
+        linkid = id_input;
     }
 
     // Handle click event on buttonDot for plugin