[Koha-bugs] [Bug 19578] 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
Wed Apr 4 07:46:09 CEST 2018


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19578

Katrin Fischer <katrin.fischer at bsz-bw.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #73585|0                           |1
        is obsolete|                            |

--- Comment #16 from Katrin Fischer <katrin.fischer at bsz-bw.de> ---
Created attachment 73596
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=73596&action=edit
Bug 19578: Remove MARC punctuation in notices (TT syntax)

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.

Test plan:
- Confirm that the new tests pass. That should be enough to confirm this change
make sense.

Test plan (manual):
- Create a biblio with a title ending with a punctuation (like
"with_punctuation_"), or any other fields of biblio/biblioitem
- Generate a notice which will display this field (CHECKIN for instance)

Use the historical syntax and the TT syntax, both should display the title
without the punctuation character at the end

CHECKIN historical:
The following items have been checked in:
----
<<biblio.title>>
----

CHECKIN TT syntax:
The following items have been checked in:
----
[% biblio.title %]
----

Signed-off-by: Katrin Fischer <katrin.fischer.83 at web.de>

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list