Issue content should not be updated when closing with comment (#2833)
This commit is contained in:
parent
8798cf4e3b
commit
240609432b
5 changed files with 78 additions and 25 deletions
|
@ -272,15 +272,15 @@ func (c *Comment) MailParticipants(e Engine, opType ActionType, issue *Issue) (e
|
|||
return fmt.Errorf("UpdateIssueMentions [%d]: %v", c.IssueID, err)
|
||||
}
|
||||
|
||||
content := c.Content
|
||||
|
||||
switch opType {
|
||||
case ActionCommentIssue:
|
||||
issue.Content = c.Content
|
||||
case ActionCloseIssue:
|
||||
issue.Content = fmt.Sprintf("Closed #%d", issue.Index)
|
||||
content = fmt.Sprintf("Closed #%d", issue.Index)
|
||||
case ActionReopenIssue:
|
||||
issue.Content = fmt.Sprintf("Reopened #%d", issue.Index)
|
||||
content = fmt.Sprintf("Reopened #%d", issue.Index)
|
||||
}
|
||||
if err = mailIssueCommentToParticipants(e, issue, c.Poster, c, mentions); err != nil {
|
||||
if err = mailIssueCommentToParticipants(e, issue, c.Poster, content, c, mentions); err != nil {
|
||||
log.Error(4, "mailIssueCommentToParticipants: %v", err)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue