story, allow to create story without an epic

While it's probably a good idea to assign epics to new stories,
depending on the methodology used by the team not everything may
warrant being attached to an epic. E.g. one off task and what
not.
This commit is contained in:
Jean-Martin Archer 2020-01-19 09:38:58 -08:00 committed by Griffin Smith
parent 39bb14987f
commit b53b641306

View file

@ -435,7 +435,7 @@ If set to nil, will never create stories with labels")
(org-clubhouse-fetch-as-id-name-pairs "projects")) (org-clubhouse-fetch-as-id-name-pairs "projects"))
(defcache org-clubhouse-epics (defcache org-clubhouse-epics
"Returns projects as (project-id . name)" "Returns epics as (epic-id . name)"
(org-clubhouse-fetch-as-id-name-pairs "epics")) (org-clubhouse-fetch-as-id-name-pairs "epics"))
(defcache org-clubhouse-milestones (defcache org-clubhouse-milestones
@ -523,7 +523,7 @@ If set to nil, will never create stories with labels")
(defun org-clubhouse-prompt-for-epic (cb) (defun org-clubhouse-prompt-for-epic (cb)
(ivy-read (ivy-read
"Select an epic: " "Select an epic: "
(-map #'cdr (org-clubhouse-epics)) (-map #'cdr (append '((nil . "No Epic")) (org-clubhouse-epics)))
:history 'org-clubhouse-epic-history :history 'org-clubhouse-epic-history
:action (lambda (selected) :action (lambda (selected)
(let ((epic-id (let ((epic-id
@ -666,11 +666,11 @@ If the epics already have a CLUBHOUSE-EPIC-ID, they are filtered and ignored."
(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)))
(when epic-id
(org-set-property "clubhouse-epic" (org-set-property "clubhouse-epic"
(org-make-link-string (org-make-link-string
(org-clubhouse-link-to-epic epic-id) (org-clubhouse-link-to-epic epic-id)
(alist-get epic-id (org-clubhouse-epics)))) (alist-get epic-id (org-clubhouse-epics)))))
(org-set-property "clubhouse-project" (org-set-property "clubhouse-project"
(org-make-link-string (org-make-link-string