Bug 11019

Summary: Require some fields when adding authorized value category
Product: Koha Reporter: Amit Gupta <amitddng135>
Component: System AdministrationAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: amitddng135, frederic, gmcharlt, jonathan.druart+koha, julian.maurice, katrin.fischer, kyle, paola.rossi, paul.poulain
Version: master   
Hardware: All   
OS: All   
See Also: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=10363
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Adding new category in authorized values
Adding new category in authorized values
Bug 11019 Prevent adding new empty category in authorized values
Bug 11019 follow-up : reindenting
Bug 11019 follow-up : reindenting
Bug 11019 - Require some fields when adding authorized value category
[SIGNED-OFF] Bug 11019 - Require some fields when adding authorized value category
Bug 11019 - Require some fields when adding authorized value category
Bug 11019 - Require some fields when adding authorized value category
[PASSED QA] Bug 11019 - Require some fields when adding authorized value category

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