Bug 30243

Summary: When OPACSuggestionMandatoryFields includes branchcode the dropdown should default to an empty value
Product: Koha Reporter: Lucas Gass (lukeg) <lucas>
Component: OPACAssignee: Lucas Gass (lukeg) <lucas>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: catrina, kyle, shi-yao.wang
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Creates an empty value and defaults to it when OPACSuggestionMandatoryFields includes branchcode. This forces users to make a choice regarding branch.
Version(s) released in:
22.05.00
Circulation function:
Attachments: Bug 30243: When branccode is required on OPAC suggestion page default to empty value
Bug 30243: When branccode is required on OPAC suggestion page default to empty value
Bug 30243: When branccode is required on OPAC suggestion page default to empty value
Bug 30243: When branccode is required on OPAC suggestion page default to empty value

Description Lucas Gass (lukeg) 2022-03-07 14:43:24 UTC
When OPACSuggestionMandatoryFields includes branchcode the dropdown should default to an empty value which will force the user to make a choice regarding branchcode.
Comment 1 Lucas Gass (lukeg) 2022-03-09 14:58:49 UTC
Created attachment 131525 [details] [review]
Bug 30243: When branccode is required on OPAC suggestion page default to empty value

To test:
1. Apply patch
2. Go the purchase suggestion page and see that branchcode defaults to the first option in the list.
3. Go to OPACSuggestionMandatoryFields and mark branchcode as required
4. BAck on the OPAC suggestion page notice that the branchcode defaults to an empty value
5. Try to submit the form without changing it, you cannot. You must choose a branch

https://bugs.koha-community.org/show_bug.cgi?id=29795
Comment 2 Lucas Gass (lukeg) 2022-03-09 15:02:11 UTC
Created attachment 131526 [details] [review]
Bug 30243: When branccode is required on OPAC suggestion page default to empty value

To test:
1. Apply patch
2. Go the purchase suggestion page and see that branchcode defaults to the first option in the list.
3. Go to OPACSuggestionMandatoryFields and mark branchcode as required
4. BAck on the OPAC suggestion page notice that the branchcode defaults to an empty value
5. Try to submit the form without changing it, you cannot. You must choose a branch
Comment 3 Shi Yao Wang 2022-03-10 19:13:38 UTC
Created attachment 131580 [details] [review]
Bug 30243: When branccode is required on OPAC suggestion page default to empty value

To test:
1. Apply patch
2. Go the purchase suggestion page and see that branchcode defaults to the first option in the list.
3. Go to OPACSuggestionMandatoryFields and mark branchcode as required
4. BAck on the OPAC suggestion page notice that the branchcode defaults to an empty value
5. Try to submit the form without changing it, you cannot. You must choose a branch

Signed-off-by: shiyao <shiyao@inlibro.com>
Comment 4 Nick Clemens (kidclamp) 2022-03-30 13:51:37 UTC
Created attachment 132615 [details] [review]
Bug 30243: When branccode is required on OPAC suggestion page default to empty value

To test:
1. Apply patch
2. Go the purchase suggestion page and see that branchcode defaults to the first option in the list.
3. Go to OPACSuggestionMandatoryFields and mark branchcode as required
4. BAck on the OPAC suggestion page notice that the branchcode defaults to an empty value
5. Try to submit the form without changing it, you cannot. You must choose a branch

Signed-off-by: shiyao <shiyao@inlibro.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Fridolin Somers 2022-04-08 13:53:40 UTC
Pushed to master for 22.05, thanks to everybody involved ﷐[U+1F984]﷑
Comment 6 Catrina Berka 2022-11-17 14:41:19 UTC
Filed bug 32249, reporting that this doesn't work as anticipated. The dropdown defaults to patron home branch, not an empty value.