Summary: | Patron attributes will not show in brief info if value is 0 | ||
---|---|---|---|
Product: | Koha | Reporter: | Andrew Fuerste-Henry <andrew> |
Component: | Patrons | Assignee: | Brendan Lawlor <blawlor> |
Status: | RESOLVED FIXED | QA Contact: | Testopia <testopia> |
Severity: | normal | ||
Priority: | P5 - low | CC: | blawlor, ddaghita, fridolin.somers, gmcharlt, kyle.m.hall, lucas, nick, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | --- | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
24.05.00,23.11.06,23.05.12
|
Circulation function: | |
Attachments: |
Bug 36371: Check if patron attribute is defined in circ-menu.inc
Bug 36371: Check if patron attribute is defined in circ-menu.inc Bug 36371: Check if patron attribute is defined in circ-menu.inc |
Description
Andrew Fuerste-Henry
2024-03-20 14:26:57 UTC
Created attachment 163731 [details] [review] Bug 36371: Check if patron attribute is defined in circ-menu.inc This patch changes the conditional that determines if a patron attribute is displayed in the patron brief info. Instead of checking the value of the attribute we should check if the attribute is defined. To test: 1. Create a patron attribute, eg. party_mode, check 'display in patron's brief info' and tie to the YES_NO authorised value. 2. Find a patron and set your attribute to Yes 3. Confirm you see the attribute and its value both in the "Additional attributes and identifiers" section of the patron detail page and in the patron brief info area 4. Set your attribute to No 5. Confirm you see the attribute and its value in "Additional attributes and identifiers" but it no longer shows in the brief info 6. Apply patch and restart_all 7. Notice that your attribute now displays in the brief info, such as Party mode: No 8. Set the attribute to the first empty option 9. Check the patron record brief info to confirm that the attribute does not display when the value is empty. Created attachment 163732 [details] [review] Bug 36371: Check if patron attribute is defined in circ-menu.inc This patch changes the conditional that determines if a patron attribute is displayed in the patron brief info. Instead of checking the value of the attribute we should check if the attribute is defined. To test: 1. Create a patron attribute, eg. party_mode, check 'display in patron's brief info' and tie to the YES_NO authorised value. 2. Find a patron and set your attribute to Yes 3. Confirm you see the attribute and its value both in the "Additional attributes and identifiers" section of the patron detail page and in the patron brief info area 4. Set your attribute to No 5. Confirm you see the attribute and its value in "Additional attributes and identifiers" but it no longer shows in the brief info 6. Apply patch and restart_all 7. Notice that your attribute now displays in the brief info, such as Party mode: No 8. Set the attribute to the first empty option 9. Check the patron record brief info to confirm that the attribute does not display when the value is empty. Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Created attachment 163737 [details] [review] Bug 36371: Check if patron attribute is defined in circ-menu.inc This patch changes the conditional that determines if a patron attribute is displayed in the patron brief info. Instead of checking the value of the attribute we should check if the attribute is defined. To test: 1. Create a patron attribute, eg. party_mode, check 'display in patron's brief info' and tie to the YES_NO authorised value. 2. Find a patron and set your attribute to Yes 3. Confirm you see the attribute and its value both in the "Additional attributes and identifiers" section of the patron detail page and in the patron brief info area 4. Set your attribute to No 5. Confirm you see the attribute and its value in "Additional attributes and identifiers" but it no longer shows in the brief info 6. Apply patch and restart_all 7. Notice that your attribute now displays in the brief info, such as Party mode: No 8. Set the attribute to the first empty option 9. Check the patron record brief info to confirm that the attribute does not display when the value is empty. Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Pushed for 24.05! Well done everyone, thank you! Pushed to 23.11.x for 23.11.06 Backported to 23.05.x for upcoming 23.05.12 Not backporting to 22.11 unless requested |