Bug 29711

Summary: Release date not passed as ISO to about.tt
Product: Koha Reporter: Tomás Cohen Arazi <tomascohen>
Component: Architecture, internals, and plumbingAssignee: Tomás Cohen Arazi <tomascohen>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: david, fridolin.somers, jonathan.druart
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29718
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30718
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 29403    
Bug Blocks:    
Attachments: Bug 29711: Pass release date in ISO to about.tt

Description Tomás Cohen Arazi 2021-12-16 14:21:09 UTC
When parsing the teams.yaml file, the release date is (correctly) parsed from epoch into a DateTime, but the $KohaDates filter expects 'iso' formatted dates, and stringifying the 'dt' object leads to non-comformant datetime format.

To test:
1. On current master
2. Point your staff interface to the About page
=> FAIL: It explodes because of date formats
Comment 1 Tomás Cohen Arazi 2021-12-16 14:26:29 UTC
Created attachment 128627 [details] [review]
Bug 29711: Pass release date in ISO to about.tt

This patch makes the date be converted into ISO format so it is
correctly handled by the KohaDates TT filter.

To test:
1. Point your browser to the about page
=> FAIL: It explodes:
   Template process failed: undef error - The given date (2022-05-22T00:00:01) does not match the date format (iso)
2. Apply this patch
3. Restart:
   $ koha-plack --restart kohadev
4. Repeat 1
=> SUCCESS: It doesn't explode, shows the right date!
5. Sign off :-D

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 2 Jonathan Druart 2021-12-16 15:07:39 UTC
This is really ugly...
Comment 3 Jonathan Druart 2021-12-16 15:08:49 UTC
I meant, not your patch :)

But what we need to do. That is plain wrong.
Comment 4 David Nind 2022-01-07 17:36:28 UTC
I can't replicate this on master and using KTD.

Does this only apply for a specific version?
Comment 5 Fridolin Somers 2022-04-30 04:34:04 UTC
(In reply to David Nind from comment #4)
> I can't replicate this on master and using KTD.
Same for me.
And I dont see where this date is used.
Comment 6 Jonathan Druart 2022-06-02 08:02:57 UTC
No idea why this has been magically fixed..

If there is something to clean, it will be on bug 30718.
Comment 7 Tomás Cohen Arazi 2022-06-02 13:08:43 UTC
(In reply to Jonathan Druart from comment #6)
> No idea why this has been magically fixed..

DateTime magician, I summon theeeeee