[Bug 41251] New: Ability to edit linked serials when editing items needs to be optional
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Bug ID: 41251 Summary: Ability to edit linked serials when editing items needs to be optional Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: lucas@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl Bug 37116 added the ability to edit linked serials when editing items. There is no way to turn this off and it has created some extra clicks and frustration for librarians who do not want the option. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |37116 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37116 [Bug 37116] Add the option to edit linked serials when editing items -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Michelle Spinney <mspinney@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mspinney@clamsnet.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Kris <kbecker@jcls.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kbecker@jcls.org --- Comment #1 from Kris <kbecker@jcls.org> --- Yes please! That would be great if we could have the choice. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Nancy M. <nmumford@clamsnet.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |nmumford@clamsnet.org --- Comment #2 from Nancy M. <nmumford@clamsnet.org> --- We just noticed this today. Very annoying and causing a lot of questions from our member libraries. Please fix. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Chris Pickford <cpickford@sdlawlibrary.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |cpickford@sdlawlibrary.org --- Comment #3 from Chris Pickford <cpickford@sdlawlibrary.org> --- I actually think this is a good enhancement, however, I agree that it would be good to allow libraries to disable it and also to make it a staff permission option. At the library I work at we only permit select staff to edit serials records. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 mteal@greenvillelibrary.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mteal@greenvillelibrary.org --- Comment #4 from mteal@greenvillelibrary.org --- We would also like to be able to turn this question off. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |ephetteplace@cca.edu |ity.org | CC| |ephetteplace@cca.edu -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #5 from Eric Phetteplace <ephetteplace@cca.edu> --- I have a patch for this but it's my first time adding a system preference. The testing steps are lengthy because they essentially have to wrap the steps in Bug 37116. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #6 from Eric Phetteplace <ephetteplace@cca.edu> --- Created attachment 195603 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195603&action=edit Bug 41251: Ability to edit linked serials when editing items needs to be optional This patch adds a new system preference EditLinkedSerialIssues which prompts the user to edit linked serial issues after editing an item that is linked to a serial issue via a subscription. The pref's default is true to preserve the current behavior, while false skips the prompt. We need to test editing a single item and a batch of items, with the sys pref first enabled and then disabled. Test plan: 1. Apply patch and updatedatabase on ktd 2. Serials > New Subscription > Link to a bib record & select When receiving this serial = Create an item record 3. Receive an item then go to the linked bib 4. Edit the item and click save 5. You should be prompted to edit linked serial issue (you can cancel) 6. Receive another item and go to the linked bib again 7. Under the bib's Edit menu select Edit items in a batch 8. Edit both items and click save 9. You should be prompted to edit the issues again 10. Admin > System Preferences > EditLinkedSerialIssues = Don't prompt 11. Repeat steps 3-9 except you should not be prompted -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Status|Needs Signoff |Patch doesn't apply --- Comment #7 from David Nind <david@davidnind.com> --- The patch no longer applies 8-(... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #8 from Eric Phetteplace <ephetteplace@cca.edu> --- Bug 41834 totally restructured sysprefs.sql. This is an easy fix but I am having git bz problems at the moment. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195603|0 |1 is obsolete| | --- Comment #9 from Eric Phetteplace <ephetteplace@cca.edu> --- Created attachment 195855 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195855&action=edit Bug 41251: Ability to edit linked serials when editing items needs to be optional -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Patch doesn't apply |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jvinke@austinseminary.edu Status|Needs Signoff |Failed QA --- Comment #10 from John Vinke <jvinke@austinseminary.edu> --- I set it to failed QA because while I can apply the patch now, the default actually appears to be "don't prompt." -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #11 from Eric Phetteplace <ephetteplace@cca.edu> --- I'm not sure how to proceed, because that's not the default I see. sysprefs.sql line 246 = ('EditLinkedSerialIssues','1'), installer/data/mysql/atomicupdate/bug_41251-EditLinkedSerialIssues_syspref.pl lines 13-14: INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES ('EditLinkedSerialIssues','1',NULL,'If enabled, prompt staff to edit serial issues when editing item(s) on a record with a linked subscription','YesNo') The "1" means True i.e. "Prompt" in this context. Steps: - Apply patch - ktd --shell - updatedatabase - Login to staff side - Administration > Sys Prefs > EditLinkedSerialIssues - Shows "Prompt" Any advice on what might be causing us to receive different results? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195855|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #12 from John Vinke <jvinke@austinseminary.edu> --- Created attachment 195858 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=195858&action=edit Bug 41251: Ability to edit linked serials when editing items needs to be optional This patch adds a new system preference EditLinkedSerialIssues which prompts the user to edit linked serial issues after editing an item that is linked to a serial issue via a subscription. The pref's default is true to preserve the current behavior, while false skips the prompt. We need to test editing a single item and a batch of items, with the sys pref first enabled and then disabled. Test plan: 1. Apply patch and updatedatabase on ktd 2. Serials > New Subscription > Link to a bib record & select When receiving this serial = Create an item record 3. Receive an item then go to the linked bib 4. Edit the item and click save 5. You should be prompted to edit linked serial issue (you can cancel) 6. Receive another item and go to the linked bib again 7. Under the bib's Edit menu select Edit items in a batch 8. Edit both items and click save 9. You should be prompted to edit the issues again 10. Admin > System Preferences > EditLinkedSerialIssues = Don't prompt 11. Repeat steps 3-9 except you should not be prompted -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #13 from John Vinke <jvinke@austinseminary.edu> --- I think there was something left over from when the patch wasn't applying. I started over and it seemed to work. Sorry about that, I'm new to this. John -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #14 from Eric Phetteplace <ephetteplace@cca.edu> --- No worries and thanks for the sign-off! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Adding a new preference on a bugfix is rather unusual ;) But the description seems to explain it.. We should not push frustrating features, haha. In the meantime the dbrev changed a bit too for adding sysprefs: INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES You should remove options, explanation and type here please. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #16 from Eric Phetteplace <ephetteplace@cca.edu> --- Created attachment 199596 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=199596&action=edit Bug 41251: fix sys pref creation SQL (qa) options, explanation, value no longer specified in atomicupdate file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #17 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- We should avoid using onClick attributes: https://wiki.koha-community.org/wiki/Coding_Guidelines#JS9:_Avoid_the_use_of... -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #18 from Eric Phetteplace <ephetteplace@cca.edu> --- Created attachment 202220 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202220&action=edit Bug 41251: don't use onclick HTML attribute (qa) Patch from commit 0a34948 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lisette@bywatersolutions.co | |m --- Comment #19 from Lisette Scheer <lisette@bywatersolutions.com> --- Eric, thanks for the work on this! Your follow-up patches need to follow the commit message guidelines: wiki.koha-community.org/wiki/Commit_messages Bug 41251: (follow-up) or Bug 41241: (QA follow-up) rather than the (qa) at the end. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #199596|0 |1 is obsolete| | Attachment #202220|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #20 from Eric Phetteplace <ephetteplace@cca.edu> --- Created attachment 202556 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202556&action=edit Bug 41251: (follow-up) fix sys pref creation SQL options, explanation, value no longer specified in atomicupdate file -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #21 from Eric Phetteplace <ephetteplace@cca.edu> --- Created attachment 202557 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202557&action=edit Bug 41251: (follow-up) don't use onclick HTML attribute Patch from commit 792c0a3 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #22 from Eric Phetteplace <ephetteplace@cca.edu> --- Sorry about that, Lisette. I think the commit messages are fixed now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 John Vinke <jvinke@austinseminary.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #195858|0 |1 is obsolete| | Attachment #202556|0 |1 is obsolete| | Attachment #202557|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #23 from John Vinke <jvinke@austinseminary.edu> --- Created attachment 202597 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202597&action=edit Bug 41251: Ability to edit linked serials when editing items needs to be optional This patch adds a new system preference EditLinkedSerialIssues which prompts the user to edit linked serial issues after editing an item that is linked to a serial issue via a subscription. The pref's default is true to preserve the current behavior, while false skips the prompt. We need to test editing a single item and a batch of items, with the sys pref first enabled and then disabled. Test plan: 1. Apply patch and updatedatabase on ktd 2. Serials > New Subscription > Link to a bib record & select When receiving this serial = Create an item record 3. Receive an item then go to the linked bib 4. Edit the item and click save 5. You should be prompted to edit linked serial issue (you can cancel) 6. Receive another item and go to the linked bib again 7. Under the bib's Edit menu select Edit items in a batch 8. Edit both items and click save 9. You should be prompted to edit the issues again 10. Admin > System Preferences > EditLinkedSerialIssues = Don't prompt 11. Repeat steps 3-9 except you should not be prompted Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #24 from John Vinke <jvinke@austinseminary.edu> --- Created attachment 202598 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202598&action=edit Bug 41251: (follow-up) fix sys pref creation SQL options, explanation, value no longer specified in atomicupdate file Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #25 from John Vinke <jvinke@austinseminary.edu> --- Created attachment 202599 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202599&action=edit Bug 41251: (follow-up) don't use onclick HTML attribute Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |paul.derscheid@lmscloud.de |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202597|0 |1 is obsolete| | Attachment #202598|0 |1 is obsolete| | Attachment #202599|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #26 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 203147 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203147&action=edit Bug 41251: Ability to edit linked serials when editing items needs to be optional This patch adds a new system preference EditLinkedSerialIssues which prompts the user to edit linked serial issues after editing an item that is linked to a serial issue via a subscription. The pref's default is true to preserve the current behavior, while false skips the prompt. We need to test editing a single item and a batch of items, with the sys pref first enabled and then disabled. Test plan: 1. Apply patch and updatedatabase on ktd 2. Serials > New Subscription > Link to a bib record & select When receiving this serial = Create an item record 3. Receive an item then go to the linked bib 4. Edit the item and click save 5. You should be prompted to edit linked serial issue (you can cancel) 6. Receive another item and go to the linked bib again 7. Under the bib's Edit menu select Edit items in a batch 8. Edit both items and click save 9. You should be prompted to edit the issues again 10. Admin > System Preferences > EditLinkedSerialIssues = Don't prompt 11. Repeat steps 3-9 except you should not be prompted Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #27 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 203148 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203148&action=edit Bug 41251: (follow-up) fix sys pref creation SQL options, explanation, value no longer specified in atomicupdate file Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #28 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 203149 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203149&action=edit Bug 41251: (follow-up) don't use onclick HTML attribute Signed-off-by: John Vinke <jvinke@austinseminary.edu> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #29 from Paul Derscheid <paul.derscheid@lmscloud.de> --- 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.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #30 from Paul Derscheid <paul.derscheid@lmscloud.de> --- I tested this thoroughly, but some of the JS was really not ideal so I had to refactor a bit. Could one of you, Eric or John take a quick look at the final test plan and give an additional SO? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #31 from Eric Phetteplace <ephetteplace@cca.edu> --- Hi Paul, good catch on the undefined `e` var. I guess preventDefault is not needed there; I was able to complete the existing testing plan with your changes. I am surprised there aren't worse bugs from the malformed "$("form[name='f'")" selectors. I had never used restricted item editing and found that it took several steps to set up on ktd: add one field to SubfieldsToAllowForRestrictedEditing (e.g. "952$z"), create a new staff account (I couldn't get it to work by editing the `koha` account, even after unchecking `edit_catalogue` and `edit_any_item`), give it the `catalogue` and all permissions under `editcatalogue` except `edit_any_item` and `editcatalogue` itself, sign in as it, then complete the prompt dismissal testing in step #9. Sign off on the QA follow-up coming shortly. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Eric Phetteplace <ephetteplace@cca.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Failed QA --- Comment #32 from Eric Phetteplace <ephetteplace@cca.edu> --- Unfortunately, I spoke too soon and tests failed. Batch editing when you choose to edit the linked serial does not successfully enqueue a background job so item modifications are not made. To recreate: - Normal setup (EditLinkedSerialIssues = Prompt (the default), Subscription linked to bib with create new items, receive an issue and create an item) - On the bib, select multiple items to batch edit - Modify an item field and Save - Select "Edit serial issues" in the popup dialog - Go back to the bib; note that item modification didn't happen - Go to admin > Jobs: note that no "Batch item record modification" is enqueued -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #33 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Hi Eric, thanks for checking out the follow-up. I will take a look at your findings. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #34 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Created attachment 203332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=203332&action=edit Bug 41251: (QA follow-up) Preserve batch item edits The linked serial issue editor opened immediately after the batch item job was enqueued. It could therefore load stale item values and write them back when the issues were saved. Existing item branch values were also replaced with the logged-in or subscription branch while constructing that editor. Wait for the batch item job to finish before opening the serial issue editor. Preserve existing home and holding libraries when preparing item fields, and add regression coverage for existing and new item branch defaults. Test plan: 1. Set EditLinkedSerialIssues to "Prompt." 2. Batch-edit linked and unlinked items, changing their home and current libraries. 3. Choose "Edit serial issues" and confirm that job progress is displayed. 4. Confirm the serial issue editor opens only after the job finishes. 5. Save the serial issues and confirm all batch item changes are retained. 6. Repeat with the preference set to "Don't prompt" and with only unlinked items; confirm both batch jobs complete normally. 7. Run `prove t/db_dependent/Items.t`. Assisted-by: GPT-5.6 (OpenAI) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #35 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Thanks Eric, your report led me to a data-loss issue in the batch workflow. I ran a comprehensive test covering single-item and batch editing, both preference values, validation, restricted editing, linked and unlinked items, and both modal choices. To investigate the batch failure, I captured the request sent after choosing “Edit serial issues.” It contained the correct item numbers, linked serial IDs, op=cud-action, and edit-serial-issues=1. The batch job was enqueued and finished successfully, initially applying the requested branch changes to all three items. After saving the serial issues, SQL showed that only the linked items had reverted to Centerville. The unlinked item retained the batch change. This established that the batch job worked, but the subsequent serial edit overwrote its results. There were two underlying problems: 1. The serial issue editor opened immediately after the asynchronous batch job was enqueued. It could therefore load stale item values before the job completed. 2. PrepareItemrecordDisplay replaced existing branch values with the logged-in or subscription branch. One branch lookup also passed the complete subfield hash instead of the subfield code. Because serials-edit.pl submits complete linked item records through ModItemFromMarc, saving the issues wrote those stale/default values back over the completed batch changes. The QA follow-up now: - Displays job progress and opens the serial issue editor only after the batch job finishes. - Preserves existing home and holding libraries when preparing an existing item. - Continues applying branch defaults to new items. - Adds regression tests for existing and new item branch handling. After the fix, the complete functional test plan passed. I batch-changed three items to Springfield, edited and saved the two linked serial issues, and verified with SQL that all three items retained SPL for both branch fields. prove t/db_dependent/Items.t also passes. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41251 --- Comment #36 from Paul Derscheid <paul.derscheid@lmscloud.de> --- The only weird thing is that you reported that no jobs were enqueued, I tested this in 8 variations and did not run once into the job not being enqueued. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org