Bug 36983 - B_address_2 field is required even when not set to be required
Summary: B_address_2 field is required even when not set to be required
Status: Pushed to oldstable
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low normal
Assignee: Matt Blenkinsop
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-29 11:06 UTC by Matt Blenkinsop
Modified: 2024-07-29 20:11 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the patron self registration form. If the address field (B_address) in the alternative address section was set to required using the PatronSelfRegistrationBorrowerMandatoryField system preference, it was incorrectly making the address 2 field (B_address2) required on the form as well (even though it was not selected in the system preference).
Version(s) released in:
24.11.00,24.05.02,23.11.07
Circulation function:


Attachments
Bug 36983: Fix incorrect required class (2.11 KB, patch)
2024-05-29 11:11 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Bug 36983: Fix incorrect required class (2.15 KB, patch)
2024-05-29 12:51 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36983: Fix incorrect required class (2.22 KB, patch)
2024-06-07 09:54 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Blenkinsop 2024-05-29 11:06:00 UTC
In the self registration form the B_address2 field has the required class incorrectly set to match that of the B_address field and so acts as required even when not set to be required in PatronSelfRegistrationBorrowerMandatoryField
Comment 1 Matt Blenkinsop 2024-05-29 11:11:19 UTC
Created attachment 167238 [details] [review]
Bug 36983: Fix incorrect required class

This patch fixes an error on the B_address2 field which sets it to be required incorrectly

Test plan:
1) In PatronSelfRegistrationBorrowerMandatoryField, set B_address to be required.
2) In the OPAC, navigate to the self registration form.
3) In the Alternate address section, fill in the Address field that you have just set to be required. Ensure that you leave the Address 2 field blank.
4) Fill in all other required fields and submit the form, it should show you that the Address 2 field is required, even though it shouldn't be
5) Apply patch
6) Refresh the page and repeat steps 1-5, it should allow youto submit the form
Comment 2 Owen Leonard 2024-05-29 12:51:52 UTC
Created attachment 167240 [details] [review]
Bug 36983: Fix incorrect required class

This patch fixes an error on the B_address2 field which sets it to be
required incorrectly

Test plan:
1) In PatronSelfRegistrationBorrowerMandatoryField, set B_address to be
   required.
2) In the OPAC, navigate to the self registration form.
3) In the Alternate address section, fill in the Address field that you
   have just set to be required. Ensure that you leave the Address 2
   field blank.
4) Fill in all other required fields and submit the form, it should show
   you that the Address 2 field is required, even though it shouldn't be
5) Apply patch
6) Refresh the page and repeat steps 1-5, it should allow youto submit
   the form

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Martin Renvoize (ashimema) 2024-06-07 09:54:59 UTC
Created attachment 167566 [details] [review]
Bug 36983: Fix incorrect required class

This patch fixes an error on the B_address2 field which sets it to be
required incorrectly

Test plan:
1) In PatronSelfRegistrationBorrowerMandatoryField, set B_address to be
   required.
2) In the OPAC, navigate to the self registration form.
3) In the Alternate address section, fill in the Address field that you
   have just set to be required. Ensure that you leave the Address 2
   field blank.
4) Fill in all other required fields and submit the form, it should show
   you that the Address 2 field is required, even though it shouldn't be
5) Apply patch
6) Refresh the page and repeat steps 1-5, it should allow youto submit
   the form

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 4 Martin Renvoize (ashimema) 2024-06-11 07:14:26 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant
Comment 5 Lucas Gass (lukeg) 2024-07-03 16:24:00 UTC
Backported to 24.05.x for upcoming 24.05.02
Comment 6 Fridolin Somers 2024-07-17 13:57:30 UTC
Pushed to 23.11.x for 23.11.07
Comment 7 Wainui Witika-Park 2024-07-19 03:25:25 UTC
not backporting to 23.05.x unless requested