Bug 17152 made the subfield cloning function delete the contents of the cloned subfield. But it makes the subfield tag empty too, and this is causing troubles for people re-opening the records for edition. Bug 17477 fix this for textareas, but the problem is the same with dropdown box selection
Created attachment 58470 [details] [review] Bug 17817 - Duplicating a subfield yields an empty subfield tag [follow-up] 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
Created attachment 58471 [details] [review] Bug 17818 - Duplicating a subfield yields an empty subfield tag [follow-up] 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
wrong bug number in first commit message, sorry
I have tried testing this, but I had a lot of problems. My configuration: I created a new field and subfield 991$a, linked to CCODE for testing. The field and the subfield are marked as repeatable. Problem 0: - Try to repeat the field without filling in a value - It will not work, there is a JavaScript error message: TypeError: divs[i].getAttribute(...) is null cataloging.js:100:12 Problem 1: - Select a value for the subfield - Repeat the field - The value is copied form the original field into the repeated field (should be empty) Problem 2: - Try to clear the value in the repeated field using the X in the pull down. - It won't work. Problem 3: - Try to open the pull down in the repeated field - It won't work. I am not sure what's going on there, but something appears seriously wrong and makes it impossible to test this. I have restarted Plack, memcached and reloaded the page multiple times clearing the cache.
I filed a separate bug for the behaviour I saw - bug 17863. Would be nice if someone could retest.
I can't reproduce it on current master... can someone confirm?
Hi Joseph, we fixed Bug 17817 - Repeat this Tag (cloning) not working after I tested this, it's possible that this fixed the problem.
I cannot recreate either. Marked as duplicate of bug 17817. *** This bug has been marked as a duplicate of bug 17817 ***
Reopened as it is still a bug on 3.22.19
Pushed to 3.22.x for 3.22.21
This bug affects the latest 16.05 release (16.05.17) as well: when you clone a repeatable dropdown subfield the cloned subfield's tag is empty. If you then save the record and re-open it, the cloned subfield is not shown at all (even though it is present in the DB's marcxml column as Sophie pointed out). The next time you save the record, the subfield is gone for good :( If you try to reproduce this bug, please note that it's only the cloning of dropdown subfields that is broken in 16.05.17. Cloning of textarea subfields works fine.
Andreas, please open a new bug report and link it to this one. This one has been marked as pushed and should not be reopened.