about summary refs log tree commit diff
path: root/users/grfn/emacs.d/org-query.el
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2022-03-16T13·58-0400
committerclbot <clbot@tvl.fyi>2022-03-16T14·09+0000
commit2b593c4cddb0e9e754f29ddb0cca7eab792c7fa6 (patch)
treec2ca3d5053f976d950b9ac349e336941befa9e12 /users/grfn/emacs.d/org-query.el
parent8a00dc92f1bb9f3e767193cebd158cb1daa3c410 (diff)
feat(grfn/emacs): Reference current JIRA ticket in commit message r/3911
Add a `Refs: TICKET-1234` footer to any newly created tickets that're
made while clocked in to an org-mode headline associated with a JIRA
ticket ID via org tracker, and provide a binding to switch it between
Refs and Fixes

Change-Id: I0651d933987536b65013140a6c77214ece77a3d3
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5392
Reviewed-by: grfn <grfn@gws.fyi>
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/grfn/emacs.d/org-query.el')
-rw-r--r--users/grfn/emacs.d/org-query.el14
1 files changed, 14 insertions, 0 deletions
diff --git a/users/grfn/emacs.d/org-query.el b/users/grfn/emacs.d/org-query.el
index 022832c05fac..49e057da2aa9 100644
--- a/users/grfn/emacs.d/org-query.el
+++ b/users/grfn/emacs.d/org-query.el
@@ -114,3 +114,17 @@
 (comment
  (grfn/org-current-clocked-in-task-message)
  )
+
+(defun grfn/org-clocked-in-jira-ticket-id ()
+  (grfn/at-org-clocked-in-item
+   (org-tracker-backend/extract-issue-id
+    (org-tracker-current-backend)
+    (cadr (org-element-at-point)))))
+
+(comment
+ (grfn/at-org-clocked-in-item
+  (org-tracker-backend/extract-issue-id
+   (org-tracker-current-backend)
+   (cadr (org-element-at-point))))
+
+ )