else
tasks[i]->project = NULL;
+ json = json_object_object_get(jtask, "priority");
+ if (json)
+ tasks[i]->priority
+ = strdup(json_object_get_string(json));
+ else
+ tasks[i]->priority = strdup("");
+
json = json_object_object_get(jtask, "uuid");
tasks[i]->uuid = strdup(json_object_get_string(json));
free(opts);
}
+void tw_modify_priority(const char *uuid, const char *priority)
+{
+ char *str;
+ char *opts;
+
+ str = escape(priority);
+
+ opts = malloc(1
+ + strlen(uuid)
+ + strlen(" modify priority:\"")
+ + strlen(str)
+ + strlen("\"")
+ + 1);
+ sprintf(opts, " %s modify priority:\"%s\"", uuid, str);
+
+ task_exec(opts);
+
+ free(str);
+ free(opts);
+}
+
void tw_add(const char *newdesc)
{
char *str;