From 2a6e102c7e35120f6eb8ef85a9794e54e2864219 Mon Sep 17 00:00:00 2001 From: Brendan Lawlor Date: Fri, 22 Mar 2024 17:25:20 +0000 Subject: [PATCH] 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 Signed-off-by: Nick Clemens Signed-off-by: Katrin Fischer (cherry picked from commit 93d3b0b0f75e1d7377ea31c72118ea1376f67b96) Signed-off-by: Fridolin Somers (cherry picked from commit 7be415b656b5cbc29fda66ed6336b9d853ffebb8) Signed-off-by: Lucas Gass --- koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc index 2d7f7478b1..7ef3e63bb4 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc @@ -108,7 +108,7 @@ [% IF Koha.Preference('ExtendedPatronAttributes') %] [% FOREACH extendedattribute IN patron.extended_attributes %] [% IF ( extendedattribute.type.display_checkout ) %] [%# FIXME We should filter in the line above %] - [% IF ( extendedattribute.attribute ) %] [%# FIXME Why that? why not if == 0? %] + [% IF ( extendedattribute.attribute.defined ) %]
  • [% extendedattribute.type.description | html %]: [% extendedattribute.description | html %]
  • -- 2.39.5