3 [![Join the chat at https://gitter.im/org-jira/Lobby](https://badges.gitter.im/org-jira/Lobby.svg)](https://gitter.im/org-jira/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
4 [![MELPA](http://melpa.org/packages/org-jira-badge.svg)](http://melpa.org/#/org-jira)
6 Use Jira in Emacs org-mode.
10 <!-- markdown-toc start - Don't edit this section. Run M-x markdown-toc-refresh-toc -->
13 - [org-jira mode](#org-jira-mode)
16 - [Installation](#installation)
17 - [Configuration](#configuration)
19 - [Getting Started](#getting-started)
20 - [Keybinds](#keybinds)
21 - [Customization](#customization)
22 - [Authorization workaround (NOT secure)](#authorization-workaround-not-secure)
23 - [Optimizations](#optimizations)
24 - [Optimizing available actions for status changes](#optimizing-available-actions-for-status-changes)
26 - [Maintainer](#maintainer)
29 <!-- markdown-toc end -->
34 To install, just grab it off of MELPA (ensure your ~/.emacs already
39 (add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
43 Then run `M-x package-install RET org-jira RET` and you're done!
45 In your ~/.emacs, you should set the variable as such:
48 (setq jiralib-url "https://your-site.atlassian.net")
51 If you don't want to enter your credentials (login/password) each time
52 you go to connect, you can add to your ~/.authinfo.gpg or ~/.authinfo
53 file, in a format similar to:
56 machine your-site.atlassian.net login you@example.com password yourPassword port 80
58 _Please note that in the authinfo file, port 443 should be specified
59 if your jiralib-url is https._
63 org-jira mode is easy to use, to get started (after installing this
64 library) try running `M-x org-jira-get-issues`. You should see that
65 it pulls in all issues that are assigned to you.
67 Following that, you can try out some of the org-jira mode commands by
68 visiting one of the files (they're named after your Jira project code,
69 for example, 'EX.org' for a project named 'EX').
71 Some of the important keybindings:
74 (define-key org-jira-map (kbd "C-c pg") 'org-jira-get-projects)
75 (define-key org-jira-map (kbd "C-c ib") 'org-jira-browse-issue)
76 (define-key org-jira-map (kbd "C-c ig") 'org-jira-get-issues)
77 (define-key org-jira-map (kbd "C-c ih") 'org-jira-get-issues-headonly)
78 (define-key org-jira-map (kbd "C-c iu") 'org-jira-update-issue)
79 (define-key org-jira-map (kbd "C-c iw") 'org-jira-progress-issue)
80 (define-key org-jira-map (kbd "C-c in") 'org-jira-progress-issue-next)
81 (define-key org-jira-map (kbd "C-c ia") 'org-jira-assign-issue)
82 (define-key org-jira-map (kbd "C-c ir") 'org-jira-refresh-issue)
83 (define-key org-jira-map (kbd "C-c iR") 'org-jira-refresh-issues-in-buffer)
84 (define-key org-jira-map (kbd "C-c ic") 'org-jira-create-issue)
85 (define-key org-jira-map (kbd "C-c ik") 'org-jira-copy-current-issue-key)
86 (define-key org-jira-map (kbd "C-c sc") 'org-jira-create-subtask)
87 (define-key org-jira-map (kbd "C-c sg") 'org-jira-get-subtasks)
88 (define-key org-jira-map (kbd "C-c cc") 'org-jira-add-comment)
89 (define-key org-jira-map (kbd "C-c cu") 'org-jira-update-comment)
90 (define-key org-jira-map (kbd "C-c wu") 'org-jira-update-worklogs-from-org-clocks)
91 (define-key org-jira-map (kbd "C-c tj") 'org-jira-todo-to-jira)
92 (define-key org-jira-map (kbd "C-c if") 'org-jira-get-issues-by-fixversion)
96 You can define your own streamlined issue progress flow as such:
99 (defconst org-jira-progress-issue-flow
100 '(("To Do" . "In Progress"
101 ("In Progress" . "Done"))))
103 or using typical Emacs customize options, as its a defcustom.
105 This will allow you to quickly progress an issue based on its current
106 status, and what the next status should be.
108 If your Jira is set up to display a status in the issue differently
109 than what is shown in the button on Jira, your alist may look like
110 this (use the labels shown in the org-jira Status when setting it up,
111 or manually work out the workflows being used through
112 standard `C-c iw` options/usage):
115 (defconst org-jira-progress-issue-flow
116 '(("To Do" . "Start Progress")
117 ("In Development" . "Ready For Review")
118 ("Code Review" . "Done")
119 ("Done" . "Reopen")))
122 #### Authorization workaround (NOT secure)
123 If your Jira instance has disabled basic auth, you can still get in
124 by copying your web browser's cookie (open up developer console, and
125 right click and 'Copy request as cURL', then copy/paste the cookie
126 into the jiralib-token variable):
129 (defconst jiralib-token
130 `("Cookie" . ,(format "__atl_path=...; studio.crowd.tokenkey=...")))
134 It's possible some things in your Jira instance rarely if ever change - while org-jira
135 will dynamically query everything as needed, it makes use of some
136 variables/caching per-run of Emacs. If you ever notice something was
137 changed on the Jira setup level, you may have to restart your Emacs
138 (or manually unset these variables). By the same token, that makes it
139 possible to hardcode some of these values yourself, so org-jira never
140 needs to look them up.
144 #### Optimizing available actions for status changes
145 Take time inspecting jiralib-available-actions-cache variable as you
146 use org-jira, when you see the type of data it stores, you can then
147 just define it yourself, as such, so repeated usage will not need to
148 re-query the endpoints to get these lists:
151 (defconst jiralib-available-actions-cache
153 ("71" . "Business Question")
154 ("11" . "Start Progress"))
156 ("71" . "Business Question")
158 ("171" . "Failed Peer Review")
161 ("71" . "Business Question")
162 ("21" . "Ready For Review")
164 ("161" . "Stop Progress"))
166 ("71" . "Business Question")
167 ("141" . "Re-open"))))
173 You can reach me directly: Matthew Carter <m@ahungry.com>, or file an
174 issue here on https://github.com/ahungry/org-jira.