From 416cb40e3dd7b9693241b61d04249e56367bdd14 Mon Sep 17 00:00:00 2001 From: Paul Beckingham Date: Wed, 4 Jul 2012 14:29:12 -0400 Subject: [PATCH] Import - Orphaned UDAs now survive import. --- src/commands/CmdImport.cpp | 6 +++++- src/en-US.h | 2 -- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/commands/CmdImport.cpp b/src/commands/CmdImport.cpp index abb1c9f6f..164efb18c 100644 --- a/src/commands/CmdImport.cpp +++ b/src/commands/CmdImport.cpp @@ -154,6 +154,7 @@ int CmdImport::execute (std::string& output) // mask // imask // parent + // UDA orphans else { // Annotations are an array of JSON objects with 'entry' and @@ -194,8 +195,11 @@ int CmdImport::execute (std::string& output) task.set (i->first, unquoteText (i->second->dump ())); } + // UDA Orphan - must be preserved. else - throw format (STRING_CMD_IMPORT_BAD_ATT, i->first); + { + task.set (i->first, unquoteText (i->second->dump ())); + } } } diff --git a/src/en-US.h b/src/en-US.h index ac1e9b80a..41a0ee016 100644 --- a/src/en-US.h +++ b/src/en-US.h @@ -399,7 +399,6 @@ #define STRING_CMD_IMPORT_SUMMARY "Imported {1} tasks." #define STRING_CMD_IMPORT_NOFILE "You must specify a file to import." #define STRING_CMD_IMPORT_FILE "Importing '{1}'" -#define STRING_CMD_IMPORT_BAD_ATT "Unrecognized attribute '{1}'" #define STRING_CMD_IMPORT_NOT_JSON "Not a JSON object: {1}" #define STRING_CMD_IMPORT_NO_DESC "Annotation is missing a description: {1}" #define STRING_CMD_IMPORT_NO_ENTRY "Annotation is missing an entry date: {1}" @@ -783,7 +782,6 @@ #define STRING_TASK_VALID_BLANK "Cannot add a task that is blank." #define STRING_TASK_VALID_BEFORE "Warning: You have specified that the '{1}' date is after the '{2}' date." #define STRING_TASK_VALID_REC_DUE "A recurring task must also have a 'due' date." -#define STRING_TASK_VALID_UNTIL "Only recurring tasks may have an 'until' date." #define STRING_TASK_VALID_RECUR "The recurrence value '{1}' is not valid." #define STRING_TASK_VALID_PRIORITY "Priority values may be 'H', 'M' or 'L', not '{1}'." #define STRING_TASK_SAFETY_VALVE "This command has no filter, and will modify all tasks. Are you sure?"