8652fd64efe7bcf950494856fd10ef1f5627a9ea

Author
David Hartmann <dh@thesilverlogic.com>
Committer
ncanceill <nicolas.canceill@ens-cachan.org>
Date

Message

added comment functionality

added commenting functionality by appending 'm' after the issue key (regular JIRA shortcut)

Diff

 1diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh
 2index 4a36b882dcac1d81fd9f17ab56b83f44e8de2639..8ad60b8fecdf1da67b2ad5d2f64512a0ec0ee2ce 100644
 3--- a/plugins/jira/jira.plugin.zsh
 4+++ b/plugins/jira/jira.plugin.zsh
 5@@ -49,6 +49,20 @@ open_jira_issue () {
 6     else
 7       $open_cmd  "$jira_url/browse/$jira_prefix$1"
 8     fi
 9+  else 
10+    local addcomment=''
11+    if [[ "$2" == "m" ]]; then
12+      addcomment="#add-comment"
13+      echo "Add comment to issue #$1"
14+    else
15+      echo "Opening issue #$1"
16+    fi
17+    
18+    if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then
19+      $open_cmd  "$jira_url/issues/$1$addcomment"
20+    else
21+      $open_cmd  "$jira_url/browse/$1$addcomment"
22+    fi
23   fi
24 }
25