Bug 19743 - Header and Footer should be updated on each item for checkin / checkout / renewal notices
Summary: Header and Footer should be updated on each item for checkin / checkout / ren...
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Kyle M Hall (khall)
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2017-12-04 16:08 UTC by Nick Clemens (kidclamp)
Modified: 2019-10-14 19:56 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments
Bug 19743 - Header and Footer should be updated on each item for checkin / checkout / renewal notices (2.09 KB, patch)
2017-12-04 16:24 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 19743 - Unit Tests (6.65 KB, patch)
2017-12-04 17:56 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 19743 - Header and Footer should be updated on each item for checkin / checkout / renewal notices (2.15 KB, patch)
2018-01-16 02:05 UTC, Te Rauhina Jackson
Details | Diff | Splinter Review
Bug 19743 - Unit Tests (6.71 KB, patch)
2018-01-16 02:05 UTC, Te Rauhina Jackson
Details | Diff | Splinter Review
Bug 19743 - Header and Footer should be updated on each item for checkin / checkout / renewal notices (2.16 KB, patch)
2018-07-25 11:41 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 19743 - Unit Tests (6.95 KB, patch)
2018-07-25 11:41 UTC, Kyle M Hall (khall)
Details | Diff | Splinter Review
Bug 19743: Update header and footer on each item for checkin / checkout / renewal notices (2.22 KB, patch)
2018-07-31 20:12 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 19743: Unit Tests (7.02 KB, patch)
2018-07-31 20:12 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2017-12-04 16:08:51 UTC
When generating the checkout notice for a patron we only update the section in between the '---' tags

For template toolkit purposes it means we cannot affect the content based on more than a single item. For instance, we want to add the total cost of all items checked out.
Comment 1 Kyle M Hall (khall) 2017-12-04 16:24:26 UTC
Created attachment 69482 [details] [review]
Bug 19743 - Header and Footer should be updated on each item for checkin / checkout / renewal notices

When generating the checkout notice for a patron we only update the
section in between the '---' tags

For template toolkit purposes it means we cannot affect the content
based on more than a single item. For instance, we want to add the total
cost of all items checked out.

Test Plan:
1) Add "Thank you for visiting <<branches.branchname>>." to the bottom of the checkout notice. Below the second '----'.
2) Check out an item to a patron to generate that notice
3) Note the branch name in the notice
4) Update the branch name in the branches editor, change it to something else
5) Check out a 2nd item to that patron
6) Notice the items list updated, but the branch name did not
7) Apply this patch
8) Check out a 3rd item to that patron
9) Notice the branch name updated this time
Comment 2 Kyle M Hall (khall) 2017-12-04 17:56:41 UTC
Created attachment 69484 [details] [review]
Bug 19743 - Unit Tests
Comment 3 Te Rauhina Jackson 2018-01-16 02:05:16 UTC
Created attachment 70533 [details] [review]
Bug 19743 - Header and Footer should be updated on each item for checkin / checkout / renewal notices

When generating the checkout notice for a patron we only update the
section in between the '---' tags

For template toolkit purposes it means we cannot affect the content
based on more than a single item. For instance, we want to add the total
cost of all items checked out.

Test Plan:
1) Add "Thank you for visiting <<branches.branchname>>." to the bottom of the checkout notice. Below the second '----'.
2) Check out an item to a patron to generate that notice
3) Note the branch name in the notice
4) Update the branch name in the branches editor, change it to something else
5) Check out a 2nd item to that patron
6) Notice the items list updated, but the branch name did not
7) Apply this patch
8) Check out a 3rd item to that patron
9) Notice the branch name updated this time

Signed-off-by: Te Rauhina Jackson <terauhina.jackson@gmail.com>
Comment 4 Te Rauhina Jackson 2018-01-16 02:05:19 UTC
Created attachment 70534 [details] [review]
Bug 19743 - Unit Tests

