MCPcopy Create free account
hub / github.com/git-bug/git-bug / UpdateIssueStatus

Function UpdateIssueStatus

bridge/jira/export.go:456–475  ·  view source on GitHub ↗

UpdateIssueStatus attempts to change the "status" field by finding a transition which achieves the desired state and then performing that transition

(client *Client, issueKeyOrID string, desiredStateNameOrID string)

Source from the content-addressed store, hash-verified

454// transition which achieves the desired state and then performing that
455// transition
456func UpdateIssueStatus(client *Client, issueKeyOrID string, desiredStateNameOrID string) (time.Time, error) {
457 var responseTime time.Time
458
459 tlist, err := client.GetTransitions(issueKeyOrID)
460 if err != nil {
461 return responseTime, err
462 }
463
464 transition := getTransitionTo(tlist, desiredStateNameOrID)
465 if transition == nil {
466 return responseTime, errTransitionNotFound
467 }
468
469 responseTime, err = client.DoTransition(issueKeyOrID, transition.ID)
470 if err != nil {
471 return responseTime, err
472 }
473
474 return responseTime, nil
475}

Callers 1

exportBugMethod · 0.85

Calls 3

getTransitionToFunction · 0.85
GetTransitionsMethod · 0.80
DoTransitionMethod · 0.80

Tested by

no test coverage detected