[Bug 13622] New: Display a datetime without time in a notice
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Bug ID: 13622 Summary: Display a datetime without time in a notice Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Notices Assignee: koha-bugs@lists.koha-community.org Reporter: jonathan.druart@biblibre.com QA Contact: testopia@bugs.koha-community.org Bug 13536 fixes an issue for 1 specific datetime. I would like to make this possible for all date fields. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=13536 Assignee|koha-bugs@lists.koha-commun |jonathan.druart@biblibre.co |ity.org |m -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #1 from Jonathan Druart <jonathan.druart@biblibre.com> --- Created attachment 35539 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=35539&action=edit Bug 13536: Display a datetime without time in a notice For some needs, a librarian would like to display a datetime or timestamp field without the time. This patch a filter logic in the notice/letter parsing process. Test plan: 1/ Defined a notice using a datetime or timestamp DB field (biblio.timestamp for instance). 2/ Generate the notice 3/ Verify that the letter is generated with the time 4/ Use the "dateonly" filter like: <<your_table.your_field | dateonly>> <<biblio.timestamp | dateonly>> 5/ Generate the notice 6/ Confirm the the letter is generated without the time for this field. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Interesting idea! How might this factor in for <<items.content>> where you might have multiple dates in the content? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #3 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to David Cook from comment #2)
Interesting idea! How might this factor in for <<items.content>> where you might have multiple dates in the content?
It won't work for items.content. This is a special case managed in cronjob script (overdue_notices.pl and advance_notices.pl). -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to Jonathan Druart from comment #3)
(In reply to David Cook from comment #2)
Interesting idea! How might this factor in for <<items.content>> where you might have multiple dates in the content?
It won't work for items.content. This is a special case managed in cronjob script (overdue_notices.pl and advance_notices.pl).
Ah, right. Of course. You and I were the people on those bugs too, so I should've remembered. Cool beans :) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- I think the best solution would be to automatically strip times from items due at 23:59 Would this not solve the issue completely without the need for any special markup? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #6 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Kyle M Hall from comment #5)
I think the best solution would be to automatically strip times from items due at 23:59
Would this not solve the issue completely without the need for any special markup?
This patch offers more than the due date. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Needs Signoff --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- Reintroduce this one in the needs signoff queue, there is no discussion and I think this patch could bring a global solution to date formatting in notices. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We had another library asking for this - it would be nice to see it moving. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Small patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #35539|0 |1 is obsolete| | --- Comment #9 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 39281 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39281&action=edit Bug 13622: Display a datetime without time in a notice For some needs, a librarian would like to display a datetime or timestamp field without the time. This patch adds filter logic in the notice/letter parsing process. Test plan: 1/ Defined a notice using a datetime or timestamp DB field (biblio.timestamp for instance). 2/ Generate the notice 3/ Verify that the letter is generated with the time 4/ Use the "dateonly" filter like: <<your_table.your_field | dateonly>> <<biblio.timestamp | dateonly>> 5/ Generate the notice 6/ Confirm the the letter is generated without the time for this field. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 39282 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=39282&action=edit Bug 13622: [QA Follow-up] Add unit test descriptions This report adds a few unit tests for datonly flag in notices. This patch adds (very trivial) unit test descriptions. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Here we have it moving again :) I will close report 13536 now; this is more global. The discussion status did not bring us any news. Point of attention: the feature needs to be documented somewhere.. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- *** Bug 13536 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |indradg@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #13 from Indranil Das Gupta <indradg@gmail.com> --- this could prolly use a Passed QA status ;-) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- ... or another sign-off to give QA more incentive! ;) -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39281|0 |1 is obsolete| | --- Comment #15 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 40794 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40794&action=edit Bug 13622: Display a datetime without time in a notice For some needs, a librarian would like to display a datetime or timestamp field without the time. This patch adds filter logic in the notice/letter parsing process. Test plan: 1/ Defined a notice using a datetime or timestamp DB field (biblio.timestamp for instance). 2/ Generate the notice 3/ Verify that the letter is generated with the time 4/ Use the "dateonly" filter like: <<your_table.your_field | dateonly>> <<biblio.timestamp | dateonly>> 5/ Generate the notice 6/ Confirm the the letter is generated without the time for this field. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Updated the count of tests to 64 for t/db_dependent/Letters.t to pass -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Indranil Das Gupta <indradg@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #39282|0 |1 is obsolete| | --- Comment #16 from Indranil Das Gupta <indradg@gmail.com> --- Created attachment 40795 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=40795&action=edit Bug 13622: [QA Follow-up] Add unit test descriptions This report adds a few unit tests for datonly flag in notices. This patch adds (very trivial) unit test descriptions. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #17 from Indranil Das Gupta <indradg@gmail.com> --- (In reply to Katrin Fischer from comment #14)
... or another sign-off to give QA more incentive! ;)
heh! done... updated the tests count in t/db_dependent/Letters.t to 64 (it is already 61 in the current master). Hope I've not messed up the author this time. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Patches look ok to me on first glance, thx Indranil! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Katrin Fischer from comment #18)
Patches look ok to me on first glance, thx Indranil!
They have a double signoff. What's holding you back? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40794|0 |1 is obsolete| | --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 42519 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42519&action=edit Bug 13622: Display a datetime without time in a notice For some needs, a librarian would like to display a datetime or timestamp field without the time. This patch adds filter logic in the notice/letter parsing process. Test plan: 1/ Defined a notice using a datetime or timestamp DB field (biblio.timestamp for instance). 2/ Generate the notice 3/ Verify that the letter is generated with the time 4/ Use the "dateonly" filter like: <<your_table.your_field | dateonly>> <<biblio.timestamp | dateonly>> 5/ Generate the notice 6/ Confirm the the letter is generated without the time for this field. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> Updated the count of tests to 64 for t/db_dependent/Letters.t to pass -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #40795|0 |1 is obsolete| | --- Comment #21 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 42520 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=42520&action=edit Bug 13622: [QA Follow-up] Add unit test descriptions This report adds a few unit tests for datonly flag in notices. This patch adds (very trivial) unit test descriptions. Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Indranil Das Gupta (L2C2 Technologies) <indradg@gmail.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | --- Comment #22 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- QA Comment: I am taking the liberty to pass qa on this report. Since Indranil signed off on both patches, I gain my QA token again.. Works as described. QA tests pass. The feature is kind of undocumented now. It should be described somewhere (help page, manual, on the form??) The code in Letters.pm is already less maintainable and this fix will not improve the situation. But it is a global solution and it is in written in a way that could[..] be extended with similar filters. The three added tests are testing the same thing. Seems to be overkill. I could better understand your testing the same report with dateonly flag and without it to show the difference. But no big deal. Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 --- Comment #23 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Marcel de Rooy from comment #22)
The three added tests are testing the same thing. Seems to be overkill.
No, they test different patterns: table.field | filter field | filter field|filter -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Status|Passed QA |Pushed to Master --- Comment #24 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patches pushed to master. Thanks Jonathan and Marcel! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=13622 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Display a datetime without |Add option to display |time in a notice |datetimes as dates in | |notices -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org