[Bug 21829] New: Date displays as a datetime in notices

classic Classic list List threaded Threaded
22 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] New: Date displays as a datetime in notices

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

            Bug ID: 21829
           Summary: Date displays as a datetime in notices
 Change sponsored?: ---
           Product: Koha
           Version: 17.11
          Hardware: All
                OS: All
            Status: NEW
          Severity: minor
          Priority: P5 - low
         Component: Notices
          Assignee: [hidden email]
          Reporter: [hidden email]
        QA Contact: [hidden email]

The borrowers.dateexpiry field is a date, not a datetime, yet when it is used
in a notice like MEMBERSHIP_EXPIRY, it displays as a datetime by default with
the "12:00 AM" time ("MM/DD/YYYY 12:00 AM").

Bug 13622 added the option to strip times from datetimes by using a "dateonly"
placeholder like so: <<borrowers.dateexpiry | dateonly>>, but if you use this
option on borrowers.dateexpiry, it fails -- probably because the field is not a
datetime?

<<borrowers.dateexpiry>> outputs "MM/DD/YYYY 12:00 AM".
<<borrowers.dateexpiry | dateonly>> outputs "<>" (a left-angle bracket followed
by right-angle bracket).

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

--- Comment #1 from Arturo <[hidden email]> ---
In looking at the HTML source of the generated e-mail notice, it's actually
just spitting out "<<borrowers.dateexpiry | dateonly>>" rather than "<>".
That's just how my browser and e-mail client displayed the output, assuming it
was an (invalid) HTML element.

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |Needs Signoff

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

--- Comment #2 from Jonathan Druart <[hidden email]> ---
Created attachment 82329
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82329&action=edit
Bug 21829: Add tests for dateexpiry format in notices

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

--- Comment #3 from Jonathan Druart <[hidden email]> ---
Created attachment 82330
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=82330&action=edit
Bug 21829: Correctly format dateexpiry in notices (date only)

dateexpiry is a date, we should not display the time
part in notice.

Test plan:
Create a notice with borrowers.dateexpiry, generate this notice.
The value should be displayed without the time part

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.koha-community
                   |                            |.org/bugzilla3/show_bug.cgi
                   |                            |?id=17981
                 CC|                            |[hidden email]-c
                   |                            |ommunity.org

--- Comment #4 from Jonathan Druart <[hidden email]> ---
Since 18.05 it is fixed by
  commit a236b684fdae8e0da83ca7263b948da971dfc849
  Bug 17981: Add a preview mode for notice templates

--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|[hidden email]-commun |[hidden email]-c
                   |ity.org                     |ommunity.org

--
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

--- Comment #5 from Arturo <[hidden email]> ---
Thanks for submitting this patch, Jonathan! I misunderstood your message to the
Koha mailing list and didn't realize this issue was fixed in 18.05.

Regardless, I hoped to test this patch and get it signed off, but since the
Koha sandboxes are limited and do not yet allow testing features that require a
cronjob, which the MEMBERSHIP_EXPIRY notice requires, I'm not able to.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

--- Comment #6 from Arturo <[hidden email]> ---
My library was upgraded to Koha 18.05.05 a couple days ago, so I decided to try
using the "dateonly" option for borrowers.dateexpiry in my MEMBERSHIP_EXPIRY
notice, but I'm still seeing the same broken behavior. The generated e-mails
are not interpreting <<borrowers.dateexpiry | dateonly>> correctly and are just
spitting out that same string, which gets interpreted as an invalid HTML
element, so from the patron's point of view, the e-mail says "Your account will
expire on <>."

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

David Cook <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #7 from David Cook <[hidden email]> ---
You can always try this instead:
https://wiki.koha-community.org/wiki/Notices_with_Template_Toolkit#Example:_Format_dates

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

Sophie MEYNIEUX <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]
                   |                            |m

--- Comment #8 from Sophie MEYNIEUX <[hidden email]> ---
With this patch, only using <<borrowers.dateexpiry>> in your notices templates
should be ok

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

--- Comment #9 from Arturo <[hidden email]> ---
Sophie,

Thanks for your message! I was misunderstanding the already submitted patch.
You are correct -- I just confirmed that today's messages only use a date, not
a datetime, and all I have in the template is <<borrowers.dateexpiry>>. Problem
solved!

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

--- Comment #10 from Jonathan Druart <[hidden email]> ---
Arturo, Could you signoff?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

Arturo <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Needs Signoff               |Signed Off

--- Comment #11 from Arturo <[hidden email]> ---
No problem -- signing off!

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

Kyle M Hall <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Signed Off                  |Passed QA

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

Kyle M Hall <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #82329|0                           |1
        is obsolete|                            |
  Attachment #82330|0                           |1
        is obsolete|                            |

--- Comment #12 from Kyle M Hall <[hidden email]> ---
Created attachment 84965
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84965&action=edit
Bug 21829: Add tests for dateexpiry format in notices

Signed-off-by: Kyle M Hall <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

--- Comment #13 from Kyle M Hall <[hidden email]> ---
Created attachment 84966
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84966&action=edit
Bug 21829: Correctly format dateexpiry in notices (date only)

dateexpiry is a date, we should not display the time
part in notice.

Test plan:
Create a notice with borrowers.dateexpiry, generate this notice.
The value should be displayed without the time part

Signed-off-by: Kyle M Hall <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

--- Comment #14 from Kyle M Hall <[hidden email]> ---
Created attachment 84967
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=84967&action=edit
Bug 21829: (QA Follow-up) - Update the number of unit tests

Signed-off-by: Kyle M Hall <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

Kyle M Hall <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #15 from Kyle M Hall <[hidden email]> ---
QA note, this bug was corrected by 17981 so these patches are not strictly
necessary. However, the addition of unit tests and a more 'standard' use of
dt_from_string make it's inclusion in Koha sensible.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

Nick Clemens <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |Pushed to Master
                 CC|                            |[hidden email]

--- Comment #16 from Nick Clemens <[hidden email]> ---
Awesome work all!

Pushed to master for 19.05

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

Martin Renvoize <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |martin.renvoize@ptfs-europe
                   |                            |.com
             Status|Pushed to Master            |Pushed to Stable

--- Comment #17 from Martin Renvoize <[hidden email]> ---
Pushed to 18.11.x for 18.11.03

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 21829] Date displays as a datetime in notices

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21829

Lucas Gass <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #18 from Lucas Gass <[hidden email]> ---
backported to 18.05.x for 18.05.09

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
http://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/