Bug 28258 - Bad date formatting in AUTO_RENEWALS notice
Summary: Bad date formatting in AUTO_RENEWALS notice
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Notices (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords:
Depends on: 24378
Blocks:
  Show dependency treegraph
 
Reported: 2021-04-28 19:11 UTC by Nick Clemens (kidclamp)
Modified: 2021-12-13 21:10 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:
21.05.00,20.11.06,20.05.12


Attachments
Bug 28258: Update bad formatting in AUTO_RENEWALS notice (1.56 KB, patch)
2021-04-28 20:51 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 28258: Update bad formatting in AUTO_RENEWALS notice (1.62 KB, patch)
2021-04-29 08:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28258: Fix existing occurrence (1.37 KB, patch)
2021-04-29 08:47 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 28258: Update bad formatting in AUTO_RENEWALS notice (2.03 KB, patch)
2021-04-29 10:13 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 28258: Fix existing occurrence (1.42 KB, patch)
2021-04-29 10:14 UTC, Nick Clemens (kidclamp)
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) 2021-04-28 19:11:37 UTC
Bug 24378 updated the AUTO_RENEWALS notice to formate the date as a due date, however, it seem to have an error:

[% checkout.date_due as_due_date => 1 %] 

Generates an error:
ERROR PROCESSING TEMPLATE: file error - parse error - input text line 18: unexpected token (as_due_date)
  [% checkout.date_due as_due_date => 1 %] at test.pl line 18.


I think it should be:
[% checkout.date_due | $KohaDates as_due_date => 1%]
Comment 1 Lucas Gass 2021-04-28 20:51:35 UTC
Created attachment 120292 [details] [review]
Bug 28258: Update bad formatting in AUTO_RENEWALS notice

To test:
-Look at the AUTO_RENEWALS notice and see the syntax [% checkout.date_due as_due_date => 1 %]
-Apply patch, updatedatabase
-Look at the AUTO_RENEWALS notice and see the syntax [% checkout.date_due | $KohaDates as_due_date => 1%]
Comment 2 Jonathan Druart 2021-04-29 08:34:52 UTC
Oops, sorry!
Comment 3 Jonathan Druart 2021-04-29 08:47:33 UTC
Created attachment 120296 [details] [review]
Bug 28258: Update bad formatting in AUTO_RENEWALS notice

To test:
-Look at the AUTO_RENEWALS notice and see the syntax [% checkout.date_due as_due_date => 1 %]
-Apply patch, updatedatabase
-Look at the AUTO_RENEWALS notice and see the syntax [% checkout.date_due | $KohaDates as_due_date => 1%]

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 4 Jonathan Druart 2021-04-29 08:47:38 UTC
Created attachment 120297 [details] [review]
Bug 28258: Fix existing occurrence

I think it's good to fix the original problem as well

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Nick Clemens (kidclamp) 2021-04-29 10:13:59 UTC
Created attachment 120301 [details] [review]
Bug 28258: Update bad formatting in AUTO_RENEWALS notice

To test:
-Look at the AUTO_RENEWALS notice and see the syntax [% checkout.date_due as_due_date => 1 %]
-Apply patch, updatedatabase
-Look at the AUTO_RENEWALS notice and see the syntax [% checkout.date_due | $KohaDates as_due_date => 1%]

Additional test:
1 - Checkout an item to a patron
2 - Find their borrowernumber, the itemnumber, and the biblionumber
3 - Use the get_prepared_letter script to test the letter content
    perl misc/devel/get_prepared_letter.pl --module circulation --letter-code AUTO_RENEWALS --tables="{\"borrowers\": 5,\"issues\": 1040,\"items\": 1040,\"biblio\": 2 }"

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Nick Clemens (kidclamp) 2021-04-29 10:14:04 UTC
Created attachment 120302 [details] [review]
Bug 28258: Fix existing occurrence

I think it's good to fix the original problem as well

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 7 Jonathan Druart 2021-04-30 15:18:28 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 8 Fridolin Somers 2021-05-11 10:06:20 UTC
Pushed to 20.11.x for 20.11.06
Comment 9 Victor Grousset/tuxayo 2021-05-25 14:01:24 UTC
note: was pushed to 20.05.x for 20.05.12
Comment 10 Victor Grousset/tuxayo 2021-05-25 14:01:31 UTC
Not backported to oldoldstable (19.11.x). Feel free to ask if it's needed.