Bug 31179 - Duplicate item is duplicating internal item fields
Summary: Duplicate item is duplicating internal item fields
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low critical
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords: rel_21_11_candidate
: 31285 (view as bug list)
Depends on: 27526
Blocks:
  Show dependency treegraph
 
Reported: 2022-07-18 17:01 UTC by Nick Clemens (kidclamp)
Modified: 2023-09-14 10:46 UTC (History)
9 users (show)

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


Attachments
Bug 31179: Don't copy invisible subfields when duplicating items (4.69 KB, patch)
2022-07-19 14:11 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 31179: Don't copy invisible subfields when duplicating items (4.74 KB, patch)
2022-07-19 15:30 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 31179: (QA follow-up) POD fix (764 bytes, patch)
2022-07-19 15:30 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 31179: (QA follow-up) Set field as hidden for tests (1.06 KB, patch)
2022-07-19 15:30 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 31179: Don't copy invisible subfields when duplicating items (4.79 KB, patch)
2022-07-19 18:07 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 31179: (QA follow-up) POD fix (819 bytes, patch)
2022-07-19 18:07 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 31179: (QA follow-up) Set field as hidden for tests (1.12 KB, patch)
2022-07-19 18:07 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2022-07-18 17:01:05 UTC
Duplicate item is intended to duplicate the visible cataloging fields of an item, however, currently it is duplicating the complete internal record of the item

To recreate:
1 - find an item in Koha staff client, copy the barcode
2 - Issue this item to a patron
3 - Return to the record
4 - Edit items
5 - Click 'Actions->Duplicate' for the item in question
6 - Save the item
7 - Note in the items table above for that 'Total checkouts' 'Due date'
 etc. have been copied to new item
Comment 1 Jonathan Druart 2022-07-19 13:51:59 UTC
If this is a regression it's certainly coming from bug 27526.
Comment 2 Jonathan Druart 2022-07-19 14:11:03 UTC
Created attachment 137872 [details] [review]
Bug 31179: Don't copy invisible subfields when duplicating items

Duplicate item is intended to duplicate the visible cataloging fields of an item, however,
currently it is duplicating the complete internal record of the item

To recreate:
1 - find an item in Koha staff client, copy the barcode
2 - Issue this item to a patron
3 - Return to the record
4 - Edit items
5 - Click 'Actions->Duplicate' for the item in question
6 - Save the item
7 - Note in the items table above for that 'Total checkouts' 'Due date'
 etc. have not been copied to new item
Comment 3 Nick Clemens (kidclamp) 2022-07-19 15:30:34 UTC
Created attachment 137875 [details] [review]
Bug 31179: Don't copy invisible subfields when duplicating items

Duplicate item is intended to duplicate the visible cataloging fields of an item, however,
currently it is duplicating the complete internal record of the item

To recreate:
1 - find an item in Koha staff client, copy the barcode
2 - Issue this item to a patron
3 - Return to the record
4 - Edit items
5 - Click 'Actions->Duplicate' for the item in question
6 - Save the item
7 - Note in the items table above for that 'Total checkouts' 'Due date'
 etc. have not been copied to new item

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Nick Clemens (kidclamp) 2022-07-19 15:30:37 UTC
Created attachment 137876 [details] [review]
Bug 31179: (QA follow-up) POD fix

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Nick Clemens (kidclamp) 2022-07-19 15:30:41 UTC
Created attachment 137877 [details] [review]
Bug 31179: (QA follow-up) Set field as hidden for tests

We want the tests to pass in the case where field is set to visibile in Koha

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Tomás Cohen Arazi (tcohen) 2022-07-19 18:07:13 UTC
Created attachment 137881 [details] [review]
Bug 31179: Don't copy invisible subfields when duplicating items

Duplicate item is intended to duplicate the visible cataloging fields of an item, however,
currently it is duplicating the complete internal record of the item

To recreate:
1 - find an item in Koha staff client, copy the barcode
2 - Issue this item to a patron
3 - Return to the record
4 - Edit items
5 - Click 'Actions->Duplicate' for the item in question
6 - Save the item
7 - Note in the items table above for that 'Total checkouts' 'Due date'
 etc. have not been copied to new item

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 7 Tomás Cohen Arazi (tcohen) 2022-07-19 18:07:19 UTC
Created attachment 137882 [details] [review]
Bug 31179: (QA follow-up) POD fix

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 8 Tomás Cohen Arazi (tcohen) 2022-07-19 18:07:24 UTC
Created attachment 137883 [details] [review]
Bug 31179: (QA follow-up) Set field as hidden for tests

We want the tests to pass in the case where field is set to visibile in Koha

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 9 Tomás Cohen Arazi (tcohen) 2022-07-20 12:10:08 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 10 Michael Spagnuolo 2022-08-03 19:57:29 UTC
Any chance this can be backported to 21.11. We just upgraded to 21.11 and have started to notice this duplicate item behavior.
Comment 11 Sara Brown 2022-08-05 18:22:30 UTC
+1 - backporting would be helpful! Libraries might not notice the internal duplication until after the fact, which may make cleanup difficult.
Comment 12 Jonathan Druart 2022-08-09 10:39:09 UTC
*** Bug 31285 has been marked as a duplicate of this bug. ***
Comment 13 Jonathan Druart 2022-08-09 10:41:00 UTC
Upping severity. Lucas, Arthur, don't forget to backport this one for the next release!
Comment 14 Lucas Gass (lukeg) 2022-08-12 14:35:51 UTC
Backported to 22.05.x for 22.05.04
Comment 15 Arthur Suzuki 2022-08-16 08:45:06 UTC
pushed to 21.11.x for 21.11.11
Comment 16 Victor Grousset/tuxayo 2022-08-19 20:23:16 UTC
Missing dependencies for 21.05.x, it shouldn't be affected, no backport.
Nothing to document, marking resolved.