Bug 19453 - Client side validation broken for "Fund" select
Summary: Client side validation broken for "Fund" select
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: David Gustafsson
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on:
Blocks: 20426 20798
  Show dependency treegraph
 
Reported: 2017-10-12 11:54 UTC by David Gustafsson
Modified: 2019-10-14 19:56 UTC (History)
3 users (show)

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


Attachments
Incorrect jQuery selector for fund drop down validation (1.29 KB, patch)
2017-10-12 12:11 UTC, David Gustafsson
Details | Diff | Splinter Review
Incorrect jQuery selector for fund drop down validation (1.33 KB, patch)
2017-10-12 12:29 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 19453: Incorrect jQuery selector for fund drop down validation (1.38 KB, patch)
2017-10-13 08:49 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
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