diff --git a/.gitignore b/.gitignore index 2ce1f1c7..83eb9724 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,5 @@ src/github.com/op/ src/gopkg.in/ jira jira.exe -schemas/*.json \ No newline at end of file +schemas/*.json +t/issue.props \ No newline at end of file diff --git a/main/main.go b/main/main.go index 94207b75..36be4137 100644 --- a/main/main.go +++ b/main/main.go @@ -376,13 +376,17 @@ Command Options: opts["resolution"] = "Duplicate" trans, err := c.ValidTransitions(args[0]) if err == nil { - close := trans.Find("close") - if close != nil { + if trans.Find("close") != nil { err = c.CmdTransition(args[0], "close") - } else { + } else if trans.Find("done") != nil { // for now just assume if there is no "close", then // there is a "done" state err = c.CmdTransition(args[0], "done") + } else if trans.Find("start") != nil { + err = c.CmdTransition(args[0], "start") + if err == nil { + err = c.CmdTransition(args[0], "stop") + } } } @@ -435,7 +439,7 @@ Command Options: case "in-progress": requireArgs(1) setEditing(false) - err = c.CmdTransition(args[0], "In Progress") + err = c.CmdTransition(args[0], "Progress") case "comment": requireArgs(1) setEditing(true) diff --git a/t/100basic.t b/t/100basic.t index 636c8ee2..4b6e27df 100755 --- a/t/100basic.t +++ b/t/100basic.t @@ -7,7 +7,7 @@ export JIRA_LOG_FORMAT="%{level:-5s} %{message}" PLAN 84 # cleanup from previous failed test executions -$jira ls | awk -F: '{print $1}' | while read issue; do ../jira done $issue; done +($jira ls | awk -F: '{print $1}' | while read issue; do ../jira done $issue; done) | sed 's/^/# CLEANUP: /g' # reset login RUNS $jira logout diff --git a/t/100create.t b/t/100create.t deleted file mode 100755 index b5bbe65c..00000000 --- a/t/100create.t +++ /dev/null @@ -1,132 +0,0 @@ -#!/bin/bash -eval "$(curl -q -s https://raw.githubusercontent.com/coryb/osht/master/osht.sh)" -cd $(dirname $0) -jira=../jira - -PLAN 24 - -RUNS $jira create --project BASIC -o summary=summary -o description=description --noedit --saveFile issue.props -issue=$(awk '/issue/{print $2}' issue.props) -DIFF <