Don't output colons without labels

If we pull down a story without labels, don't format the :: for those
labels
This commit is contained in:
Griffin Smith 2019-06-19 10:34:06 -04:00
parent 9d83cb22a1
commit 96a3e08ff0

View file

@ -964,7 +964,7 @@ which labels to set."
(defun org-clubhouse--story-to-headline-text (level story) (defun org-clubhouse--story-to-headline-text (level story)
(let ((story-id (alist-get 'id story))) (let ((story-id (alist-get 'id story)))
(format (format
"%s %s %s :%s: "%s %s %s %s
:PROPERTIES: :PROPERTIES:
:clubhouse-id: %s :clubhouse-id: %s
:END: :END:
@ -975,11 +975,12 @@ which labels to set."
(org-clubhouse-workflow-state-id-to-todo-keyword (org-clubhouse-workflow-state-id-to-todo-keyword
(alist-get 'workflow_state_id story)) (alist-get 'workflow_state_id story))
(alist-get 'name story) (alist-get 'name story)
(->> story (if-let ((labels (->> story
(alist-get 'labels) (alist-get 'labels)
->list ->list
(-map (apply-partially #'alist-get 'name)) (-map (apply-partially #'alist-get 'name)))))
(s-join ":")) (format ":%s:" (s-join ":" labels))
"")
(org-make-link-string (org-make-link-string
(org-clubhouse-link-to-story story-id) (org-clubhouse-link-to-story story-id)
(number-to-string story-id)) (number-to-string story-id))