TP-0000 | resovle incident fix (#53)
* TP-0000 | resovle incident fix * TP-0000 | sev fix
This commit is contained in:
committed by
GitHub Enterprise
parent
95c1c72771
commit
b9999fc748
@@ -525,8 +525,14 @@ func (i *incidentService) UpdateIncident(c *gin.Context) {
|
||||
incidentEntity.UpdatedAt = time.Now()
|
||||
incidentEntity.UpdatedBy = userInfo.ID
|
||||
i.incidentRepository.UpdateIncident(incidentEntity)
|
||||
|
||||
i.messageUpdateAction.ProcessAction(incidentEntity.SlackChannel)
|
||||
|
||||
incidentStatusEntity, _ := i.incidentRepository.FindIncidentStatusById(incidentEntity.Status)
|
||||
if incidentStatusEntity.IsTerminalStatus && incidentEntity.SeverityId != 1 && incidentEntity.SeverityId != 2 {
|
||||
i.socketModeClient.ArchiveConversation(incidentEntity.SlackChannel)
|
||||
}
|
||||
|
||||
c.JSON(http.StatusOK, common.SuccessResponse("incident updated successfully", http.StatusOK))
|
||||
}
|
||||
|
||||
@@ -573,7 +579,6 @@ func (i *incidentService) UpdateStatus(
|
||||
if incidentStatus.IsTerminalStatus {
|
||||
now := time.Now()
|
||||
incidentEntity.EndTime = &now
|
||||
i.socketModeClient.ArchiveConversation(slackChannel)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user