projects
/
ptask.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
urgency info is not exported in json with taskwarrior 2.0
[ptask.git]
/
src
/
tw.c
diff --git
a/src/tw.c
b/src/tw.c
index
8235784
..
bad97fc
100644
(file)
--- a/
src/tw.c
+++ b/
src/tw.c
@@
-150,6
+150,7
@@
struct task **tw_get_all_tasks(const char *status)
struct json_object *jtasks, *jtask, *json;
struct task **tasks;
char *opts;
struct json_object *jtasks, *jtask, *json;
struct task **tasks;
char *opts;
+ const char *urg;
opts = malloc(strlen("export status:") + strlen(status) + 1);
opts = malloc(strlen("export status:") + strlen(status) + 1);
@@
-198,7
+199,11
@@
struct task **tw_get_all_tasks(const char *status)
tasks[i]->uuid = strdup(json_object_get_string(json));
json = json_object_object_get(jtask, "urgency");
tasks[i]->uuid = strdup(json_object_get_string(json));
json = json_object_object_get(jtask, "urgency");
- tasks[i]->urgency = strdup(json_object_get_string(json));
+ urg = json_object_get_string(json);
+ if (urg)
+ tasks[i]->urgency = strdup(urg);
+ else
+ tasks[i]->urgency = NULL;
tasks[i]->note = note_get(tasks[i]->uuid);
}
tasks[i]->note = note_get(tasks[i]->uuid);
}