Skip to content

Commit e69eead

Browse files
Revert "return full status for cases, including snoozed & waiting for action"
This reverts commit 1948a61.
1 parent 1948a61 commit e69eead

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

dto/case_dto.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func AdaptCaseDto(c models.Case) APICase {
3939
Events: pure_utils.Map(c.Events, NewAPICaseEvent),
4040
InboxId: c.InboxId,
4141
Name: c.Name,
42-
Status: c.Status.EnrichedStatus(c.SnoozedUntil, c.Boost),
42+
Status: string(c.Status),
4343
Outcome: string(c.Outcome),
4444
Tags: pure_utils.Map(c.Tags, NewAPICaseTag),
4545
Files: pure_utils.Map(c.Files, NewAPICaseFile),

models/case.go

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ func (s CaseStatus) CanTransition(newStatus CaseStatus) bool {
7878
}
7979
}
8080

81-
func (s CaseStatus) EnrichedStatus(snoozedUntil *time.Time, boost *BoostReason) string {
82-
if s == CaseInvestigating && snoozedUntil != nil && snoozedUntil.After(time.Now()) {
83-
return "snoozed"
84-
}
85-
if s == CaseInvestigating && boost != nil {
86-
return "waiting_for_action"
87-
}
88-
return string(s)
89-
}
90-
9181
type CaseOutcome string
9282

9383
const (

0 commit comments

Comments
 (0)