From ebf170085cf97bce9054b188450e9a8df6661a22 Mon Sep 17 00:00:00 2001 From: Cory Bennett Date: Mon, 23 Feb 2015 12:09:40 -0800 Subject: [PATCH] automatically close duplicate issues with "Duplicate" resolution --- jira/main.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/jira/main.go b/jira/main.go index 9848279..159a0b9 100644 --- a/jira/main.go +++ b/jira/main.go @@ -224,10 +224,16 @@ Command Options: args["ISSUE"].(string), ) } else if validCommand("dups") { - err = c.CmdDups( + if err = c.CmdDups( args["DUPLICATE"].(string), args["ISSUE"].(string), - ) + ); err == nil { + opts["resolution"] = "Duplicate" + err = c.CmdTransition( + args["DUPLICATE"].(string), + "close", + ) + } } else if validCommand("watch") { err = c.CmdWatch( args["ISSUE"].(string),