Bug 16232: Fix edit as new in Rancor
authorAgustin Moyano <agustinmoyano@theke.io>
Tue, 23 Apr 2019 00:50:49 +0000 (00:50 +0000)
committerNick Clemens <nick@bywatersolutions.com>
Thu, 25 Apr 2019 10:02:34 +0000 (10:02 +0000)
commit680dd7f340ef445820864045127da9c65b3be0e2
tree0afb92e961b0945726845770a740b896d680a709
parent4e2c74fced685db861a78fc1aa151dd35ad0d5f2
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>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
cataloguing/addbiblio.pl
koha-tmpl/intranet-tmpl/prog/en/includes/cateditor-ui.inc