blob: 14923b670ff5682c82155c81dbb6cc2bddb90112 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
#+TITLE: Michał Sapka's Emacs Config - Org - Sprints
#+AUTHOR: Michał Sapka (https://michal.sapka.me)
#+STARTUP: showall indent logdone
#+HUGO_BASE_DIR: ~/ghq/vcs.sapka.me/michal-sapka-me/
#+HUGO_WEIGHT: 400
#+HUGO_SECTION: emacs/config
#+HUGO_CATEGORIES: emacs emacs-config
#+HUGO_MENU :menu "emacs-config" :name "Sprints"
#+HUGO_CUSTOM_FRONT_MATTER: :abstract "My emacs config - Sprints"
#+HUGO_CUSTOM_FRONT_MATTER: :menu-abstract "how I avoid using Jira"
#+EXPORT_FILE_NAME: sprints
* TODO Intro
* Jira
We use Jira, and I hate using Jira.
Why then not just use Org instead?
** Export
There is a ready to use package called =ox-jira= which exports to a Jira/Conflunce compatible format
#+begin_src emacs-lisp
(use-package ox-jira
:after ox
:ensure t)
#+end_src
But copy paste is too much hustle for me and would force me to use Jira interface.
I have written a small function which will save a correctly formatted buffer on my HDD and then pass it to =go-jira= to update the data on remote
#+begin_src emacs-lisp
(defun mms-emacs-jira-set-delivery-status
(&optional async subtreep visible-only body-only ext-plist)
(interactive)
(setq comment-msg "Updated delivery status _with the power of Emacs_")
(setq issue (org-entry-get (point) "ISSUE"))
(org-export-to-file 'jira (concat "~/tmp/" issue)
async subtreep visible-only body-only ext-plist)
(shell-command (concat "~/.emacs.d/helpers/jira-sync " issue " \"" comment-msg "\"")))
#+end_src
I need add a drawer with issue id
#+begin_quote
:properties:
:ISSUE: EXPVGA-380
:end:
#+end_quote
Lastly, I register it as an export option
#+begin_src emacs-lisp
(with-eval-after-load 'ox-jira
(org-export-define-derived-backend 'mms-emacs-jira 'jira
:menu-entry
'(?j "Export to JIRA"
((?u "Update in Jira" mms-emacs-jira-set-delivery-status))))
)
#+end_src
|