Bug 16232 - Edit as new (duplicate) doesn't work correctly with Rancor
Summary: Edit as new (duplicate) doesn't work correctly with Rancor
Status: Pushed to Stable
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Target Milestone: ---
Assignee: Agustín Moyano
QA Contact: Josef Moravec
URL:
Whiteboard:
Keywords:
Depends on: 22748
Blocks:
  Show dependency treegraph
 
Reported: 2016-04-08 18:42 UTC by Jesse Weaver
Modified: 2019-05-16 01:19 UTC (History)
8 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.05


Attachments
Bug 16232: Fix edit as new in Rancor (3.91 KB, patch)
2019-04-23 02:52 UTC, Agustín Moyano
Details | Diff | Splinter Review
Bug 16232: Fix edit as new in Rancor (3.97 KB, patch)
2019-04-24 12:20 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16232: Fix edit as new in Rancor (4.02 KB, patch)
2019-04-24 12:40 UTC, Josef Moravec
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Weaver 2016-04-08 18:42:11 UTC
Marked as bug because the behavior is confusing (shows empty record but saves over old record).
Comment 1 Brian 2018-12-15 18:52:02 UTC
Any updates

Carnegie Team
Comment 2 Katrin Fischer 2019-02-10 21:05:44 UTC
It looks like the current record is opened instead of a 'copy' of it that will save as new. This can cause unwanted data loss, updating severity.
Comment 3 Agustín Moyano 2019-04-23 02:52:11 UTC
Created attachment 88401 [details] [review]
Bug 16232: Fix edit as new in Rancor

When you edit a biblio as new, and you have enabled advanced editor,
current record was opened, and was overwritten when saved. This patch
effectively opens a new record based on the one selected.

To test:
1) Enable "EnableAdvancedCatalogingEditor" preference
2) Go to cataloguing and click on advanced editor to save preference to the cookie
3) Search for an item in catalog
4) Click in "Edit as new (duplicate)"
5) Advanced editor should appear.
CHECK => browser url ends with #catalog/{original biblionumber}
      => Title above toolbar is "Editing catalog record #{original biblionumber}"
6) Apply this patch
7) Repeat steps 3 to 5
SUCCESS => browser url ends with #duplicate/{original biblionumber}
        => Title above toolbar is "Editing duplicate record of #{original biblionumber}"
8) Save
SUCCESS => browser url ends with #catalog/{new biblionumber}
        => Title above toolbar is "Editing catalog record #{new biblionumber}"
9) Sign off

Sponsored-by: Carnegie
Comment 4 Kyle M Hall 2019-04-24 12:20:24 UTC
Created attachment 88617 [details] [review]
Bug 16232: Fix edit as new in Rancor

When you edit a biblio as new, and you have enabled advanced editor,
current record was opened, and was overwritten when saved. This patch
effectively opens a new record based on the one selected.

To test:
1) Enable "EnableAdvancedCatalogingEditor" preference
2) Go to cataloguing and click on advanced editor to save preference to the cookie
3) Search for an item in catalog
4) Click in "Edit as new (duplicate)"
5) Advanced editor should appear.
CHECK => browser url ends with #catalog/{original biblionumber}
      => Title above toolbar is "Editing catalog record #{original biblionumber}"
6) Apply this patch
7) Repeat steps 3 to 5
SUCCESS => browser url ends with #duplicate/{original biblionumber}
        => Title above toolbar is "Editing duplicate record of #{original biblionumber}"
8) Save
SUCCESS => browser url ends with #catalog/{new biblionumber}
        => Title above toolbar is "Editing catalog record #{new biblionumber}"
9) Sign off

Sponsored-by: Carnegie

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Josef Moravec 2019-04-24 12:40:44 UTC
Created attachment 88618 [details] [review]
Bug 16232: Fix edit as new in Rancor

When you edit a biblio as new, and you have enabled advanced editor,
current record was opened, and was overwritten when saved. This patch
effectively opens a new record based on the one selected.

To test:
1) Enable "EnableAdvancedCatalogingEditor" preference
2) Go to cataloguing and click on advanced editor to save preference to the cookie
3) Search for an item in catalog
4) Click in "Edit as new (duplicate)"
5) Advanced editor should appear.
CHECK => browser url ends with #catalog/{original biblionumber}
      => Title above toolbar is "Editing catalog record #{original biblionumber}"
6) Apply this patch
7) Repeat steps 3 to 5
SUCCESS => browser url ends with #duplicate/{original biblionumber}
        => Title above toolbar is "Editing duplicate record of #{original biblionumber}"
8) Save
SUCCESS => browser url ends with #catalog/{new biblionumber}
        => Title above toolbar is "Editing catalog record #{new biblionumber}"
9) Sign off

Sponsored-by: Carnegie

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>
Comment 6 Nick Clemens 2019-04-25 11:51:46 UTC
Awesome work all!

Pushed to master for 19.05
Comment 7 Martin Renvoize 2019-04-26 15:11:08 UTC
Pushed to 18.11.x for 18.11.05
Comment 8 Lucas Gass 2019-05-16 01:19:25 UTC
missing dependency for 18.05.x, no backport