Bug 15283

Summary: Switch default ISSUEQSLIP notice to Template Toolkit
Product: Koha Reporter: Kyle M Hall <kyle>
Component: NoticesAssignee: Martin Renvoize <martin.renvoize>
Status: Patch doesn't apply --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: black23, grace.mcky, jonathan.druart, katrin.fischer, lisettepalouse+koha, liz, lucas, martin.renvoize, mirko, mtompset
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17966
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=19167
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 15282    
Bug Blocks: 15278, 15284    
Attachments: Bug 15283 - Switch default ISSUEQSLIP notice to Template Toolkit
Bug 15283 - Switch default ISSUEQSLIP notice to Template Toolkit
Bug 15283 - Switch default ISSUEQSLIP notice to Template Toolkit
Bug 15283: Switch default ISSUEQSLIP notice to Template Toolkit
Bug 15283: Switch default ISSUEQSLIP notice to TT
Bug 15283: Switch default ISSUEQSLIP notice to TT

Description Kyle M Hall 2015-12-02 16:45:46 UTC

    
Comment 1 Kyle M Hall 2015-12-02 16:46:12 UTC Comment hidden (obsolete)
Comment 2 Kyle M Hall 2015-12-02 17:06:02 UTC Comment hidden (obsolete)
Comment 3 Kyle M Hall 2015-12-02 17:22:02 UTC
Created attachment 45336 [details] [review]
Bug 15283 - Switch default ISSUEQSLIP notice to Template Toolkit

Test Plan:
1) Apply this patch
2) Replace your ISSUESLIP with the following:

[% USE KohaDates %]
<h3>[% branch.branchname %]</h3>
Checked out to [% borrower.title %] [% borrower.firstname %] [% borrower.initials %] [% borrower.surname %] <br />
([% borrower.cardnumber %]) <br />

[% today | $KohaDates %]<br />

<h4>Checked Out Today</h4>
[% FOREACH checkout IN borrower.checkouts %]
    [% IF checkout.is_from_today %]
        <p>
            [% checkout.item.biblio.title %] <br />
            Barcode: [% checkout.item.barcode %]<br />
            Date due: [% checkout.date_due | $KohaDates %]<br />
        </p>
    [% END %]
[% END %]

3) Print a quick slip for a patron, note the data is complete
Comment 4 Mark Tompsett 2016-01-01 06:38:31 UTC
Comment on attachment 45336 [details] [review]
Bug 15283 - Switch default ISSUEQSLIP notice to Template Toolkit

Review of attachment 45336 [details] [review]:
-----------------------------------------------------------------

The sample_notices.sql files for non-English files could have been kept closer to the original in terms of language, rather than changing them to English.
Comment 5 Mark Tompsett 2016-01-01 06:40:17 UTC
New files could have used the license text found on the wiki.
http://wiki.koha-community.org/wiki/Coding_Guidelines#Licence
Comment 6 Mark Tompsett 2016-01-01 06:40:59 UTC
You added a Koha level library without any test coverage.
Comment 7 Mirko Tietgen 2016-01-28 18:35:08 UTC
Wende an: Bug 15283 - Switch default ISSUEQSLIP notice to Template Toolkit
fatal: sha1 information is lacking or useless (installer/data/mysql/de-DE/mandatory/sample_notices.sql).
Dem Repository fehlen notwendige Blobs um auf einen 3-Wege-Merge zurückzufallen.
Kann nicht zu 3-Wege-Merge zurückfallen.
Anwendung des Patches fehlgeschlagen bei 0001 Bug 15283 - Switch default ISSUEQSLIP notice to Template Toolkit
Die Kopie des fehlgeschlagenen Patches befindet sich in:
   /home/mirko/koha/.git/rebase-apply/patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-15283---Switch-default-ISSUEQSLIP-notice-to-Te-CHhaFv.patch
Comment 8 Gracie 2017-01-18 02:14:33 UTC
This patch will never apply without a rewrite because Koha/Borrower.pm has been moved to Koha/Patron.pm
Comment 9 Liz Rea 2017-08-23 21:27:52 UTC
Also we really need bits of this, specifically "is_from_today" in Checkout.pm independent of this bug.
Comment 10 Charlotte Cordwell 2018-01-17 23:12:28 UTC
Created attachment 70651 [details] [review]
Bug 15283: Switch default ISSUEQSLIP notice to Template Toolkit

