Bug 17477

Summary: Duplicating a subfield yields an empty subfield tag
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: CatalogingAssignee: Héctor Eduardo Castro Avalos <hector.hecaxmmx>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: major    
Priority: P5 - low CC: f.demians, hector.hecaxmmx, jonathan.druart, josef.moravec, julian.maurice, kyle, m.de.rooy, nick
Version: 16.05   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17818
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19503
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 17152    
Bug Blocks:    
Attachments: No subfield tag
Bug 17477 - Duplicating a subfield yields an empty subfield tag
Bug 17477: Duplicating a subfield yields an empty subfield tag
Bug 17477: Duplicating a subfield yields an empty subfield tag

Description Tomás Cohen Arazi 2016-10-20 14:09:55 UTC
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.
Comment 1 Tomás Cohen Arazi 2016-10-20 14:10:20 UTC
Created attachment 56697 [details]
No subfield tag
Comment 2 Tomás Cohen Arazi 2016-10-20 14:12:29 UTC
Steps to reproduce:
- On the cataloging screen, create a new record
- Go to the 5xx fields
- Put something on the 521$a subfield
- Clone the subfield
=> FAIL: The subfield correctly doesn't include the original data, BUT it doesn't have the subtield tag either.
Comment 3 Héctor Eduardo Castro Avalos 2016-10-20 15:02:18 UTC
Created attachment 56700 [details] [review]
Bug 17477 - Duplicating a subfield yields an empty subfield tag

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
Comment 4 Tomás Cohen Arazi 2016-10-20 15:19:54 UTC
Created attachment 56704 [details] [review]
Bug 17477: Duplicating a subfield yields an empty subfield tag

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>
Comment 5 Kyle M Hall 2016-10-21 14:12:47 UTC
Created attachment 56722 [details] [review]
Bug 17477: Duplicating a subfield yields an empty subfield tag

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>
Comment 6 Kyle M Hall 2016-10-21 14:21:20 UTC
Pushed to master for 16.11, thanks Hector!

Kyle
Comment 7 Frédéric Demians 2016-10-22 12:57:28 UTC
Pushed in 16.05. Will be in 16.05.05.
Comment 8 Julian Maurice 2016-10-24 10:37:10 UTC
Pushed in 3.22.x, will be in 3.22.12