https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251

--- Comment #29 from Paul Derscheid <[email protected]> ---
Created attachment 203150
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203150&action=edit
Bug 41251: (QA follow-up) Fix serial prompt handlers

The no-prompt single-item handler referenced an undeclared event variable,
raising a JavaScript error and bypassing validation. The linked-serial path
also opened the prompt without first validating the item form.

The batch modal handlers used malformed form selectors, preventing either
modal choice from submitting the batch edit.

Bind the save buttons in JavaScript, validate single-item edits before showing
the prompt, and correct the batch form selectors. Keep restricted item fields
disabled while the prompt is open and prepare them only when the form is
actually submitted. This also removes the inline event handlers from both
workflows.

Test plan:
1. Set EditLinkedSerialIssues to "Don't prompt."
2. Edit an item, clear a mandatory field, and click "Save changes."
3. Confirm that validation prevents submission, then correct the field.
4. Save again and confirm that the item is updated without a JavaScript error
   or serial editing prompt.
5. Set EditLinkedSerialIssues to "Prompt" and edit a linked serial item.
6. Clear a mandatory field and confirm that "Save changes" shows validation
   instead of the serial editing prompt.
7. Correct the field, save again, and confirm that the prompt appears.
8. Test each prompt choice and confirm that the item is saved in both cases;
   choosing to edit the issue should also open the serial issue editor.
9. With restricted item editing permission, open and dismiss the prompt using
   Escape or its backdrop. Confirm restricted fields remain disabled.
10. Batch-edit a linked serial item together with another item.
11. Test both batch prompt choices and confirm that the batch edit is submitted
    in both cases; choosing to edit issues should open the serial issue editor.
12. Set EditLinkedSerialIssues to "Don't prompt," repeat the batch edit, and
    confirm that it submits without displaying the prompt.

Assisted-by: GPT-5.6 (OpenAI)

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to