Bug 35725 - ILL - Generic master form does not keep patron and cardnumber when changing type
Summary: ILL - Generic master form does not keep patron and cardnumber when changing type
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: ILL (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Pedro Amorim
QA Contact:
URL:
Keywords:
Depends on: 35570
Blocks: 36221
  Show dependency treegraph
 
Reported: 2024-01-08 14:42 UTC by Pedro Amorim
Modified: 2024-06-26 15:30 UTC (History)
8 users (show)

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


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

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