Bug 28345

Summary: Patron attributes no longer have option to select empty class
Product: Koha Reporter: Owen Leonard <oleonard>
Component: System AdministrationAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Kyle M Hall <kyle>
Severity: normal    
Priority: P5 - low CC: andrewfh, fridolin.somers, gmcharlt, jonathan.druart, kyle, tomascohen, victor
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
21.05.00,20.11.06,20.05.12
Bug Depends on: 20443    
Bug Blocks: 28347    
Attachments: Bug 28345: Patron attributes no longer have option to select empty class
Bug 28345: Patron attributes no longer have option to select empty class
Bug 28345: Patron attributes no longer have option to select empty class

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.