Bug 8652 - There is no default value for the late orders
Summary: There is no default value for the late orders
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: 3.10
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Jonathan Druart
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-16 13:13 UTC by Jonathan Druart
Modified: 2013-05-23 06:24 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:


Attachments
BUG 8652: Add a default value for the lateorders (4.90 KB, patch)
2012-08-16 13:19 UTC, Jonathan Druart
Details | Diff | Splinter Review
Proposed Amended Patch (5.36 KB, patch)
2012-09-11 17:27 UTC, Colin Campbell
Details | Diff | Splinter Review
Bug 8652: Followup: add a default value for date_from (4.23 KB, patch)
2012-09-12 08:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 8652: Followup: add a default value for date_from (4.28 KB, patch)
2012-09-18 14:15 UTC, Paul Poulain
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2012-08-16 13:13:01 UTC
On the lateorders.pl, we dont want all the late orders.
By default, this page displays all the orders.
Comment 1 Jonathan Druart 2012-08-16 13:19:22 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2012-08-16 13:23:05 UTC
The date manipulations is a little bit (very ?) dirty. If someone can do that with another way, he's welcome :)
Comment 3 MathildeF 2012-09-11 15:43:43 UTC
tested in a sandbox

When I add a date in the field "Date from", I have an error message:

Software error: Can not call method "strftime" without a package or object reference at / home / koha / src / Koha / DateUtils.pm line 119. "
Comment 4 Colin Campbell 2012-09-11 16:02:10 UTC
The date handling is wrong. dt_from_string returns a DateTime object. there is no need for the xxx_iso variables. if you need the date as a string in iso format you can retrieve that using DateTime's methods
Comment 5 Colin Campbell 2012-09-11 17:27:03 UTC
Created attachment 12142 [details] [review]
Proposed Amended Patch

I took the liberty of amending the Koha::DateUtils calls. I'm sure the logic could be further cleaned up. Requires testing
Comment 6 Jonathan Druart 2012-09-12 08:13:04 UTC Comment hidden (obsolete)
Comment 7 Paul Poulain 2012-09-18 14:15:12 UTC
Patch tested with a sandbox, by MathildeF <mathilde.formery@ville-nimes.fr>
Comment 8 Paul Poulain 2012-09-18 14:15:29 UTC
Created attachment 12312 [details] [review]
Bug 8652: Followup: add a default value for date_from

This patchis add a third parameter to the output_pref routine. It allows
to specify the output string with or without the hours and minutes
(%H:%M)

Signed-off-by: MathildeF <mathilde.formery@ville-nimes.fr>
Comment 9 Paul Poulain 2012-10-09 09:26:07 UTC
Comment on attachment 12160 [details] [review]
Bug 8652: Followup: add a default value for date_from

obsoleted by signoff
Comment 10 Paul Poulain 2012-10-09 09:51:24 UTC
QA comment:
 * both patches passes koha-qa.pl
 * 1st patch has a negligible side-effect risk, 2nd patch has a larger one
 * investigating patch 2 more deeply:
   - a new possible parameter is added to output_pref signature. Depending on it, the return is as previously, or with more information
   - for all calls to this sub, there is no change in the returned result
   - checking t/DateUtils.t = still OK after the test
   - however, it would be worth to have a test for this new parameter. I've added a small follow-up, that add 3 tests to t/DateUtils.t

passed QA
Comment 11 Paul Poulain 2012-10-09 09:51:42 UTC
Patch pushed to master