[Bug 15166] New: Make output_pref takes a string in parameter
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Bug ID: 15166 Summary: Make output_pref takes a string in parameter Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: ASSIGNED Severity: enhancement Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: jonathan.druart@bugs.koha-community.org Reporter: jonathan.druart@bugs.koha-community.org QA Contact: testopia@bugs.koha-community.org 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') }); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Jonathan Druart <jonathan.druart@bugs.koha-community.org> 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=15166 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44716 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44716&action=edit 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') }); -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14946 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14946 [Bug 14946] Remove C4::Dates from files acqui/*.pl -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Summary|Make output_pref takes a |Make output_pref accept a |string in parameter |string as parameter -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44716|0 |1 is obsolete| | --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 44721 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44721&action=edit 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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |veron@veron.ch 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=15166 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 --- Comment #3 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 44738 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44738&action=edit Bug 15166: Carp if an invalid date is passed -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44738|0 |1 is obsolete| | --- Comment #4 from Marc Véron <veron@veron.ch> --- Created attachment 44744 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44744&action=edit Bug 15166: Carp if an invalid date is passed Sign-off on second patch. Signed-off-by: Marc Véron <veron@veron.ch> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |12072 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12072 [Bug 12072] New dateformat dd.mm.yyyy -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14969 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14969 [Bug 14969] Remove C4::Dates from serials/*.pl files -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |14985 Referenced Bugs: http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14985 [Bug 14985] Remove C4::Dates from 6 files in folder C4/*.pm -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #44721|0 |1 is obsolete| | Attachment #44744|0 |1 is obsolete| | --- Comment #5 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 44779 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44779&action=edit [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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 44780 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=44780&action=edit [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> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15166 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #7 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Jonathan! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org