Fossil SCM

Include name (not uuid) in /json/timeline/event, because the uuid is not terribly useful.

ben 2018-06-20 09:41 ben-json-timeline
Commit 6f0929ce000718c71dbbb307f95d08576b8e12c3f53bd223e05a7509251d6b6c
1 file changed +2 -1
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -552,11 +552,12 @@
552552
cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))));
553553
#endif
554554
db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
555555
blob_reset(&sql);
556556
db_prepare(&q, "SELECT"
557
- " uuid AS uuid,"
557
+ // uuid is not useful for events
558
+ " substr((SELECT tagname FROM tag AS tn WHERE tn.tagid=tagId AND tagname LIKE 'event-%%'),7) AS name,"
558559
" mtime AS timestamp,"
559560
#if 0
560561
" timestampString AS timestampString,"
561562
#endif
562563
" comment AS comment, "
563564
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -552,11 +552,12 @@
552 cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))));
553 #endif
554 db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
555 blob_reset(&sql);
556 db_prepare(&q, "SELECT"
557 " uuid AS uuid,"
 
558 " mtime AS timestamp,"
559 #if 0
560 " timestampString AS timestampString,"
561 #endif
562 " comment AS comment, "
563
--- src/json_timeline.c
+++ src/json_timeline.c
@@ -552,11 +552,12 @@
552 cson_object_set(pay, "timelineSql", cson_value_new_string(blob_buffer(&sql),strlen(blob_buffer(&sql))));
553 #endif
554 db_multi_exec("%s", blob_buffer(&sql) /*safe-for-%s*/);
555 blob_reset(&sql);
556 db_prepare(&q, "SELECT"
557 // uuid is not useful for events
558 " substr((SELECT tagname FROM tag AS tn WHERE tn.tagid=tagId AND tagname LIKE 'event-%%'),7) AS name,"
559 " mtime AS timestamp,"
560 #if 0
561 " timestampString AS timestampString,"
562 #endif
563 " comment AS comment, "
564

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button