Bug 17152 - Duplicating a subfield should not copy the data
Summary: Duplicating a subfield should not copy the data
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Héctor Eduardo Castro Avalos
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 17477
  Show dependency treegraph
 
Reported: 2016-08-19 14:25 UTC by Sophie MEYNIEUX
Modified: 2017-06-14 22:14 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17152: Do not copy value when duplicating a subfield (1.34 KB, patch)
2016-08-23 17:25 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 17152: Do not copy value when duplicating a subfield (1.44 KB, patch)
2016-08-29 20:49 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 17152: (counter-patch)Do not copy value when duplicating a subfield (2.07 KB, patch)
2016-08-31 19:32 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 17152: (counter-patch)Do not copy value when duplicating a subfield (2.07 KB, patch)
2016-08-31 19:36 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
Bug 17152: (counter-patch)Do not copy value when duplicating a subfield (2.12 KB, patch)
2016-09-06 10:07 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17152: Do not copy value when duplicating a subfield (2.17 KB, patch)
2016-09-07 10:02 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Sophie MEYNIEUX 2016-08-19 14:25:25 UTC
When cataloguing, if you want to duplicate a subfield that is not empty, the new subfield is created with a copy of data in it.
This is not the case when you duplicate an whole field. The new one is created with subfields but without data in it.
Comment 1 Jonathan Druart 2016-08-23 17:25:42 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2016-08-29 20:49:32 UTC Comment hidden (obsolete)
Comment 3 Nick Clemens 2016-08-31 16:10:28 UTC
The value is no longer copied, but neither is the subfield code

Example:
I copy 260$b
I get a new blank 260$_ (though the field description states "Name of publisher, distributor, etc"

We should copy the subfield code but not the contents
Comment 4 Héctor Eduardo Castro Avalos 2016-08-31 19:32:47 UTC Comment hidden (obsolete)
Comment 5 Héctor Eduardo Castro Avalos 2016-08-31 19:36:00 UTC Comment hidden (obsolete)
Comment 6 Nick Clemens 2016-09-06 10:07:16 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2016-09-07 10:02:49 UTC
Created attachment 55276 [details] [review]
Bug 17152: Do not copy value when duplicating a subfield

When cataloguing, if you want to duplicate a subfield that is not
empty, the new subfield is created with a copy of data in it.
This is not the case when you duplicate an whole field. The new one is
created with subfields but without data in it.

Test plan:
Add or edit a bibliographic record
Fill a subfield
Duplicate the subfield
=> Without this patch the value of the input will be copied
=> With this patch the new input will be emptied

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Kyle M Hall 2016-09-08 13:02:36 UTC
Pushed to master for 16.11, thanks Hector!
Comment 9 Frédéric Demians 2016-09-08 20:12:38 UTC
Pushed in 16.05. Will be in 16.05.04.
Comment 10 Julian Maurice 2016-09-16 08:33:18 UTC
Pushed to 3.22.x, will be in 3.22.11
Comment 11 Tomás Cohen Arazi 2016-10-20 14:25:02 UTC
Nick's comment still applies on master and 16.05. This patch broke subfield cloning. I opened bug 17477 with evidence of this.