Summary: | Cataloging add item js needs to update conditional that checks op | ||
---|---|---|---|
Product: | Koha | Reporter: | Brendan Lawlor <blawlor> |
Component: | Cataloging | Assignee: | Brendan Lawlor <blawlor> |
Status: | Needs documenting --- | QA Contact: | Emily Lamancusa (emlam) <emily.lamancusa> |
Severity: | major | ||
Priority: | P5 - low | CC: | dcook, emily.lamancusa, fridolin.somers, lucas, m.de.rooy, victor, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
24.11.00,24.05.05
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 36192 | ||
Attachments: |
Bug 37536: Update conditional to check for 'cud-saveitem'
Bug 37536: Update conditional to check for 'cud-saveitem' Bug 37536: Update conditional to check for 'cud-saveitem' Bug 37536: Update conditional to check for 'cud-saveitem' |
Description
Brendan Lawlor
2024-07-31 13:41:22 UTC
Created attachment 169890 [details] [review] Bug 37536: Update conditional to check for 'cud-saveitem' In additem.pl and additem.tt all instances of 'saveitem' have been updated to 'cud-save-item' The javascript needs to be updated in the same way. Test plan: 1. git grep 'saveitem' 2. Notice all instances in additem.pl and additem.tt have been updated to 'cud-saveitem' 3. Notice cataloging_additem.js checks if op != 'saveitem' 4. Check the files and verify the change makes sense 5. Try the test plan from Bug 22669 From bug 22669 test plan: > - Make sure acqcreateitem is set to "when placing an order" where is that acqcreateitem thing? --- > Test plan: > 1. git grep 'saveitem' > 2. Notice all instances in additem.pl and additem.tt have been updated to > 'cud-saveitem' > 3. Notice cataloging_additem.js checks if op != 'saveitem' > 4. Check the files and verify the change makes sense These 1st steps are actually additional and welcome QA notes to help the code review. The test plan is just about blindly following instructions to confirm that the patch does what is says it does. So the actual test plan would be the one from Bug 22669 remixed to witness a CSRF error before the patch and then witnessing it being gone after the patches. Thanks Victor. acqcreateitem is a system preference and I believe the default is 'when placing an order' Yes the actual test is on Bug 22669. When I tested I didn't see the CSRF error, but the pop up opens and closes abruptly as described in that bug. Created attachment 170044 [details] [review] Bug 37536: Update conditional to check for 'cud-saveitem' In additem.pl and additem.tt all instances of 'saveitem' have been updated to 'cud-save-item' The javascript needs to be updated in the same way. Test plan: 1. Same as test plan from Bug 22669. Same symptom. QA notes: 1. git grep 'saveitem' 2. Notice all instances in additem.pl and additem.tt have been updated to 'cud-saveitem' 3. Notice cataloging_additem.js checks if op != 'saveitem' 4. Check the files and verify the change makes sense Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> > acqcreateitem is a system preference and I believe the default is 'when placing an order' Thanks, somehow I didn't find it and when searching in the code I forgot to search case insensitively ^^" --- > Yes the actual test is on Bug 22669. When I tested I didn't see the CSRF error, but the pop up opens and closes abruptly as described in that bug. Ok it's the same symptom. --- Patch works! :) Created attachment 170220 [details] [review] Bug 37536: Update conditional to check for 'cud-saveitem' In additem.pl and additem.tt all instances of 'saveitem' have been updated to 'cud-save-item' The javascript needs to be updated in the same way. Test plan: 1. Same as test plan from Bug 22669. Same symptom. QA notes: 1. git grep 'saveitem' 2. Notice all instances in additem.pl and additem.tt have been updated to 'cud-saveitem' 3. Notice cataloging_additem.js checks if op != 'saveitem' 4. Check the files and verify the change makes sense Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Thanks for the fix! QA tool passes, and it works and makes sense. Passing QA Created attachment 170221 [details] [review] Bug 37536: Update conditional to check for 'cud-saveitem' In additem.pl and additem.tt all instances of 'saveitem' have been updated to 'cud-save-item' The javascript needs to be updated in the same way. Test plan: - Make sure acqcreateitem is set to "when placing an order" - Create a basket with some orders - Close the basket - Go to your vendor and receive an order - On the receive page, try to edit your item => Without the patch, the pop up page will open and then close, not allowing the item to be edited. => With this patch applied you will see the item edit form. Save and confirm that the parent window is updated with the new value (actually it's refreshed) QA notes: 1. git grep 'saveitem' 2. Notice all instances in additem.pl and additem.tt have been updated to 'cud-saveitem' 3. Notice cataloging_additem.js checks if op != 'saveitem' 4. Check the files and verify the change makes sense Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> *** Bug 37589 has been marked as a duplicate of this bug. *** Pushed for 24.11! Well done everyone, thank you! Backported to 24.05.x for upcoming 24.05.05 Not for 23.11.x |