Skip to content
This repository was archived by the owner on Sep 3, 2025. It is now read-only.

Conversation

@whitdog47
Copy link
Contributor

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

  1. Added Case Timeline Edit Functionality

    • Brought case timeline editing capabilities on par with incident timeline
    • Users can now edit existing timeline events (description, time, etc.)
    • Added ability to pin/unpin timeline events for better organization
    • Timeline events can be deleted when no longer needed
  2. Added Slack Post to Timeline Feature to Cases

    • Users can now mark Slack posts from cases as timeline events directly from Slack
    • Events are properly attributed to the Slack user who created them
    • Source field shows "Slack message from {name}" for proper attribution
  3. Timeline Export Dialog

    • Like with incidents, users can now export the timeline to the Case Document or CSV
  4. Added Comprehensive Test Coverage

    • Created tests/case/test_case_event_views.py with 4 new test cases
    • Tests cover create, update, delete, and source preservation functionality

Screenshots

image

@whitdog47 whitdog47 requested a review from Copilot June 19, 2025 23:40

This comment was marked as outdated.

@whitdog47 whitdog47 self-assigned this Jun 19, 2025
@whitdog47 whitdog47 added the enhancement New feature or request label Jun 19, 2025
@whitdog47 whitdog47 requested a review from Copilot June 19, 2025 23:44

This comment was marked as outdated.

whitdog47 and others added 2 commits June 19, 2025 16:57
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Signed-off-by: David Whittaker <84562015+whitdog47@users.noreply.github.com>
@whitdog47 whitdog47 requested a review from Copilot June 19, 2025 23:59
Copy link
Contributor

Copilot AI left a 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"

@whitdog47 whitdog47 requested a review from aaronherman June 20, 2025 00:00
@whitdog47 whitdog47 merged commit 3ff1002 into main Jun 23, 2025
9 checks passed
@whitdog47 whitdog47 deleted the feat/case-timeline-improvements branch June 23, 2025 16:22
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants