Empty string for preferred name/alias overrides legal name in wide hold data
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Fix Released
|
Medium
|
Unassigned | ||
3.10 |
Fix Released
|
Medium
|
Unassigned | ||
3.9 |
Fix Released
|
Medium
|
Unassigned |
Bug Description
EG 3.8.2+, 3.9.1+, 3.10-beta+, master
Thanks to the fix for bug 1838553, a patron's preferred name and alias are now available on the Hold Shelf and other places that use wide_hold_data. However, empty strings in these fields will override the legal name, causing the name fields to appear blank.
How to test:
1. Find a patron who has an item on the Hold Shelf.
2. Open the Patron Editor for that user.
3. Go to the Preferred Name tab. Type and then delete something in the Preferred Last Name field, leaving the field blank. Click Save.
4. Go to the Hold Shelf and show the User Display Name column. The patron's last name will appear blank, because their preferred last name is an empty string.
I think wide_hold_data should treat empty strings as if they were null for these fields. (The patron editor should probably also treat edited empty textboxes as null, rather than as empty strings, but that's a separate issue.)
Changed in evergreen: | |
assignee: | nobody → Jeff Davis (jdavis-sitka) |
tags: | added: circ-holds |
Changed in evergreen: | |
milestone: | none → 3.11-beta |
Changed in evergreen: | |
status: | Fix Committed → Fix Released |
Working branch user/jeffdavis/ lp1996651- wide-hold- data-pref- name-or- alias-empty- string- as-null fixes the issue by using NULLIF to test for empty strings in the preferred name and alias fields:
https:/ /git.evergreen- ils.org/ ?p=working/ Evergreen. git;a=shortlog; h=refs/ heads/user/ jeffdavis/ lp1996651- wide-hold- data-pref- name-or- alias-empty- string- as-null
To test:
1. Find a patron who has an item on the Hold Shelf.
2. Set the patron's alias and preferred family name to ''.
3. Load the Hold Shelf. The "User Display Name" and "User Alias or Display Name" columns should show the patron's legal family name (i.e. the empty string is treated as null, so we fallback to the legal name for both columns).