mirror of
https://github.com/Threnklyn/jira.git
synced 2026-05-18 20:23:28 +02:00
[#45] automatically add comment to issue even if transition does not support comment updates during transtion
This commit is contained in:
@@ -133,6 +133,15 @@ func CmdTransition(o *oreo.Client, globals *jiracli.GlobalOptions, opts *Transit
|
||||
Overrides map[string]string `yaml:"overrides,omitempty" json:"overrides,omitempty"`
|
||||
}
|
||||
|
||||
if _, ok := transMeta.Fields["comment"]; !ok && opts.Overrides["comment"] != "" {
|
||||
comment := jiradata.Comment{
|
||||
Body: opts.Overrides["comment"],
|
||||
}
|
||||
if _, err := jira.IssueAddComment(o, globals.Endpoint.Value, opts.Issue, &comment); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
issueUpdate := jiradata.IssueUpdate{}
|
||||
input := templateInput{
|
||||
Issue: issueData,
|
||||
|
||||
Reference in New Issue
Block a user