-
Notifications
You must be signed in to change notification settings - Fork 577
feat(case): adds ability to create and edit custom timeline events for cases #6067
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Copilot <[email protected]> Signed-off-by: David Whittaker <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds comprehensive timeline event functionality for cases including creating, editing, deleting, and exporting timeline events, as well as Slack integration for adding events. Key changes include new endpoints and view functions for case timeline events, updated Vuex store and Vue components for managing event dialogs, and updated integration with Slack and document export.
Reviewed Changes
Copilot reviewed 16 out of 16 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
tests/case/test_case_event_views.py | Added tests covering create, update, delete and source preservation for custom events |
src/dispatch/static/dispatch/src/case/store.js | Extended state and actions to support event creation, editing, deletion, and pinning |
src/dispatch/static/dispatch/src/case/api.js | New API endpoints for case event CRUD and timeline export |
Vue components (TimelineFilterDialog.vue, TimelineExportDialog.vue, EditEventDialog.vue, DeleteEventDialog.vue, CaseTimelineTabV1.vue) | New dialogs and views for filtering, exporting and editing timeline events |
Slack integration (interactive.py) | Enhanced event logging to support both incidents and cases with improved error logging |
Event and Case services/flows/views | New functions to log, update, delete, and export case events with updated behavior and permissions |
Comments suppressed due to low confidence (3)
src/dispatch/case/service.py:225
- Passing 'pinned=True' unconditionally when creating or updating a case may be unintended; please verify that all cases should be marked as pinned by default.
pinned=True,
src/dispatch/event/service.py:603
- Using the raw event type as a key to look up timeline filter settings may lead to unexpected behavior, as the frontend filters use mapped keys (e.g. 'user_curated_events'); consider applying the same mapping before checking the filter.
if e.pinned or timeline_filters.get(e.type):
src/dispatch/static/dispatch/src/case/TimelineExportDialog.vue:111
- The export filename is constructed using 'this.name', but 'name' is not defined in this component; consider using a defined property or a static filename to ensure the CSV export works as expected.
this.name + "-timeline-export.csv"
This PR adds comprehensive timeline management functionality for cases and extends the ability to use the Slack timeline reaction for marking posts to save on the timeline to cases.
Changes
Added Case Timeline Edit Functionality
Added Slack Post to Timeline Feature to Cases
Timeline Export Dialog
Added Comprehensive Test Coverage
tests/case/test_case_event_views.py
with 4 new test casesScreenshots