Please test if changes are correct.
Comment 11 Owen Leonard 2018-10-02 14:42:35 UTC
Blocked by Bug 15282
Comment 12 Katrin Fischer 2018-10-03 11:19:58 UTC
Looking at the the new PQA status of bug 15282 this is no longer blocked, but looking at the other commends, it should be FQA?
Comment 13 Martin Renvoize 2019-07-19 14:45:04 UTC
Created attachment 91656 [details] [review]
Bug 15283: Switch default ISSUEQSLIP notice to TT

Test Plan:
1) Apply this patch
2) Replace your ISSUESLIP with the following:

[%- USE KohaDates -%]
<h3>[% branch.branchname %]</h3>
Checked out to [% patron.title %] [% patron.firstname %] [% patron.initials %] [% patron.surname %] <br />
([% patron.cardnumber %]) <br />

[% today | $KohaDates %]<br />

<h4>Checked Out Today</h4>
[% FOREACH checkout IN patron.todays_checkouts %]
<p>
  [% checkout.item.biblio.title %] </br />
  Barcode: [% checkout.item.barcode %]<br />
  Date due: [% checkout.date_due %]<br />
</p>
[% END %]

3) Print a quick slip for a patron, note the data is complete
Comment 14 Martin Renvoize 2019-07-19 14:45:53 UTC
Patch rescued, please test
Comment 15 Martin Renvoize 2019-07-19 14:47:11 UTC
Created attachment 91657 [details] [review]
Bug 15283: Switch default ISSUEQSLIP notice to TT

Test Plan:
1) Apply this patch
2) Replace your ISSUESLIP with the following:

[%- USE KohaDates -%]
<h3>[% branch.branchname %]</h3>
Checked out to [% patron.title %] [% patron.firstname %] [% patron.initials %] [% patron.surname %] <br />
([% patron.cardnumber %]) <br />

[% today | $KohaDates %]<br />

<h4>Checked Out Today</h4>
[% FOREACH checkout IN patron.todays_checkouts %]
<p>
  [% checkout.item.biblio.title %] </br />
  Barcode: [% checkout.item.barcode %]<br />
  Date due: [% checkout.date_due %]<br />
</p>
[% END %]

3) Print a quick slip for a patron, note the data is complete

Rescued-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 16 Michal Denar 2019-08-19 21:00:02 UTC
Hi Martin,
is test plan right? We solve ISSUEQSLIP but test plan says: "Replace your ISSUESLIP with the following". Is ot correct?
Comment 17 Martin Renvoize 2019-08-20 07:11:08 UTC
(In reply to Michal Denar from comment #16)
> Hi Martin,
> is test plan right? We solve ISSUEQSLIP but test plan says: "Replace your
> ISSUESLIP with the following". Is ot correct?

You are correct Michal.. it should be ISSUEQSLIP. I didn't notice that when rescuing the patch.. it's always dealt with the Q variety, just always had an incorrect test plan.. oops.
Comment 18 Michal Denar 2019-08-20 07:20:41 UTC
Test Plan:
1) Apply this patch
2) Replace your ISSUEQSLIP with the following:

[%- USE KohaDates -%]
<h3>[% branch.branchname %]</h3>
Checked out to [% patron.title %] [% patron.firstname %] [% patron.initials %] [% patron.surname %] <br />
([% patron.cardnumber %]) <br />

[% today | $KohaDates %]<br />

<h4>Checked Out Today</h4>
[% FOREACH checkout IN patron.todays_checkouts %]
<p>
  [% checkout.item.biblio.title %] </br />
  Barcode: [% checkout.item.barcode %]<br />
  Date due: [% checkout.date_due %]<br />
</p>
[% END %]

3) Print a quick slip for a patron, note the data is complete
Comment 19 Michal Denar 2019-08-20 10:33:44 UTC
Sorry, but patch don't work for me.  Result on page for print don!t contain info about today borrowed document. Please, see https://prnt.sc/ov1po3
Comment 20 Martin Renvoize 2020-10-12 09:02:31 UTC
The issue here was 'patron' vs 'borrower' as the variable name passed into the template.

However, the patch no longer applies and isn't trivial to rebase with the addition of the news block into the template in master.

I'll swing back around to this when I find a moment.