Bugzilla – Attachment 60984 Details for
Bug 18244
Patron card creator does not take in account fields with underscore (B_address etc.)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18244: Patron card creator does not take in account fields with underscore (B_address etc.)
Bug-18244-Patron-card-creator-does-not-take-in-acc.patch (text/plain), 1.94 KB, created by
Marc Véron
on 2017-03-10 10:26:39 UTC
(
hide
)
Description:
Bug 18244: Patron card creator does not take in account fields with underscore (B_address etc.)
Filename:
MIME Type:
Creator:
Marc Véron
Created:
2017-03-10 10:26:39 UTC
Size:
1.94 KB
patch
obsolete
>From 70994319ae628368ecdc317b6555bece22388e9d Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?Marc=20V=C3=A9ron?= <veron@veron.ch> >Date: Fri, 10 Mar 2017 11:22:24 +0100 >Subject: [PATCH] Bug 18244: Patron card creator does not take in account > fields with underscore (B_address etc.) > >Fields with underscore like B_address do not print on patron cards. > >To reproduce: >- Create patron card layout using fields with underscore in their name > (e.g. <surname><B_address> ) >- Print (export) patron card >- Verify that fields without underscore are replaced by their value, > but fields with underscore do not replace but show the field name > >To test: >- Apply patch >- Try to reproduce and verify that fields with underscore are replace > as expected >--- > C4/Patroncards/Patroncard.pm | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > >diff --git a/C4/Patroncards/Patroncard.pm b/C4/Patroncards/Patroncard.pm >index 2203d1a..7678ac0 100644 >--- a/C4/Patroncards/Patroncard.pm >+++ b/C4/Patroncards/Patroncard.pm >@@ -89,15 +89,15 @@ sub draw_text { > my $line = shift @$text; > my $parse_line = $line; > my @orig_line = split(/ /,$line); >- if ($parse_line =~ m/<[A-Za-z0-9]+>/) { # test to see if the line has db fields embedded... >+ if ($parse_line =~ m/<[A-Za-z0-9_]+>/) { # test to see if the line has db fields embedded... > my @fields = (); >- while ($parse_line =~ m/<([A-Za-z0-9]+)>(.*$)/) { >+ while ($parse_line =~ m/<([A-Za-z0-9_]+)>(.*$)/) { > push (@fields, $1); > $parse_line = $2; > } > my $borrower_attributes = get_borrower_attributes($self->{'borrower_number'},@fields); > grep{ # substitute data for db fields >- if ($_ =~ m/<([A-Za-z0-9]+)>/) { >+ if ($_ =~ m/<([A-Za-z0-9_]+)>/) { > my $field = $1; > $_ =~ s/$_/$borrower_attributes->{$field}/; > } >-- >2.1.4
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 18244
:
60984
|
61590
|
61591
|
61592
|
61611
|
61629
|
61701