From 76c8d616d937c4bf8401f70a0cd2eecfc96a10c3 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Sat, 14 Jul 2012 09:39:05 -0400 Subject: [PATCH] Bug #1028 - Fixed bug #1028, so that UDA durations are stored in seconds, not in raw form (thank to Uli Martens). --- ChangeLog | 2 ++ test/uda_duration.t | 6 +++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index b25f4125f..3b7a3f085 100644 --- a/ChangeLog +++ b/ChangeLog @@ -105,6 +105,8 @@ Bugs was completed (thanks to Arkady Grudzinsky). + Fixed bug #1023, which applied default.project and default.priority during modification (thanks to Christoph Lange). + + Fixed bug #1028, so that UDA durations are stored in seconds, not in raw form + (thank to Uli Martens). ------ old releases ------------------------------ diff --git a/test/uda_duration.t b/test/uda_duration.t index 4784dfc7f..1f97569d2 100755 --- a/test/uda_duration.t +++ b/test/uda_duration.t @@ -28,7 +28,7 @@ use strict; use warnings; -use Test::More tests => 5; +use Test::More tests => 6; # Create the rc file. if (open my $fh, '>', 'uda.rc') @@ -52,6 +52,10 @@ my $output = qx{../src/task rc:uda.rc uda 2>&1}; like ($output, qr/1\s+1d\s+with/, 'UDA duration stored'); like ($output, qr/2\s+without/, 'UDA duration blank'); +# Ensure 'extra' is stored as seconds. +$output = qx{../src/task rc:uda.rc 1 export 2>&1}; +like ($output, qr/"extra":"86400"/, 'UDA duration stored in seconds'); + # Add bad data. $output = qx{../src/task rc:uda.rc add bad extra:unrecognized_duration 2>&1}; unlike ($output, qr/Created task \d+/, 'UDA duration bad data not accepted');