You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi all, I wanted to just share some custom commands that I pieced together and found useful since documentation was a little hard to come by. I'm using like 0.1% of what this tool has to offer but its proven useful nonetheless.
Create/Edit Jira Ticket using Browser (instead of $EDITOR)
This opens the browser to the CreateIssueDetails page with several fields pre-populated to make it easier to create tickets without forgetting to add a component, epic, etc.
Usages: jira qc,jira qc --component1, jira qc --epic PROJ-1234, jira qc --component1 --component2 --summary "this is the title"
For epics or sprints, check which custom field ID you're using by running: jira createmeta | jq '.fields'. Edit the board name, component id, sprint field name, and epic field name below:
- name: quick-createaliases:
- qchelp: quick create jira ticket using web uioptions:
- name: typedefault: 3
- name: prioritydefault: 3
- name: summarydefault: Title
- name: reporterdefault: $(whoami)
- name: component1type: BOOLdefault: false
- name: component2type: BOOLdefault: false
- name: epicscript: | board_name="!!YOUR BOARD NAME HERE!!" board_id=$({{jira}} req "/rest/agile/1.0/board?projectKeyOrId=$JIRA_PROJECT&name=$board_name" --gjq values.0.id) project_id=$({{jira}} req "/rest/agile/1.0/board/$board_id/project/" --gjq values.0.id) sprint_id=$({{jira}} req "/rest/agile/1.0/board/$board_id/sprint?state=active" --gjq values.0.id) echo "Creaing issue on project $JIRA_PROJECT ($project_id), board $board_name ($board_id), sprint $sprint_id" url="https://issues.labcollab.net/secure/CreateIssueDetails%21init.jspa?" url+="pid=$project_id" url+="&customfield_10227=$sprint_id" url+="&reporter={{options.reporter}}" url+="&issuetype={{options.type}}" url+="&summary={{options.summary}}" url+="&priority={{options.priority}}" if [[ "{{ options.component1 }}" == "true" ]]; then url+="&components=!!COMPONENT1_IDHERE!!" fi if [[ "{{ options.component2 }}" == "true" ]]; then url+="&components=!!COMPONENT2_IDHERE!!" fi if [[ "{{ options.epic }}" != "<no value>" ]]; then url+="&customfield_10600=key:{{ options.epic }}" fi echo "\nURL: $url" open "$url"
Opens a named query using FZF to create a text user interface. You can easily search through issues and use your arrow keys or mouse to click on different issues and see them populate in the sidebar on the right.
Requires: brew install fzf.
- name: ls-named-query-fzf
aliases:
- lf
help: ls with named queries using fzf interface
args:
- name: query
script: |
{{jira}} ls -n {{args.query}} | \
fzf --preview="echo {} | cut -d : -f 1 | xargs -I % sh -c 'jira view %'"
Hi all, I wanted to just share some custom commands that I pieced together and found useful since documentation was a little hard to come by. I'm using like 0.1% of what this tool has to offer but its proven useful nonetheless.
Create/Edit Jira Ticket using Browser (instead of $EDITOR)
This opens the browser to the CreateIssueDetails page with several fields pre-populated to make it easier to create tickets without forgetting to add a component, epic, etc.
Usages:
jira qc
,jira qc --component1
,jira qc --epic PROJ-1234
,jira qc --component1 --component2 --summary "this is the title"
For epics or sprints, check which custom field ID you're using by running:
jira createmeta | jq '.fields'
. Edit the board name, component id, sprint field name, and epic field name below:Thanks to @coryb for this comment: True life custom commands samples #230 (comment).
Open Named Query using FZF
Opens a named query using FZF to create a text user interface. You can easily search through issues and use your arrow keys or mouse to click on different issues and see them populate in the sidebar on the right.
Requires:
brew install fzf
.Credit goes to @itai-stratoscale from tig like interface? #156 (comment).
Auth via Cookies for private Jira.
Run
jira a
to grab Jira cookies from Chrome to authenticate with difficult private Jira's behind SSO.Requires:
brew install jq
andpip3 install --user get-browser-cookies
.Thanks to the folks in Self-hosted Jira behind Okta #241 for the idea. Looks like the folks in Ability to use JSESSION token from Cookie for self-hosted JIRA installs? #231 came to a similar approach.
The text was updated successfully, but these errors were encountered: