From e40f9c10c387b460dce9fba50f53c8b50d52f58f Mon Sep 17 00:00:00 2001 From: Don Brower Date: Wed, 24 Aug 2016 14:36:23 -0400 Subject: [PATCH] Prefer transition names which match exactly Some transitions are substrings of other transitions, and the current loop sometimes never chose the correct one. For example, it would never choose "QA" if there were also a transtion "Deploy to QA". Ditto for "Open" and "Reopen". --- commands.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands.go b/commands.go index 684949c6..e9aa6bf2 100644 --- a/commands.go +++ b/commands.go @@ -666,6 +666,9 @@ func (c *Cli) CmdTransition(issue string, trans string) error { transName = name transID = id transMeta = transition.(map[string]interface{}) + if strings.ToLower(name) == strings.ToLower(trans) { + break + } } } if transID == "" {