Bugzilla – Attachment 163732 Details for
Bug 36371
Patron attributes will not show in brief info if value is 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36371: Check if patron attribute is defined in circ-menu.inc
Bug-36371-Check-if-patron-attribute-is-defined-in-.patch (text/plain), 2.30 KB, created by
Andrew Fuerste-Henry
on 2024-03-22 17:54:15 UTC
(
hide
)
Description:
Bug 36371: Check if patron attribute is defined in circ-menu.inc
Filename:
MIME Type:
Creator:
Andrew Fuerste-Henry
Created:
2024-03-22 17:54:15 UTC
Size:
2.30 KB
patch
obsolete
>From 5fe3e71ff04c8becd1ba47d04493bd870bb589e9 Mon Sep 17 00:00:00 2001 >From: Brendan Lawlor <blawlor@clamsnet.org> >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 <andrewfh@dubcolib.org> >--- > 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 3eed61ac31f..bb12e1bef31 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >+++ b/koha-tmpl/intranet-tmpl/prog/en/includes/circ-menu.inc >@@ -111,7 +111,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 ) %] > <li class="patronattribute"> > <span class="patronattributelabel">[% extendedattribute.type.description | html %]</span>: [% extendedattribute.description | html %] > </li> >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36371
:
163731
|
163732
|
163737