Netflix / dispatch

All of the ad-hoc things you're doing to manage incidents today, done for you, and much more!
Apache License 2.0
5.09k stars 506 forks source link

ux(slack): improve case report modal type to assignee and oncall resolution #5197

Closed wssheldon closed 1 month ago

wssheldon commented 1 month ago

Problem

Users may accidentally select the incorrect case type when reporting a case. Case types determine who the assignee of a case will be based on the configured on-call schedule for that case type.

Solution

This change improves the user experience of reporting a case in Slack by surfacing who the assignee of a case will be before they report it. Additionally, we provide additional context as 'tips' in the modal to inform the user that they choice they make when selecting a case type does determine backend behavior. Finally, we extend the PagerDuty on-call plugin to support fetching the on-call service URL to further enrich the modal with a hyperlink to on-call schedule that's associated with the case type they selected.

Notes

The backend will continue to function as expected. This is a no-op from a case creation perspective. We simply surface additional context to the user. The logic that determines assignee of a case can be seen below:

    assignee_email = None
    if case_in.assignee:
        # we assign the case to the assignee provided
        assignee_email = case_in.assignee.individual.email
    elif case_type.oncall_service:
        # we assign the case to the oncall person for the given case type
        assignee_email = service_flows.resolve_oncall(
            service=case_type.oncall_service, db_session=db_session
        )
    elif current_user:
        # we fall back to assign the case to the current user
        assignee_email = current_user.email

Screencast

https://github.com/user-attachments/assets/cd1af99f-a6ab-4538-a351-9de11fcbcd5e

wssheldon commented 1 month ago

Note, I believe the override may not be working as expected -- digging in on that.

wssheldon commented 1 month ago

Note, I believe the override may not be working as expected -- digging in on that.

Fixed in https://github.com/Netflix/dispatch/pull/5197/commits/5c377c11300bc9f13e0cf0ab6c6648491df210b5