summaryrefslogtreecommitdiff
path: root/plugins/jira/jira.plugin.zsh
diff options
context:
space:
mode:
authorArnaud Zheng <arnaud-zg@users.noreply.github.com>2023-01-09 20:53:32 +0100
committerGitHub <noreply@github.com>2023-01-09 19:53:32 +0000
commite0d0dfb845a8f1eb35bce8ca5afcd76cb2ffbb35 (patch)
treee4a2d6e2a149b1a954ec42231368fdf57fd2a620 /plugins/jira/jira.plugin.zsh
parent585084354e7ecf3b93c6eedb2ece70e914ee28b9 (diff)
downloadzsh-e0d0dfb845a8f1eb35bce8ca5afcd76cb2ffbb35.tar.gz
zsh-e0d0dfb845a8f1eb35bce8ca5afcd76cb2ffbb35.tar.bz2
zsh-e0d0dfb845a8f1eb35bce8ca5afcd76cb2ffbb35.zip
feat(jira): support rapid view on rapid board mode (#9459)
* feat(jira): support rapid view on rapid board mode * Update README to clarify how the rapid board/view works Co-authored-by: Robby Russell <robby@planetargon.com>
Diffstat (limited to 'plugins/jira/jira.plugin.zsh')
-rw-r--r--plugins/jira/jira.plugin.zsh13
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh
index 71224bdfb..e789fce92 100644
--- a/plugins/jira/jira.plugin.zsh
+++ b/plugins/jira/jira.plugin.zsh
@@ -50,7 +50,7 @@ function jira() {
elif [[ "$action" == "dashboard" ]]; then
echo "Opening dashboard"
if [[ "$JIRA_RAPID_BOARD" == "true" ]]; then
- open_command "${jira_url}/secure/RapidBoard.jspa"
+ _jira_rapid_board ${@}
else
open_command "${jira_url}/secure/Dashboard.jspa"
fi
@@ -65,6 +65,7 @@ function jira() {
echo "JIRA_URL=$jira_url"
echo "JIRA_PREFIX=$jira_prefix"
echo "JIRA_NAME=$JIRA_NAME"
+ echo "JIRA_RAPID_VIEW=$JIRA_RAPID_VIEW"
echo "JIRA_RAPID_BOARD=$JIRA_RAPID_BOARD"
echo "JIRA_DEFAULT_ACTION=$JIRA_DEFAULT_ACTION"
echo "JIRA_TEMPO_PATH=$JIRA_TEMPO_PATH"
@@ -112,6 +113,16 @@ Valid options, in order of precedence:
EOF
}
+function _jira_rapid_board() {
+ rapid_view=${2:=$JIRA_RAPID_VIEW}
+
+ if [[ -z $rapid_view ]]; then
+ open_command "${jira_url}/secure/RapidBoard.jspa"
+ else
+ open_command "${jira_url}/secure/RapidBoard.jspa?rapidView=$rapid_view"
+ fi
+}
+
function _jira_query() {
emulate -L zsh
local verb="$1"