Bug 19453

Summary: Client side validation broken for "Fund" select
Product: Koha Reporter: David Gustafsson <glasklas>
Component: AcquisitionsAssignee: David Gustafsson <glasklas>
Status: Pushed to Master --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: m.de.rooy
Version: master   
Hardware: All   
OS: All   
Whiteboard:
Change sponsored?: --- Patch complexity: Trivial patch
Bot Control: --- When did the bot last check this:
Who signed the patch off: Text to go in the release notes:
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!