// TransitionIssue transitions an issue's status to the one specified by settings.issues.conflict_status
TransitionIssue transitions an issue's status to the one specified by settings.issues.conflict_status
// TransitionIssue transitions an issue ' s status to the one specified by settings . issues . conflict_status
func (j *jiraIssueProvider) TransitionIssue(i issue) (ok bool) {
	if !config.UserSettingEnabled(i.Owner, config.IssueTransitions) {
		return
	}
	transitionName := config.GetString(config.IssueConflictStatus)
	if transitionName == "" {
		log.Println(config.CheckMessage(config.IssueConflictStatus, "e.g. 'In Progress'"))
		return
	}
	trs, _, err := j.c.Issue.GetTransitions(i.ID)
	if err != nil {
		log.Printf("unable to retrieve possible transition list for issue %v: %v", i.ID, err)
		return
	}
	transitionID := ""
	for _, tr := range trs {
		if tr.Name == transitionName {
			transitionID = tr.ID
		}
	}
	if transitionID == "" {
		log.Printf("%s is not a valid transition for issue: %s", transitionName, i.ID)
		return
	}
	jiraIssue, _, err := j.c.Issue.Get(i.ID, nil)
	if err != nil || !j.shouldTransition(jiraIssue, transitionName) {
		log.Printf("Not transitioning issue: %s.", i.ID)
		return
	}
	_, err = j.c.Issue.DoTransition(i.ID, transitionID)
	if err != nil {
		log.Printf("unable to transition issue: %v", err)
	}
	ok = true
	return
}
func ( j * jiraIssueProvider ) TransitionIssue ( i issue ) ( ok bool ) { if ! config . UserSettingEnabled ( i . Owner , config . IssueTransitions ) { return } transitionName := config . GetString ( config . IssueConflictStatus ) if transitionName == " " { log . Println ( config . CheckMessage ( config . IssueConflictStatus , " " ) ) return } trs , _ , err := j . c . Issue . GetTransitions ( i . ID ) if err != nil { log . Printf ( " " , i . ID , err ) return } transitionID := " " for _ , tr := range trs { if tr . Name == transitionName { transitionID = tr . ID } } if transitionID == " " { log . Printf ( " " , transitionName , i . ID ) return } jiraIssue , _ , err := j . c . Issue . Get ( i . ID , nil ) if err != nil || ! j . shouldTransition ( jiraIssue , transitionName ) { log . Printf ( " " , i . ID ) return } _ , err = j . c . Issue . DoTransition ( i . ID , transitionID ) if err != nil { log . Printf ( " " , err ) } ok = true return }
TransitionIssue transitions an issue's status to the one specified by settings.issues.conflict_status
TransitionIssue transitions an issue ' s status to the one specified by settings . issues . conflict_status
// Find the desired transitionName in the possible transition list for this issue