feat: Add original clubhouse story name to props
When linking clubhouse stories to headlines, save the name of the clubhouse story as a property on the headline - useful for reference!
This commit is contained in:
parent
910a6af627
commit
813710f261
1 changed files with 9 additions and 2 deletions
|
@ -588,7 +588,7 @@ If the epics already have a CLUBHOUSE-EPIC-ID, they are filtered and ignored."
|
||||||
:data
|
:data
|
||||||
(json-encode params))))
|
(json-encode params))))
|
||||||
|
|
||||||
(defun org-clubhouse-populate-created-story (elt story)
|
(cl-defun org-clubhouse-populate-created-story (elt story &key extra-properties)
|
||||||
(let ((elt-start (plist-get elt :begin))
|
(let ((elt-start (plist-get elt :begin))
|
||||||
(story-id (alist-get 'id story))
|
(story-id (alist-get 'id story))
|
||||||
(epic-id (alist-get 'epic_id story))
|
(epic-id (alist-get 'epic_id story))
|
||||||
|
@ -616,6 +616,10 @@ If the epics already have a CLUBHOUSE-EPIC-ID, they are filtered and ignored."
|
||||||
(org-set-property "story-type"
|
(org-set-property "story-type"
|
||||||
(alist-get-equal story-type org-clubhouse-story-types))
|
(alist-get-equal story-type org-clubhouse-story-types))
|
||||||
|
|
||||||
|
(dolist (extra-prop extra-properties)
|
||||||
|
(org-set-property (car extra-prop)
|
||||||
|
(alist-get (cdr extra-prop) story)))
|
||||||
|
|
||||||
(org-todo "TODO"))))
|
(org-todo "TODO"))))
|
||||||
|
|
||||||
(defun org-clubhouse-create-story (&optional beg end &key then)
|
(defun org-clubhouse-create-story (&optional beg end &key then)
|
||||||
|
@ -874,7 +878,10 @@ resulting stories at headline level LEVEL."
|
||||||
(interactive)
|
(interactive)
|
||||||
(org-clubhouse-prompt-for-story
|
(org-clubhouse-prompt-for-story
|
||||||
(lambda (story)
|
(lambda (story)
|
||||||
(org-clubhouse-populate-created-story (org-element-find-headline) story)
|
(org-clubhouse-populate-created-story
|
||||||
|
(org-element-find-headline)
|
||||||
|
story
|
||||||
|
:extra-properties '(("clubhouse-story-name" . name)))
|
||||||
(org-todo
|
(org-todo
|
||||||
(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))))))
|
||||||
|
|
Loading…
Reference in a new issue