Skip to content

Commit

Permalink
Set closed at time when resolving case in Slack plugin (#4146)
Browse files Browse the repository at this point in the history
  • Loading branch information
wssheldon authored Dec 18, 2023
1 parent abe8b93 commit f96e17b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/dispatch/case/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ class CaseUpdate(CaseBase):
case_priority: Optional[CasePriorityBase]
case_severity: Optional[CaseSeverityBase]
case_type: Optional[CaseTypeBase]
closed_at: Optional[datetime] = None
duplicates: Optional[List[CaseRead]] = []
related: Optional[List[CaseRead]] = []
reporter: Optional[ParticipantUpdate]
Expand Down
1 change: 1 addition & 0 deletions src/dispatch/plugins/dispatch_slack/case/interactive.py
Original file line number Diff line number Diff line change
Expand Up @@ -1750,6 +1750,7 @@ def resolve_case(
resolution=f"Case resolved through user engagement. User context: {context_from_user}",
visibility=case.visibility,
status=CaseStatus.closed,
closed_at=datetime.utcnow(),
)
case = case_service.update(db_session=db_session, case=case, case_in=case_in, current_user=user)
blocks = create_case_message(case=case, channel_id=channel_id)
Expand Down

0 comments on commit f96e17b

Please sign in to comment.