diff --git a/src/commands/CmdEdit.cpp b/src/commands/CmdEdit.cpp index 001f7eaab..43c8b8326 100644 --- a/src/commands/CmdEdit.cpp +++ b/src/commands/CmdEdit.cpp @@ -575,18 +575,20 @@ void CmdEdit::parseTask (Task& task, const std::string& after) std::vector ::iterator dep; for (dep = dependencies.begin (); dep != dependencies.end (); ++dep) { - int id = 0; + std::vector ids; - // Crude UUID check. + // Crude UUID check if (dep->length () == 36) - id = context.tdb2.pending.id (*dep); + { + int id = context.tdb2.pending.id (*dep); + ids.push_back (id); + } else - id = atoi (dep->c_str ()); + A3::extract_id (*dep, ids); - if (id) - task.addDependency (id); - else - task.addDependency (*dep); + std::vector ::iterator id; + for (id = ids.begin (); id != ids.end(); id++) + task.addDependency (*id); } } diff --git a/src/en-US.h b/src/en-US.h index 7e4b4b6c8..2242b752f 100644 --- a/src/en-US.h +++ b/src/en-US.h @@ -599,7 +599,7 @@ #define STRING_EDIT_UNPARSEABLE "Taskwarrior couldn't handle your edits. Would you like to try again?" #define STRING_EDIT_UNWRITABLE "Your data.location directory is not writable." #define STRING_EDIT_TAG_SEP "Separate the tags with spaces, like this: tag1 tag2" -#define STRING_EDIT_DEP_SEP "Dependencies should be a comma-separated list of task IDs/UUIDs, with no spaces." +#define STRING_EDIT_DEP_SEP "Dependencies should be a comma-separated list of task IDs/UUIDs or ID ranges, with no spaces." #define STRING_EDIT_END "End" #define STRING_EDIT_PROJECT_MOD "Project modified."