about summary refs log tree commit diff
path: root/org-clubhouse.el
diff options
context:
space:
mode:
authorGriffin Smith <root@gws.fyi>2019-06-19T14·34-0400
committerGriffin Smith <root@gws.fyi>2019-06-19T14·34-0400
commit96a3e08ff080203a68a1ec62f8f05542dfe5e9e0 (patch)
treed96acba5da177b77660080b17898157fc5e6df2f /org-clubhouse.el
parent9d83cb22a11ec8008c7005c65b8425b71f5206c8 (diff)
Don't output colons without labels
If we pull down a story without labels, don't format the :: for those
labels
Diffstat (limited to 'org-clubhouse.el')
-rw-r--r--org-clubhouse.el13
1 files changed, 7 insertions, 6 deletions
diff --git a/org-clubhouse.el b/org-clubhouse.el
index 4f162d955bd4..18509fa823f5 100644
--- a/org-clubhouse.el
+++ b/org-clubhouse.el
@@ -964,7 +964,7 @@ which labels to set."
 (defun org-clubhouse--story-to-headline-text (level story)
   (let ((story-id (alist-get 'id story)))
     (format
-     "%s %s %s :%s:
+     "%s %s %s %s
 :PROPERTIES:
 :clubhouse-id: %s
 :END:
@@ -975,11 +975,12 @@ which labels to set."
      (org-clubhouse-workflow-state-id-to-todo-keyword
       (alist-get 'workflow_state_id story))
      (alist-get 'name story)
-     (->> story
-          (alist-get 'labels)
-          ->list
-          (-map (apply-partially #'alist-get 'name))
-          (s-join ":"))
+     (if-let ((labels (->> story
+                             (alist-get 'labels)
+                             ->list
+                             (-map (apply-partially #'alist-get 'name)))))
+         (format ":%s:" (s-join ":" labels))
+       "")
      (org-make-link-string
       (org-clubhouse-link-to-story story-id)
       (number-to-string story-id))