Bug 14136

Summary: Remove superfluous template parameters from members/member-flags.pl
Product: Koha Reporter: Marc Véron <veron>
Component: Staff interfaceAssignee: Marc Véron <veron>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: minor    
Priority: P5 - low CC: bgkriegel, gmcharlt, kyle
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 14136 - Remove superfluous template parameters from members/member-flags.pl
[SIGNED-OFF] Bug 14136: Remove superfluous template parameters from members/member-flags.pl

Description Marc Véron 2015-05-04 13:08:19 UTC
This bug was triggered because intranet-error ad entries like the following:
member-flags.pl: Use of uninitialized value $roadtype in concatenation (.) or string at /usr/share/kohaclone/members/member-flags.pl line 176.

To reproduce: Have a patron without roadtype and go to 
Home > Patrons > Set permissions for ...

There are some template parameters that are not used in the template member-flags.tt ( $roadtype is used while preparing $address )

Unused template params are:
cardnumber
othernames
categorycode
category_type
categoryname
address
address2
city
state
zipcode
country
phone
phonepro
mobile
email
emailpro
branchcode
branchname
loop
is_child
activeBorrowerRelationship
RoutingSerials
Comment 1 Marc Véron 2015-05-04 13:23:18 UTC Comment hidden (obsolete)
Comment 2 Bernardo Gonzalez Kriegel 2015-05-07 14:38:07 UTC
Created attachment 38951 [details] [review]
[SIGNED-OFF] Bug 14136: Remove superfluous template parameters from members/member-flags.pl

This bug was triggered because intranet-error.log had entries like the following:
member-flags.pl: Use of uninitialized value $roadtype in concatenation (.) or string at /usr/share/kohaclone/members/member-flags.pl line 176.

To reproduce: Have a patron without roadtype and go to
Home > Patrons > Set permissions for ...

There are some template parameters that are not used in the template member-flags.tt ( $roadtype is used while preparing $address )

Unused template params are:
cardnumber
othernames
categorycode
category_type
categoryname
address
address2
city
state
zipcode
country
phone
phonepro
mobile
email
emailpro
branchcode
branchname
loop <--- this is used
is_child
activeBorrowerRelationship
RoutingSerials

To test:
- Verify that you get the warning above in intranet-error.log
- Verify that the parameters above are not used in the template member-flags.tt
- Apply patch
- Verify that setting permissions for patrons still works

Note: There are a lot of indenting issues in this file. This patch does not intend to resolve them.
Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Warn exists, now removed. No errors
Comment 3 Kyle M Hall 2015-05-08 17:41:08 UTC
Those parameters are used in circ-menu.inc which is used by this template. Without them that data does not display.
Comment 4 Marc Véron 2015-05-18 08:48:58 UTC
Sorry, I was not aware of circ-menu.inc