From b53b64130656bf6e1b91f4512542c7f5ab17989d Mon Sep 17 00:00:00 2001 From: Jean-Martin Archer Date: Sun, 19 Jan 2020 09:38:58 -0800 Subject: 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. --- org-clubhouse.el | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'org-clubhouse.el') diff --git a/org-clubhouse.el b/org-clubhouse.el index 7f0fcec5e2fe..55f597c9f25a 100644 --- a/org-clubhouse.el +++ b/org-clubhouse.el @@ -435,7 +435,7 @@ If set to nil, will never create stories with labels") (org-clubhouse-fetch-as-id-name-pairs "projects")) (defcache org-clubhouse-epics - "Returns projects as (project-id . name)" + "Returns epics as (epic-id . name)" (org-clubhouse-fetch-as-id-name-pairs "epics")) (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) (ivy-read "Select an epic: " - (-map #'cdr (org-clubhouse-epics)) + (-map #'cdr (append '((nil . "No Epic")) (org-clubhouse-epics))) :history 'org-clubhouse-epic-history :action (lambda (selected) (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-clubhouse-link-to-story story-id) (number-to-string story-id))) - - (org-set-property "clubhouse-epic" - (org-make-link-string - (org-clubhouse-link-to-epic epic-id) - (alist-get epic-id (org-clubhouse-epics)))) + (when epic-id + (org-set-property "clubhouse-epic" + (org-make-link-string + (org-clubhouse-link-to-epic epic-id) + (alist-get epic-id (org-clubhouse-epics))))) (org-set-property "clubhouse-project" (org-make-link-string -- cgit 1.4.1