Signed-off-by: Te Rauhina Jackson <terauhina.jackson@gmail.com>
Comment 5 Katrin Fischer 2018-03-25 19:06:18 UTC
Patch applied, restart_all, but tests are failing for me:

    #   Failed test 'Bug 19743 - Header and Footer should be updated on each item for checkin / checkout / renewal notices'
    #   at t/db_dependent/Letters/TemplateToolkit.t line 611.
    # Looks like you planned 7 tests but ran 8.
t/db_dependent/Letters/TemplateToolkit.t .. 16/18     # Looks like you failed 1 test of 8 run.

#   Failed test 'regression tests'
#   at t/db_dependent/Letters/TemplateToolkit.t line 985.
# Looks like you planned 18 tests but ran 17.
# Looks like you failed 1 test of 17 run.
t/db_dependent/Letters/TemplateToolkit.t .. Dubious, test returned 1 (wstat 256, 0x100)
Failed 2/18 subtests 

Test Summary Report
-------------------
t/db_dependent/Letters/TemplateToolkit.t (Wstat: 256 Tests: 17 Failed: 1)
  Failed test:  16
  Non-zero exit status: 1
  Parse errors: Bad plan.  You planned 18 tests but ran 17.
Files=1, Tests=17,  6 wallclock secs ( 0.02 usr  0.01 sys +  4.78 cusr  0.29 csys =  5.10 CPU)
Comment 6 Kyle M Hall (khall) 2018-07-25 11:41:41 UTC
Created attachment 77252 [details] [review]
Bug 19743 - Header and Footer should be updated on each item for checkin / checkout / renewal notices

When generating the checkout notice for a patron we only update the
section in between the '---' tags

For template toolkit purposes it means we cannot affect the content
based on more than a single item. For instance, we want to add the total
cost of all items checked out.

Test Plan:
1) Add "Thank you for visiting <<branches.branchname>>." to the bottom of the checkout notice. Below the second '----'.
2) Check out an item to a patron to generate that notice
3) Note the branch name in the notice
4) Update the branch name in the branches editor, change it to something else
5) Check out a 2nd item to that patron
6) Notice the items list updated, but the branch name did not
7) Apply this patch
8) Check out a 3rd item to that patron
9) Notice the branch name updated this time

Signed-off-by: Te Rauhina Jackson <terauhina.jackson@gmail.com>
Comment 7 Kyle M Hall (khall) 2018-07-25 11:41:55 UTC
Created attachment 77253 [details] [review]
Bug 19743 - Unit Tests

Signed-off-by: Te Rauhina Jackson <terauhina.jackson@gmail.com>
Comment 8 Jonathan Druart 2018-07-31 20:12:47 UTC
Created attachment 77357 [details] [review]
Bug 19743: Update header and footer on each item for checkin / checkout / renewal notices

When generating the checkout notice for a patron we only update the
section in between the '---' tags

For template toolkit purposes it means we cannot affect the content
based on more than a single item. For instance, we want to add the total
cost of all items checked out.

Test Plan:
1) Add "Thank you for visiting <<branches.branchname>>." to the bottom of the checkout notice. Below the second '----'.
2) Check out an item to a patron to generate that notice
3) Note the branch name in the notice
4) Update the branch name in the branches editor, change it to something else
5) Check out a 2nd item to that patron
6) Notice the items list updated, but the branch name did not
7) Apply this patch
8) Check out a 3rd item to that patron
9) Notice the branch name updated this time

Signed-off-by: Te Rauhina Jackson <terauhina.jackson@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Jonathan Druart 2018-07-31 20:12:51 UTC
Created attachment 77358 [details] [review]
Bug 19743: Unit Tests

Signed-off-by: Te Rauhina Jackson <terauhina.jackson@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 10 Nick Clemens (kidclamp) 2018-08-14 12:54:21 UTC
Awesome work all!

Pushed to master for 18.11
Comment 11 Martin Renvoize (ashimema) 2018-08-16 10:35:09 UTC
Enhancement, won't be backported to 18.05.x series.