https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42306 --- Comment #2 from Brendan Lawlor <blawlor@clamsnet.org> --- Created attachment 212326 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=212326&action=edit Bug 42306: Add split save button when editing an item Adding items and editing items share additem.pl and additem.tt After editing an existing item and clicking 'Save changes', you would end up on the 'Add item form' which was confusing. This patch replaces 'Save changes' with a split 'Save' button, like the one in the bibliographic record editor and the pattern from bug 40191: - Save (Default) => go to catalogue/detail.pl for the record - Save and view record => same as default - Save and view item => go to catalogue/moredetail.pl for the item - Save and continue editing => go to 1. Go to a bib record's detail page and click 'Edit' on any item 2. Make a change (e.g. public note) and click 'Save changes' 3. Note you land on the 'Add item' form for the record (additem.pl?biblionumber=X), not on the item you just edited 4. Apply patch, restart_all 5. Edit the item again => Note the 'Save changes' button is now a split 'Save' button 6. Make a change and click 'Save' => You are taken to the record's detail page (detail.pl), holdings tab, and the change is shown in the holdings table 7. Edit the item again, make a change, open the dropdown next to 'Save' and choose 'Save and continue editing' => You stay on the 'Edit item #N' form for the same item, and the change is shown in the form 8. Refresh the page => The browser does not ask to resubmit the form and the change is still there 9. Make a change and choose 'Save and view record' => Same as step 6 10. Edit the item again, make a change, and choose 'Save and view item' from the dropdown => You are taken to the item details page (moredetail.pl), scrolled to the item you edited, and the change is shown 11. Edit the item, leave a mandatory subfield empty and try each save option => The usual 'mandatory fields' alert appears and nothing is saved 12. Error handling: edit the item and enter a barcode that already exists on another item, then click 'Save' => 'Barcode must be unique' warning is shown and you remain on the 'Edit item #N' form (previously the form switched to 'Add item') 13. Serials: enable 'Create an item record when receiving this serial' on a subscription, receive an issue so it has a linked item, then edit that item from the record a. Click 'Save' => The 'Edit serial issue' modal appears b. Click 'Save item without editing serial issue' => You are taken to the record's detail page c. Edit again, choose 'Save and continue editing', then 'Save item without editing serial issue' => You stay on the item edit form d. Edit again, click 'Save', then 'Edit serial issue' => You are taken to serials-edit.pl as before 14. Run the Cypress tests: yarn cypress run --spec t/cypress/integration/Cataloguing/EditItemSave_spec.ts => All tests pass Sponsored-by: CLAMS Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> -- You are receiving this mail because: You are watching all bug changes.