Bug 11019 - Require some fields when adding authorized value category
Summary: Require some fields when adding authorized value category
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-09 03:43 UTC by Amit Gupta
Modified: 2017-12-07 22:18 UTC (History)
9 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Adding new category in authorized values (1.91 KB, patch)
2013-10-09 07:44 UTC, Amit Gupta
Details | Diff | Splinter Review
Adding new category in authorized values (1.98 KB, patch)
2013-10-09 13:20 UTC, Paola Rossi
Details | Diff | Splinter Review
Bug 11019 Prevent adding new empty category in authorized values (1.83 KB, patch)
2013-10-20 18:55 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 11019 follow-up : reindenting (12.54 KB, patch)
2013-10-20 18:55 UTC, Paul Poulain
Details | Diff | Splinter Review
Bug 11019 follow-up : reindenting (12.60 KB, patch)
2013-10-20 21:03 UTC, Joy Nelson
Details | Diff | Splinter Review
Bug 11019 - Require some fields when adding authorized value category (3.95 KB, patch)
2016-08-18 16:09 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 11019 - Require some fields when adding authorized value category (3.98 KB, patch)
2016-08-22 23:28 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 11019 - Require some fields when adding authorized value category (4.04 KB, patch)
2016-08-23 10:26 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11019 - Require some fields when adding authorized value category (2.70 KB, patch)
2016-08-26 12:48 UTC, Owen Leonard
Details | Diff | Splinter Review
[PASSED QA] Bug 11019 - Require some fields when adding authorized value category (2.69 KB, patch)
2016-08-28 12:49 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Amit Gupta 2013-10-09 03:43:58 UTC
Adding new category in authorized values.
If not fill any field it save blank record
Comment 1 Amit Gupta 2013-10-09 07:44:31 UTC Comment hidden (obsolete)
Comment 2 Paola Rossi 2013-10-09 13:20:37 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2013-10-09 13:24:42 UTC
Why not use the validation method offered by the plugin introduced in Bug 6209?

Is there a server-side check that can be added to the JavaScript-based one?
Comment 4 Paola Rossi 2013-10-09 14:07:23 UTC
Sorry, I didn't know the discussion in bug 6209 about form validation.
I think to pass status of this bug to "failed QA" because Amit wrote specific javascript code, and he didn't use the plugin instead.
What do you think about it?
Comment 5 Paul Poulain 2013-10-20 18:55:28 UTC Comment hidden (obsolete)
Comment 6 Paul Poulain 2013-10-20 18:55:37 UTC Comment hidden (obsolete)
Comment 7 Paul Poulain 2013-10-20 18:56:57 UTC
need signoff again, as I've rewritten the patch. Lowering severity, if the librarian takes care and enters a category, as he's supposed to do, no problem.
Comment 8 Joy Nelson 2013-10-20 21:03:56 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2013-10-23 15:25:55 UTC
Paul,
Please reconsider the reindentation for the template file. I have a big patch for this page (see bug 10363).
Comment 10 Paul Poulain 2013-10-25 10:14:51 UTC
Considering Jonathan's patch is a large improvement, I set this one "in discussion", until the bug 10363 has been pushed
Comment 11 Owen Leonard 2016-08-18 16:09:19 UTC Comment hidden (obsolete)
Comment 12 Aleisha Amohia 2016-08-22 23:28:59 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2016-08-23 10:26:04 UTC Comment hidden (obsolete)
Comment 14 Katrin Fischer 2016-08-23 22:24:39 UTC
Hm, I just took a look at this and I have a problem:

Sometimes we like to add an empty authorised value to appear as an empty/unset entry in a a pull down list.

An example:
Extended patron attribute linked to an authorised value list.
The empty entry is the first in the list and will show if the field is empty/was not imported.

Could we remove the required form the actual authorised value?
Comment 15 Owen Leonard 2016-08-26 12:48:18 UTC Comment hidden (obsolete)
Comment 16 Katrin Fischer 2016-08-28 12:49:05 UTC
Created attachment 54948 [details] [review]
[PASSED QA] Bug 11019 - Require some fields when adding authorized value category

This patch modifies the form for adding an authorized value so that
the category is a required fields.
Previously a new authorized value category could be saved with no data.

To test, apply the patch and go to Administration -> Authorized values.

- Click the "New category" button.
- Click the save button without filling in the category.
  You should be prevented from submitting the form.
- Verify that filling in the required field allows the form to be
  submitted.
- Perform the same test when editing an existing authorized value.

Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Follow-up for QA: Allow a blank authorised value to be created.

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Amended test plan.



Current patch-complexity: Small patch
Comment 17 Kyle M Hall 2016-09-02 15:19:11 UTC
Pushed to master for 16.11, thanks Owen!
Comment 18 Frédéric Demians 2016-09-08 19:41:19 UTC
Pushed in 16.05. Will be in 16.05.04.
Comment 19 Julian Maurice 2016-09-16 06:49:19 UTC
Pushed to 3.22.x, will be in 3.22.11