Summary: | Make output_pref accept a string as parameter | ||
---|---|---|---|
Product: | Koha | Reporter: | Jonathan Druart <jonathan.druart> |
Component: | Architecture, internals, and plumbing | Assignee: | Jonathan Druart <jonathan.druart> |
Status: | CLOSED FIXED | QA Contact: | Testopia <testopia> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | tomascohen, veron |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: | Circulation function: | ||
Bug Depends on: | |||
Bug Blocks: | 12072, 14946, 14969, 14985 | ||
Attachments: |
Bug 15166: Make output_pref takes a string in parameter
Bug 15166: Make output_pref takes a string in parameter Bug 15166: Carp if an invalid date is passed Bug 15166: Carp if an invalid date is passed [PASSED QA] Bug 15166: Make output_pref takes a string in parameter [PASSED QA] Bug 15166: Carp if an invalid date is passed |
Description
Jonathan Druart
2015-11-10 17:46:03 UTC
Created attachment 44716 [details] [review] Bug 15166: Make output_pref takes a string in parameter To simplify the management of dates, it would be great that output_pref takes a string in parameter. my $date = $input->param('my_date'); $date = eval { dt_from_string( $date ) } if $date; $date = output_pref({dt => $date}) if $date; Could be replace with: my $date = output_pref({ str => $input->param('my_date') }); Created attachment 44721 [details] [review] Bug 15166: Make output_pref takes a string in parameter To simplify the management of dates, it would be great that output_pref takes a string in parameter. my $date = $input->param('my_date'); $date = eval { dt_from_string( $date ) } if $date; $date = output_pref({dt => $date}) if $date; Could be replace with: my $date = output_pref({ str => $input->param('my_date') }); Tested with t/DateUtils.t, passed OK. Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 44738 [details] [review] Bug 15166: Carp if an invalid date is passed Created attachment 44744 [details] [review] Bug 15166: Carp if an invalid date is passed Sign-off on second patch. Signed-off-by: Marc Véron <veron@veron.ch> Created attachment 44779 [details] [review] [PASSED QA] Bug 15166: Make output_pref takes a string in parameter To simplify the management of dates, it would be great that output_pref takes a string in parameter. my $date = $input->param('my_date'); $date = eval { dt_from_string( $date ) } if $date; $date = output_pref({dt => $date}) if $date; Could be replace with: my $date = output_pref({ str => $input->param('my_date') }); Tested with t/DateUtils.t, passed OK. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 44780 [details] [review] [PASSED QA] Bug 15166: Carp if an invalid date is passed Sign-off on second patch. Signed-off-by: Marc Véron <veron@veron.ch> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Patch pushed to master. Thanks Jonathan! |