Bug 11313 - empty value in mandatory combobox in record edition
Summary: empty value in mandatory combobox in record edition
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor (vote)
Assignee: Fridolin Somers
QA Contact: Testopia
URL:
Keywords:
Depends on: 3727
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-27 15:39 UTC by Fridolin Somers
Modified: 2014-12-07 20:05 UTC (History)
2 users (show)

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


Attachments
Bug 11313 - empty value in mandatory combobox in record edition (3.86 KB, patch)
2013-11-27 16:03 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 11313 - empty value in mandatory combobox in record edition (4.46 KB, patch)
2014-01-20 03:49 UTC, David Cook
Details | Diff | Splinter Review
[PASSED QA] Bug 11313 - empty value in mandatory combobox in record edition (5.49 KB, patch)
2014-01-21 06:02 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 Fridolin Somers 2013-11-27 15:39:20 UTC
In biblio (or authority) record edition or creation,
Bug 3727 added an empty value to combobox for subfield using itemtype authorized values, which is mandatory and does not have a default value. This to avoid selecting arbitrarily the first value of combo.
This behavior must be extended to normal authorized values like CCODE, COUNTRY ...
Also, when record already exists and has a defined value for the subfield this value will be selected in combobox so there is no need for an empty value.
Comment 1 Fridolin Somers 2013-11-27 16:03:58 UTC Comment hidden (obsolete)
Comment 2 David Cook 2014-01-20 03:49:07 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-01-21 06:02:29 UTC
Created attachment 24590 [details] [review]
[PASSED QA] Bug 11313 - empty value in mandatory combobox in record edition

In biblio (or authority) record edition or creation, Bug 3727 added
an empty value to combobox for subfield using itemtype authorized values,
which is mandatory and does not have a default value. This to avoid
selecting arbitrarily the first value of combo.

This patch extends this behavior to normal authorized values like CCODE,
COUNTRY ...
Also, when record already exists and has a defined value for the subfield
this value will be selected in combobox so there is no need for an empty value.

Test plan :
- In a biblio framework, set a subfield mandatory and using itemtypes
  authorised values
- Set a default value for this subfield
- Create a new record with the framework
=> You see the subfield with a combobox, the first empty value is selected
- Go to biblio framework and set a default value for the subfield
- Create a new record with the framework
=> You see the subfield with a combobox, the default value is selected
   and there is no empty value
- Select an other value and save the record
- Edit this record
=> You see the subfield with a combobox, the saved value is selected and
   there is no empty value

Perform same tests with a normal authorized values categorie (instead of
  itemtypes).
Perform same tests with with authority creation/edition
Perform same tests with a normal authorized values categorie and authority
  creation/edition

Signed-off-by: David Cook <dcook@prosentient.com.au>

Works as described.

Fridolyn: I had a lot of difficulty understanding your test plan,
especially since the second line should not be in the test plan
(since if there is a default value, no empty value should appear).

Perhaps it would be useful to use more whitespace to separate
steps and the things for which a tester should check.

Also, it might be useful to specify what testers should check for
before and after applying the patch, so that they're sure that the
behaviour has been corrected.

In any case, the patch works! Certainly a helpful addition.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Passes all tests and QA script.

1) Adding a bibliographic record
Subfield is mandatory, no default value:
- adding record: no value is preselected, empty value exists
- editing record: saved value is shown,  empty value exists
Subfield is mandatory, defined default value:
- adding record: default is preselected, no empty value
- editing record: saved value is shown, no empty value exists
Subfield is not mandatory, defined default value:
- adding record: default is preselected, empty value exists
- editing record: saved value is shown, emtpy value exists
Subfield is not mandatory, no default value:
- adding record: empty value is preselected
- editing record: saved value is shown, empty value exists

2) Adding an authority record
Repeating tests from above.
- Subfield is mandatory, no default value: OK
- Subfield is mandatory, defined default value: OK
- Subfield is not mandatory, defined default value: OK
- Subfield is not mandatory, no default value: OK
Comment 4 Galen Charlton 2014-01-23 03:48:41 UTC
Pushed to master.  Thanks, Fridolin!
Comment 5 Fridolin Somers 2014-04-23 17:07:39 UTC
Patch pushed to 3.14.x, will be in 3.14.06