Skip to content

Instantly share code, notes, and snippets.

@drkarl
Last active April 2, 2022 13:08
Show Gist options
  • Save drkarl/2bffab93b3e44b70cc46d5035186848c to your computer and use it in GitHub Desktop.
Save drkarl/2bffab93b3e44b70cc46d5035186848c to your computer and use it in GitHub Desktop.
How to add Jira tasks to taskwarrior and open browser from command line
#Add to .taskrc
#New UDA jira
uda.jira.type=string
uda.jira.label=Jira
#Add the new UDA to any existing or new report, i.e. to the next report
report.next.columns=id,start.age,entry.age,depends,priority,project,tags,recur,scheduled.countdown,due.remaining,until.remaining,jira,description,urgency
report.next.labels=ID,Active,Age,Deps,P,Project,Tag,Recur,S,Due,Until,Jira,Description,Urg
#Add to .zshrc to open the jira on the browser
export JIRA_URL='http://jira.blah.com/browse/'
export OPEN_BROWSER=#cygstart for cygwin, open for macos, xdg-open or other for Linux
function jira(){
$OPEN_BROWSER $JIRA_URL`task _get "$1".jira`
}
@sedovandrew
Copy link

sedovandrew commented Mar 31, 2022

Thanks for the solution. For myself, I added auto-completion for ZSH:

export JIRA_URL='http://jira.blah.com/browse/'
export OPEN_BROWSER=xdg-open
function jira(){
  $OPEN_BROWSER $JIRA_URL$1
}
compdef _jira jira
function _jira() {
  compadd $(task _unique jira)
}

@cloudbow
Copy link

cloudbow commented Apr 2, 2022

How do I add a jira id to a task using task warrior ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment