Bug 28145

Summary: Patron Attribute Class field allows for free text OR if PA_CLASS defined no blank value available
Product: Koha Reporter: Erica Rohlfs <erica.rohlfs>
Component: Staff interfaceAssignee: Bugs List <koha-bugs>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, lisette
Version: 20.05   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Erica Rohlfs 2021-04-13 16:16:58 UTC
In versions 20.05 and 20.11

If a PA_CLASS authorized value has not been defined, when the user creates a new patron attribute type, the "Class" field is now a free text box. In previous versions, this field would be a blank dropdown. If the user writes in a "Class" when creating an attribute, Koha is recognizing the grouping on the patron account. However, writing in a Class on the patron attribute type screen does not automatically create an authorized value for the PA_CLASS.

If an authorized value for PA_CLASS has been defined, then that is the only option for a user to select when creating a patron attribute type. In previous versions, the user would still have the ability to select the "blank" option from the Class dropdown (if that attribute is not being categorized into a class). Now, if a PA_CLASS value exists, the user must put the attribute into a Class. 

To Recreate:

1. Make sure no PA_CLASS values are previously defined
2. Administration › Patron attribute types > New Patron Attribute Type
3. Scroll down to the last field, "Class"
4. Observe that the Class box allows for free text
5. Save your patron attribute
6. Administration › Authorized values > select PA_CLASS
7. Observe that the free text class you created is not an authorized value
8. Now create an authorized value for PA_CLASS
9. Go back to Administration › Patron attribute types > New Patron Attribute Type
10. Scroll down to the last field, "Class" and observe that the PA_CLASS value you just created is your only option in the dropdown (no blank option) - which groups your patron attribute type into a class
Comment 1 Katrin Fischer 2023-07-01 08:07:49 UTC
I verified that the blank option is now back in the pull down if using an AV :)