├── layers.el ├── packages.el └── README.md /layers.el: -------------------------------------------------------------------------------- 1 | (configuration-layer/declare-layer 'org) 2 | -------------------------------------------------------------------------------- /packages.el: -------------------------------------------------------------------------------- 1 | ;;; packages.el --- org-jira Layer packages File for Spacemacs 2 | ;; 3 | ;; Copyright (c) 2012-2014 Sylvain Benner 4 | ;; Copyright (c) 2014-2015 Sylvain Benner & Contributors 5 | ;; 6 | ;; Author: Jean-Francois Im 7 | ;; URL: https://github.com/jfim/org-jira 8 | ;; 9 | ;; This file is not part of GNU Emacs. 10 | ;; 11 | ;;; License: GPLv3 12 | 13 | (defvar org-jira-packages '((org-jira :location elpa))) 14 | 15 | (defvar org-jira-excluded-packages '() "List of packages to exclude.") 16 | 17 | (defun org-jira/init-org-jira () 18 | (use-package org-jira 19 | :defer t 20 | :init 21 | (progn 22 | (spacemacs/declare-prefix-for-mode 'org-mode "mj" "jira") 23 | (spacemacs/declare-prefix-for-mode 'org-mode "mjp" "projects") 24 | (spacemacs/declare-prefix-for-mode 'org-mode "mji" "issues") 25 | (spacemacs/declare-prefix-for-mode 'org-mode "mjs" "subtasks") 26 | (spacemacs/declare-prefix-for-mode 'org-mode "mjc" "comments") 27 | (spacemacs/declare-prefix-for-mode 'org-mode "mjt" "todos") 28 | (spacemacs/set-leader-keys-for-major-mode 'org-mode 29 | "jpg" 'org-jira-get-projects 30 | "jib" 'org-jira-browse-issue 31 | "jig" 'org-jira-get-issues 32 | "jih" 'org-jira-get-issues-headonly 33 | "jif" 'org-jira-get-issues-from-filter-headonly 34 | "jiF" 'org-jira-get-issues-from-filter 35 | "jiu" 'org-jira-update-issue 36 | "jiw" 'org-jira-progress-issue 37 | "jir" 'org-jira-refresh-issue 38 | "jic" 'org-jira-create-issue 39 | "jik" 'org-jira-copy-current-issue-key 40 | "jsc" 'org-jira-create-subtask 41 | "jsg" 'org-jira-get-subtasks 42 | "jcu" 'org-jira-update-comment 43 | "jtj" 'org-jira-todo-to-jira) 44 | ) 45 | )) 46 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | Just a heads up, the development version of spacemacs appears to have org-jira support: http://develop.spacemacs.org/layers/+emacs/org/README.html#jira-support 2 | 3 | # org-jira Spacemacs layer 4 | 5 | This Spacemacs layer allows using Jira from within org-mode. This uses the JIRA REST API; if you need support for the deprecated JIRA SOAP API, check out the soap-api branch. 6 | 7 | ## Installation 8 | 9 | * Clone the git repository somewhere and add it as a private layer in spacemacs 10 | 11 | ```bash 12 | git clone git@github.com:jfim/org-jira.git 13 | ln -s "`pwd`/org-jira" ~/.emacs.d/private/org-jira 14 | ``` 15 | 16 | * Add the `org-jira` layer to your .spacemacs file 17 | * Add the Jira url to your `.spacemacs` file. For example, if your Jira is installed at https://example:443/secure/Dashboard.jspa 18 | 19 | ```lisp 20 | (setq jiralib-url "https://example:443") 21 | ``` 22 | 23 | * Configure the directory in which `org-jira` will create org files. You probably want to add it to your agenda files as well, so that org-agenda can show your jira tickets as part of your todo list. `org-jira` will create one file per Jira project in this directory. For example, if you're assigned projects FOO and BAR, it'll create `FOO.org` and `BAR.org` in this directory, each containing the tickets assigned to you. 24 | 25 | ```lisp 26 | (setq org-jira-working-dir "~/org-jira") 27 | (setq org-agenda-files '("~/org" "~/org-jira")) 28 | ``` 29 | 30 | ## Get started 31 | 32 | * Open a random org file, it doesn't matter which one. 33 | * Press , j i g (`'org-jira-get-issues`) to retrieve all Jira tickets assigned to you. It'll ask for a login and password. This will create org files in the `org-jira-working-dir` previously configured. 34 | * Start working on a Jira ticket by opening the relevant org file, moving your cursor onto a Jira ticket and then pressing , j i w (`'org-jira-progress-issue`) 35 | * Comment on a ticket by adding : 36 | 37 | ``` 38 | ** Comment: 39 | This is a comment on this ticket. 40 | ``` 41 | 42 | You'll then need to synchronize the comment with , j c u (`'org-jira-update-comment`) 43 | * You can change the ticket priority by editing the `:priority:` value in the `:PROPERTIES:` drawer and syncing it with , j i u (`'org-jira-update-issue`) 44 | * To get the latest updates on a ticket, you can refresh it by pressing , j i r (`'org-jira-refresh-issue`) 45 | * You can also view the current ticket in your browser by pressing , j i b (`'org-jira-browse-issue`) 46 | * Finally, when you're done with the ticket, you can close it by doing , j i w (`'org-jira-progress-issue`) and selecting `Close issue`. You may need to hit backspace if the autocompletion suggestion is hiding the close option. 47 | 48 | ## Usage 49 | 50 | When in org-mode: 51 | 52 | * , j p g `'org-jira-get-projects` 53 | * , j i b `'org-jira-browse-issue` 54 | * , j i g `'org-jira-get-issues` 55 | * , j i h `'org-jira-get-issues-headonly` 56 | * , j i f `'org-jira-get-issues-from-filter-headonly` 57 | * , j i F `'org-jira-get-issues-from-filter` 58 | * , j i u `'org-jira-update-issue` 59 | * , j i w `'org-jira-progress-issue` 60 | * , j i r `'org-jira-refresh-issue` 61 | * , j i c `'org-jira-create-issue` 62 | * , j i k `'org-jira-copy-current-issue-key` 63 | * , j s c `'org-jira-create-subtask` 64 | * , j s g `'org-jira-get-subtasks` 65 | * , j c u `'org-jira-update-comment` 66 | * , j t j `'org-jira-todo-to-jira` 67 | --------------------------------------------------------------------------------