Description
Pedro Amorim
2024-01-08 14:42:57 UTC
Created attachment 160629 [details] [review] 35725: Keep cardnumber and library data when changing request type Created attachment 160630 [details] [review] Bug 35725: Keep cardnumber and library data when changing request type Test plan: 1) Apply 35570 2) Enable ILLModule sys pref through UI, or run: echo "update systempreferences set value = 1 where variable = \"ILLModule\";" | koha-mysql kohadev 3) Create a new Standard request, visit: http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 4) Input a cardnumber and/or set a library at the bottom under "Patron options". 5) Change the type (top of the form). Notice the data from step 4) is gone. 6) Apply patch. Repeat test plan and notice data is kept when changing request type. Created attachment 160650 [details] [review] Bug 35725: Fix 'Create' button enabled/disabled The previous patch fixed what it stated, but uncovered a new issue: If you input a cardnumber + a branchcode and then change type, the 'Create' button becomes disabled This happens because the trigger for it is on change only, the current patch updates this to also happen on DOMContentLoaded. Test plan: 1) Apply previous patch 2) Do steps from previous patch plan up to and including step 5) 3) Click 'Create'. Notice it doesn't submit (nothing happens). 4) Apply this patch and do a hard reload (clearing browser js cache) 5) Repeat steps 1) to 3). Notice it now submits correctly. Created attachment 160661 [details] [review] Bug 35725: Keep cardnumber and library data when changing request type Test plan: 1) Apply 35570 2) Enable ILLModule sys pref through UI, or run: echo "update systempreferences set value = 1 where variable = \"ILLModule\";" | koha-mysql kohadev 3) Create a new Standard request, visit: http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 4) Input a cardnumber and/or set a library at the bottom under "Patron options". 5) Change the type (top of the form). Notice the data from step 4) is gone. 6) Apply patch. Repeat test plan and notice data is kept when changing request type. Signed-off-by: David Nind <david@davidnind.com> Created attachment 160662 [details] [review] Bug 35725: Fix 'Create' button enabled/disabled The previous patch fixed what it stated, but uncovered a new issue: If you input a cardnumber + a branchcode and then change type, the 'Create' button becomes disabled This happens because the trigger for it is on change only, the current patch updates this to also happen on DOMContentLoaded. Test plan: 1) Apply previous patch 2) Do steps from previous patch plan up to and including step 5) 3) Click 'Create'. Notice it doesn't submit (nothing happens). 4) Apply this patch and do a hard reload (clearing browser js cache) 5) Repeat steps 1) to 3). Notice it now submits correctly. Signed-off-by: David Nind <david@davidnind.com> Blocked for now, unblock if dep moves again Created attachment 172738 [details] [review] Bug 35725: Keep cardnumber and library data when changing request type Test plan: 1) Apply 35570 2) Enable ILLModule sys pref through UI, or run: echo "update systempreferences set value = 1 where variable = \"ILLModule\";" | koha-mysql kohadev 3) Create a new Standard request, visit: http://localhost:8081/cgi-bin/koha/ill/ill-requests.pl?method=create&backend=Standard 4) Input a cardnumber and/or set a library at the bottom under "Patron options". 5) Change the type (top of the form). Notice the data from step 4) is gone. 6) Apply patch. Repeat test plan and notice data is kept when changing request type. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 172739 [details] [review] Bug 35725: Fix 'Create' button enabled/disabled The previous patch fixed what it stated, but uncovered a new issue: If you input a cardnumber + a branchcode and then change type, the 'Create' button becomes disabled This happens because the trigger for it is on change only, the current patch updates this to also happen on DOMContentLoaded. Test plan: 1) Apply previous patch 2) Do steps from previous patch plan up to and including step 5) 3) Click 'Create'. Notice it doesn't submit (nothing happens). 4) Apply this patch and do a hard reload (clearing browser js cache) 5) Repeat steps 1) to 3). Notice it now submits correctly. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Can't be a bug if the feature hasn't been pushed yet :) Pushed for 24.11! Well done everyone, thank you! Missing 24.05.x deps, no backport. |