[Koha-bugs] [Bug 19578] New: TT syntax for notices - There is no way to pre-process DB fields
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Fri Nov 3 19:40:33 CET 2017
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19578
Bug ID: 19578
Summary: TT syntax for notices - There is no way to pre-process
DB fields
Change sponsored?: ---
Product: Koha
Version: unspecified
Hardware: All
OS: All
Status: NEW
Severity: normal
Priority: P5 - low
Component: Notices
Assignee: koha-bugs at lists.koha-community.org
Reporter: jonathan.druart at bugs.koha-community.org
QA Contact: testopia at bugs.koha-community.org
Jenkins fails (run 287) on a test in t/db_dependent/Letters/TemplateToolkit.t:
With the historical syntax:
# Your request for an article from tQYRS (c3Av58O0P5xkkIGu) has been
canceled for the following reason:
With the TT syntax:
# Your request for an article from tQYRS_ (c3Av58O0P5xkkIGu) has been
canceled for the following reason:
The last character of the biblio's title has been removed because it's a
punctuation character.
It comes from: C4::Letters::_parseletter
893 $val =~ s/\p{P}$// if $val && $table=~/biblio/;
The same replacement is done for patron's attributes too.
With the TT syntax we retrieve the objects and send them to the template,
without fetching the attributes.
To restore this behaviour we could apply this regex on all the fields of the
biblio objects, but it could be perf killer (we will process fields that we
will certainly not used in the template).
I thought about the TT filter we could apply on all the variables we display,
but we will not know where come from the data, and we need to apply this change
only for the biblio table.
Any other ideas?
--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
More information about the Koha-bugs
mailing list