From 8652fd64efe7bcf950494856fd10ef1f5627a9ea Mon Sep 17 00:00:00 2001 From: David Hartmann Date: Sun, 22 Jun 2014 03:10:53 +0200 Subject: [PATCH] added comment functionality added commenting functionality by appending 'm' after the issue key (regular JIRA shortcut) --- plugins/jira/jira.plugin.zsh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 4a36b882d..8ad60b8fe 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -49,6 +49,20 @@ open_jira_issue () { else $open_cmd "$jira_url/browse/$jira_prefix$1" fi + else + local addcomment='' + if [[ "$2" == "m" ]]; then + addcomment="#add-comment" + echo "Add comment to issue #$1" + else + echo "Opening issue #$1" + fi + + if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then + $open_cmd "$jira_url/issues/$1$addcomment" + else + $open_cmd "$jira_url/browse/$1$addcomment" + fi fi }