- Fixed bug #973, including 'urgency' in the 'export' output (thanks to Andy
  Spiegl).
This commit is contained in:
Paul Beckingham 2012-04-15 19:45:42 -04:00
parent d6d9fbd8e7
commit 0918a7c79a
5 changed files with 25 additions and 10 deletions

View file

@ -133,4 +133,5 @@ suggestions:
Adam Gibbins Adam Gibbins
Ali Mousavi Ali Mousavi
Victor Roetman Victor Roetman
Andy Spiegl

View file

@ -12,6 +12,8 @@ Bugs
+ Fixed bug #964, where the 'projects' command showed the wrong priority labels + Fixed bug #964, where the 'projects' command showed the wrong priority labels
(thanks to Ali Mousavi). (thanks to Ali Mousavi).
+ Fixed bug #968, a typo in the 'edit' command text (thanks to Victor Roetman). + Fixed bug #968, a typo in the 'edit' command text (thanks to Victor Roetman).
+ Fixed bug #973, including 'urgency' in the 'export' output (thanks to Andy
Spiegl).
+ Fixed grammar in feedback string (thanks to Uli Martens). + Fixed grammar in feedback string (thanks to Uli Martens).
+ Addressed valgrind complaints (thanks to Bryce Harrington). + Addressed valgrind complaints (thanks to Bryce Harrington).
+ Removed default configuration value for the obsolete 'annotations' setting. + Removed default configuration value for the obsolete 'annotations' setting.

View file

@ -646,6 +646,12 @@ std::string Task::composeJSON (bool include_id /*= false*/) const
out << "]"; out << "]";
} }
// Include urgency.
out << ","
<< "\"urgency\":\""
<< urgency_c ()
<<"\"";
out << "}"; out << "}";
return out.str (); return out.str ();
} }

View file

@ -120,6 +120,10 @@ int CmdImport::execute (std::string& output)
if (i->first == "id") if (i->first == "id")
; ;
// Urgency, if present, is ignored.
if (i->first == "urgency")
;
// Dates are converted from ISO to epoch. // Dates are converted from ISO to epoch.
else if (col->type () == "date") else if (col->type () == "date")
{ {

View file

@ -28,7 +28,7 @@
use strict; use strict;
use warnings; use warnings;
use Test::More tests => 20; use Test::More tests => 22;
# Create the rc file. # Create the rc file.
if (open my $fh, '>', 'export.rc') if (open my $fh, '>', 'export.rc')
@ -61,15 +61,17 @@ like ($lines[5], qr/^ id: \d+$/, 'export YAML line 6');
like ($lines[6], qr/^ priority: H$/, 'export YAML line 7'); like ($lines[6], qr/^ priority: H$/, 'export YAML line 7');
like ($lines[7], qr/^ project: A$/, 'export YAML line 8'); like ($lines[7], qr/^ project: A$/, 'export YAML line 8');
like ($lines[8], qr/^ status: pending$/, 'export YAML line 9'); like ($lines[8], qr/^ status: pending$/, 'export YAML line 9');
like ($lines[9], qr/^ uuid: .+$/, 'export YAML line 10'); like ($lines[9], qr/^ urgency: .+$/, 'export YAML line 10');
like ($lines[10], qr/^ task:$/, 'export YAML line 11'); like ($lines[10], qr/^ uuid: .+$/, 'export YAML line 11');
like ($lines[11], qr/^ description: two$/, 'export YAML line 12'); like ($lines[11], qr/^ task:$/, 'export YAML line 12');
like ($lines[12], qr/^ entry: \d{8}T\d{6}Z$/, 'export YAML line 13'); like ($lines[12], qr/^ description: two$/, 'export YAML line 13');
like ($lines[13], qr/^ id: \d+$/, 'export YAML line 14'); like ($lines[13], qr/^ entry: \d{8}T\d{6}Z$/, 'export YAML line 14');
like ($lines[14], qr/^ status: pending$/, 'export YAML line 15'); like ($lines[14], qr/^ id: \d+$/, 'export YAML line 15');
like ($lines[15], qr/^ tags: tag1,tag2$/, 'export YAML line 16'); like ($lines[15], qr/^ status: pending$/, 'export YAML line 16');
like ($lines[16], qr/^ uuid: .+$/, 'export YAML line 17'); like ($lines[16], qr/^ tags: tag1,tag2$/, 'export YAML line 17');
like ($lines[17], qr/^\.\.\.$/, 'export YAML line 18'); like ($lines[17], qr/^ urgency: .+$/, 'export YAML line 18');
like ($lines[18], qr/^ uuid: .+$/, 'export YAML line 19');
like ($lines[19], qr/^\.\.\.$/, 'export YAML line 20');
# Cleanup. # Cleanup.
unlink qw(pending.data completed.data undo.data backlog.data synch.key export.rc export.txt); unlink qw(pending.data completed.data undo.data backlog.data synch.key export.rc export.txt);