Bug 19453

Summary: Client side validation broken for "Fund" select
Product: Koha Reporter: David Gustafsson <glasklas>
Component: AcquisitionsAssignee: David Gustafsson <glasklas>
Status: CLOSED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, m.de.rooy, nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on:    
Bug Blocks: 20426, 20798    
Attachments: Incorrect jQuery selector for fund drop down validation
Incorrect jQuery selector for fund drop down validation
Bug 19453: Incorrect jQuery selector for fund drop down validation

Description David Gustafsson 2017-10-12 11:54:32 UTC
This might be a regression, or perhaps it has never worked, but the js-validation for the "Fund" select uses the selector [name="fund_code"] when the element is named "fund_id", correcting the selector fixes this.
Comment 1 David Gustafsson 2017-10-12 12:11:28 UTC
Created attachment 67996 [details] [review]
Incorrect jQuery selector for fund drop down validation

Steps to reproduce:
1. Create a new basket
2. Choose "Add to masket"
3. Choose "From a staged file"
4. Select a file
5. Save without selecting a fund

Expected results: A validation error should be shown, and form submit
halted.

Actual results: No validation error is shown and form submits.
Comment 2 Owen Leonard 2017-10-12 12:29:04 UTC
Created attachment 67997 [details] [review]
Incorrect jQuery selector for fund drop down validation

Steps to reproduce:
1. Create a new basket
2. Choose "Add to masket"
3. Choose "From a staged file"
4. Select a file
5. Save without selecting a fund

Expected results: A validation error should be shown, and form submit
halted.

Actual results: No validation error is shown and form submits.

https://bugs.koha-community.org/show_bug.cgi?id=19453

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Marcel de Rooy 2017-10-13 08:49:24 UTC
Created attachment 68052 [details] [review]
Bug 19453: Incorrect jQuery selector for fund drop down validation

Steps to reproduce:
1. Create a new basket
2. Choose "Add to masket"
3. Choose "From a staged file"
4. Select a file
5. Save without selecting a fund

Expected results: A validation error should be shown, and form submit
halted.

Actual results: No validation error is shown and form submits.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2017-10-13 08:50:04 UTC
David: Please add Bug [number]: to future patches. Thanks
Comment 5 Jonathan Druart 2017-10-13 17:02:10 UTC
Pushed to master for 17.11, thanks to everybody involved!
Comment 6 Fridolin Somers 2018-06-07 08:11:45 UTC
I prefer not to backport to 17.05.x