diff options
author | Griffin Smith <root@gws.fyi> | 2019-02-01T16·22-0500 |
---|---|---|
committer | Griffin Smith <root@gws.fyi> | 2019-02-01T16·22-0500 |
commit | a72382a77c81b6d79e201bb97f286f1e2aea411d (patch) | |
tree | e594ab7b98f58d81ea3bb2996d5cc406bc72e42b /org-clubhouse.el | |
parent | 8ed9c37a7abd3762aa280d7adf35dee190b3680a (diff) |
feat: Add description to created headlines
This is nice to have, but also stick it in a drawer so it's not obtrusive
Diffstat (limited to 'org-clubhouse.el')
-rw-r--r-- | org-clubhouse.el | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/org-clubhouse.el b/org-clubhouse.el index 33539e2c98f9..118997a9b202 100644 --- a/org-clubhouse.el +++ b/org-clubhouse.el @@ -740,24 +740,31 @@ resulting stories at headline level LEVEL." (org-clubhouse-request "GET" "search/stories" - :params '((query query)))) - (sprint-story-list (-> sprint-stories cdr car cdr (append nil)))) - (save-mark-and-excursion - (insert - (mapconcat (lambda (story) - (format - "%s TODO %s + :params `((query ,query)))) + (sprint-story-list (-> sprint-stories cdr car cdr (append nil) + reject-archived))) + (if (null sprint-story-list) + (message "Query returned no stories: %s" query) + (save-mark-and-excursion + (insert + (mapconcat (lambda (story) + (format + "%s TODO %s :PROPERTIES: :clubhouse-id: %s :END: +:DESCRIPTION: +%s +:END: " - (make-string level ?*) - (alist-get 'name story) - (let ((story-id (alist-get 'id story))) - (org-make-link-string - (org-clubhouse-link-to-story story-id) - (number-to-string story-id))))) - (reject-archived sprint-story-list) "\n"))))) + (make-string level ?*) + (alist-get 'name story) + (let ((story-id (alist-get 'id story))) + (org-make-link-string + (org-clubhouse-link-to-story story-id) + (number-to-string story-id))) + (alist-get 'description story))) + (reject-archived sprint-story-list) "\n")))))) (define-minor-mode org-clubhouse-mode :init-value nil |