From 5d42458b48ffdc294ac3e21fdbc650c4e360b5d3 Mon Sep 17 00:00:00 2001 From: Zack Hsi Date: Fri, 31 Jul 2015 14:50:41 -0700 Subject: [PATCH 1/2] Add JIRA setting to show dashboard instead of create issue My most common JIRA action is to view my dashboard, so that's what the command `jira` should do. --- plugins/jira/jira.plugin.zsh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 9a8932702..2522cbe21 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -2,6 +2,10 @@ # You can also set JIRA_URL in your .zshrc or put .jira-url in your home directory # .jira-url in the current directory takes precedence # +# If you prefer the jira command to show your dashboard, set: +#JIRA_DASHBOARD="true" +# in you .zshrc +# # If you use Rapid Board, set: #JIRA_RAPID_BOARD="true" # in you .zshrc @@ -31,8 +35,11 @@ open_jira_issue () { fi if [ -z "$1" ]; then - echo "Opening new issue" - open_command "${jira_url}/secure/CreateIssue!default.jspa" + if [[ "$JIRA_DASHBOARD" = "true" ]]; then + open_command "${jira_url}/secure/Dashboard.jspa" + else + open_command "${jira_url}/secure/CreateIssue!default.jspa" + fi elif [[ "$1" = "assigned" || "$1" = "reported" ]]; then jira_query $@ else From 1ddd678fcc2338e65834ee9ea9dfda67fe501e55 Mon Sep 17 00:00:00 2001 From: Zack Hsi Date: Sun, 30 Aug 2015 21:02:30 -0600 Subject: [PATCH 2/2] Use JIRA_DEFAULT_ACTION in place of JIRA_DASHBOARD --- plugins/jira/jira.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 2522cbe21..240946c94 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -3,11 +3,11 @@ # .jira-url in the current directory takes precedence # # If you prefer the jira command to show your dashboard, set: -#JIRA_DASHBOARD="true" +# JIRA_DEFAULT_ACTION="dashboard" # in you .zshrc # # If you use Rapid Board, set: -#JIRA_RAPID_BOARD="true" +# JIRA_RAPID_BOARD="true" # in you .zshrc # # Setup: cd to/my/project @@ -35,7 +35,7 @@ open_jira_issue () { fi if [ -z "$1" ]; then - if [[ "$JIRA_DASHBOARD" = "true" ]]; then + if [[ "$JIRA_DEFAULT_ACTION" = "dashboard" ]]; then open_command "${jira_url}/secure/Dashboard.jspa" else open_command "${jira_url}/secure/CreateIssue!default.jspa"