Bug 28345 - Patron attributes no longer have option to select empty class
Summary: Patron attributes no longer have option to select empty class
Status: RESOLVED 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: Kyle M Hall
URL:
Keywords:
Depends on: 20443
Blocks: 28347
  Show dependency treegraph
 
Reported: 2021-05-13 10:38 UTC by Owen Leonard
Modified: 2021-05-25 14:51 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.06,20.05.12


Attachments
Bug 28345: Patron attributes no longer have option to select empty class (1.83 KB, patch)
2021-05-13 10:45 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 28345: Patron attributes no longer have option to select empty class (1.88 KB, patch)
2021-05-13 11:08 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 28345: Patron attributes no longer have option to select empty class (1.95 KB, patch)
2021-05-13 18:13 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2021-05-13 10:38:21 UTC
Bug 20443 changed how the "class" dropdown was created, now using av-build-dropbox.inc to build the <select>. This introduced a minor regression: It's no longer possible to select an empty value for the class.

The PROCESS directive needs to pass the "empty" parameter to enable a blank option.
Comment 1 Owen Leonard 2021-05-13 10:45:45 UTC
Created attachment 120916 [details] [review]
Bug 28345: Patron attributes no longer have option to select empty class

This patch adds the "empty" parameter to the PROCESS directive which
builds the "Class" dropdown. This allows the user to choose a blank
option when creating or editing a patron attribute.

To test, apply the patch and go to Administration -> Patron attribute
types -> Add patron attribute type.

In the entry form the "Class" dropdown should have a blank option. When
editing an existing attribute with a class defined, the correct class
should still be preselected.
Comment 2 Tomás Cohen Arazi 2021-05-13 11:08:49 UTC
Created attachment 120918 [details] [review]
Bug 28345: Patron attributes no longer have option to select empty class

This patch adds the "empty" parameter to the PROCESS directive which
builds the "Class" dropdown. This allows the user to choose a blank
option when creating or editing a patron attribute.

To test, apply the patch and go to Administration -> Patron attribute
types -> Add patron attribute type.

In the entry form the "Class" dropdown should have a blank option. When
editing an existing attribute with a class defined, the correct class
should still be preselected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 3 Kyle M Hall 2021-05-13 18:13:45 UTC
Created attachment 120945 [details] [review]
Bug 28345: Patron attributes no longer have option to select empty class

This patch adds the "empty" parameter to the PROCESS directive which
builds the "Class" dropdown. This allows the user to choose a blank
option when creating or editing a patron attribute.

To test, apply the patch and go to Administration -> Patron attribute
types -> Add patron attribute type.

In the entry form the "Class" dropdown should have a blank option. When
editing an existing attribute with a class defined, the correct class
should still be preselected.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>

Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 4 Jonathan Druart 2021-05-17 14:20:23 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 5 Fridolin Somers 2021-05-18 10:26:07 UTC
Pushed to 20.11.x for 20.11.06
Comment 6 Andrew Fuerste-Henry 2021-05-25 13:53:59 UTC
Pushed to 20.05.x for 20.05.12
Comment 7 Victor Grousset/tuxayo 2021-05-25 14:51:04 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.