1
0

fix(task): make sure the task's last updated timestamp is always updated when releated entities changed

This commit is contained in:
kolaente
2023-02-14 20:09:05 +01:00
parent 659803fadf
commit fceb5dae0f
7 changed files with 198 additions and 8 deletions

View File

@ -109,7 +109,16 @@ func (tc *TaskComment) Delete(s *xorm.Session, a web.Auth) error {
if deleted == 0 {
return ErrTaskCommentDoesNotExist{ID: tc.ID}
}
return err
if err != nil {
return err
}
return events.Dispatch(&TaskCommentDeletedEvent{
Task: &Task{ID: tc.TaskID},
Comment: tc,
Doer: tc.Author,
})
}
// Update updates a task text by its ID