Bug 17725 - Repeating a field or subfield clones content
Summary: Repeating a field or subfield clones content
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 17817
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-05 22:42 UTC by Katrin Fischer
Modified: 2019-06-27 09:24 UTC (History)
6 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 17725: Do not copy subfield's content when cloning (2.07 KB, patch)
2017-01-12 11:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 17725: Same for textarea when cloning a field (1.19 KB, patch)
2017-01-13 07:52 UTC, Jonathan Druart
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 17725: Do not copy subfield's content when cloning (2.14 KB, patch)
2017-01-13 08:04 UTC, Josef Moravec
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 17725: Same for textarea when cloning a field (1.26 KB, patch)
2017-01-13 08:04 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 17725: Do not copy subfield's content when cloning (2.18 KB, patch)
2017-01-13 11:07 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 17725: Same for textarea when cloning a field (1.30 KB, patch)
2017-01-13 11:07 UTC, Nick Clemens
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2016-12-05 22:42:46 UTC
To replicate:
- Open an existing record in your catalog
- Create another field or subfield of a field/subfield already used using the icon to repeat it
- Verify that the content is copied over
- Verify this happens for input (one line) and textare (multiple lines)

I can't make this happen for when creating a new record, but more consistently on editing existing records.

This is rather annoying when cataloguing in Koha, as the cataloguer has to empty the field first and that adds an extra step for each repeated field.
Comment 1 Jonathan Druart 2017-01-12 11:19:12 UTC
Created attachment 58867 [details] [review]
Bug 17725: Do not copy subfield's content when cloning

To replicate:
- Open an existing record in your catalog
- Create another field or subfield of a field/subfield already used using the icon to repeat it
- Verify that the content is copied over
- Verify this happens for input (one line) and textare (multiple lines)

I can't make this happen for when creating a new record, but more consistently on editing existing records.

This is rather annoying when cataloguing in Koha, as the cataloguer has to empty the field first and that adds an extra step for each repeated field.

Test plan:
Confirm than the content is not copied when you clone a field or a subfield.
Comment 2 Claire Gravely 2017-01-12 19:11:46 UTC
I have been unable to fully replicate the issue, but have found one occurance of an "input" field including content when copied.
I have successfully replicated the issue with texarea fields (multiple lines).

When testing I find the patch has fixed my single "input" field issue.

But the "textarea" field still includes content when cloned. Specifically this was 520 $a. Content is still copying across
Comment 3 Josef Moravec 2017-01-13 06:57:09 UTC
Yes there still remains last occurence of this bug - textareas when clonning whole field - typically 5xx in MARC21
Comment 4 Katrin Fischer 2017-01-13 07:11:20 UTC
Something that might be good to test: When an input field contains a lot of text, next time you open the record it will be shown as a textarea. The 5xx seem to always display as a textarea.
Comment 5 Jonathan Druart 2017-01-13 07:52:58 UTC
Created attachment 58914 [details] [review]
Bug 17725: Same for textarea when cloning a field
Comment 6 Jonathan Druart 2017-01-13 07:53:52 UTC
(In reply to Josef Moravec from comment #3)
> Yes there still remains last occurence of this bug - textareas when clonning
> whole field - typically 5xx in MARC21

Fixed!
Comment 7 Josef Moravec 2017-01-13 08:04:13 UTC
Created attachment 58915 [details] [review]
[SIGNED-OFF] Bug 17725: Do not copy subfield's content when cloning

To replicate:
- Open an existing record in your catalog
- Create another field or subfield of a field/subfield already used using the icon to repeat it
- Verify that the content is copied over
- Verify this happens for input (one line) and textare (multiple lines)

I can't make this happen for when creating a new record, but more consistently on editing existing records.

This is rather annoying when cataloguing in Koha, as the cataloguer has to empty the field first and that adds an extra step for each repeated field.

Test plan:
Confirm than the content is not copied when you clone a field or a subfield.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 8 Josef Moravec 2017-01-13 08:04:19 UTC
Created attachment 58916 [details] [review]
[SIGNED-OFF] Bug 17725: Same for textarea when cloning a field

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 9 Josef Moravec 2017-01-13 08:04:52 UTC
(In reply to Katrin Fischer from comment #4)
> Something that might be good to test: When an input field contains a lot of
> text, next time you open the record it will be shown as a textarea. The 5xx
> seem to always display as a textarea.

Tested, and looks fine
Comment 10 Katrin Fischer 2017-01-13 08:31:12 UTC
(In reply to Josef Moravec from comment #9)
> (In reply to Katrin Fischer from comment #4)
> > Something that might be good to test: When an input field contains a lot of
> > text, next time you open the record it will be shown as a textarea. The 5xx
> > seem to always display as a textarea.
> 
> Tested, and looks fine

Thx, Josef!
Comment 11 Nick Clemens 2017-01-13 11:07:17 UTC
Created attachment 58944 [details] [review]
Bug 17725: Do not copy subfield's content when cloning

To replicate:
- Open an existing record in your catalog
- Create another field or subfield of a field/subfield already used using the icon to repeat it
- Verify that the content is copied over
- Verify this happens for input (one line) and textare (multiple lines)

I can't make this happen for when creating a new record, but more consistently on editing existing records.

This is rather annoying when cataloguing in Koha, as the cataloguer has to empty the field first and that adds an extra step for each repeated field.

Test plan:
Confirm than the content is not copied when you clone a field or a subfield.

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 12 Nick Clemens 2017-01-13 11:07:23 UTC
Created attachment 58945 [details] [review]
Bug 17725: Same for textarea when cloning a field

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 13 Kyle M Hall 2017-01-13 11:26:25 UTC
Pushed to master for 17.05, thanks Jonathan!
Comment 14 Katrin Fischer 2017-01-15 16:23:07 UTC
These patches have been pushed to 16.11.x and will be in 16.11.02.
.
Comment 15 Mason James 2017-01-25 00:30:16 UTC
Blocked by enhancement, skipping for 16.05.x