Bug 35725 - Generic master form does not keep patron and cardnumber when changing type
Summary: Generic master form does not keep patron and cardnumber when changing type
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Pedro Amorim
QA Contact: Tomás Cohen Arazi (tcohen)
URL:
Keywords:
Depends on: 35570
Blocks: 36221
  Show dependency treegraph
 
Reported: 2024-01-08 14:42 UTC by Pedro Amorim
Modified: 2024-12-05 21:25 UTC (History)
8 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
35725: Keep cardnumber and library data when changing request type (1.50 KB, patch)
2024-01-08 14:43 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35725: Keep cardnumber and library data when changing request type (2.04 KB, patch)
2024-01-08 14:45 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35725: Fix 'Create' button enabled/disabled (2.31 KB, patch)
2024-01-08 16:56 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 35725: Keep cardnumber and library data when changing request type (2.08 KB, patch)
2024-01-08 21:27 UTC, David Nind
Details | Diff | Splinter Review
Bug 35725: Fix 'Create' button enabled/disabled (2.36 KB, patch)
2024-01-08 21:27 UTC, David Nind
Details | Diff | Splinter Review
Bug 35725: Keep cardnumber and library data when changing request type (2.14 KB, patch)
2024-10-14 17:58 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review
Bug 35725: Fix 'Create' button enabled/disabled (2.42 KB, patch)
2024-10-14 17:58 UTC, Tomás Cohen Arazi (tcohen)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2024-01-08 14:42:57 UTC
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.
Comment 1 Pedro Amorim 2024-01-08 14:43:48 UTC Comment hidden (obsolete)
Comment 2 Pedro Amorim 2024-01-08 14:45:21 UTC
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.
Comment 3 Pedro Amorim 2024-01-08 16:56:19 UTC
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.
Comment 4 David Nind 2024-01-08 21:27:21 UTC
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>
Comment 5 David Nind 2024-01-08 21:27:24 UTC
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>
Comment 6 Marcel de Rooy 2024-01-26 10:41:39 UTC
Blocked for now, unblock if dep moves again
Comment 7 Tomás Cohen Arazi (tcohen) 2024-10-14 17:58:49 UTC
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>
Comment 8 Tomás Cohen Arazi (tcohen) 2024-10-14 17:58:52 UTC
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>
Comment 9 Katrin Fischer 2024-10-16 12:23:27 UTC
Can't be a bug if the feature hasn't been pushed yet :)
Comment 10 Katrin Fischer 2024-10-31 10:33:39 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 11 Lucas Gass (lukeg) 2024-12-05 21:25:49 UTC
Missing 24.05.x deps, no backport.