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 introduces a new feature that updates the metadata of a ticket whenever the incident type changes. This ensures that the ticket reflects the most accurate and relevant information, improving incident management and tracking.

Key Changes

  1. Incident Service Update:

    • Modified the update function in src/dispatch/incident/service.py to include logic for updating ticket metadata when the incident type changes and contains plugin metadata. This is contingent on the project key of the ticket matching the new incident type's project key.
  2. Plugin Interfaces:

    • Added update_metadata methods in src/dispatch/plugins/dispatch_core/plugin.py and src/dispatch/plugins/dispatch_jira/plugin.py. These methods are responsible for updating the metadata of the Jira ticket.
  3. Ticket Flow Enhancements:

    • Implemented a new function update_incident_ticket_metadata in src/dispatch/ticket/flows.py. This function coordinates the metadata update process by:
      • Retrieving the appropriate ticket plugin instance.
      • Using the plugin to update the ticket's metadata with the new incident type details.
      • Logging an event to record the update.

@whitdog47 whitdog47 added the enhancement New feature or request label Dec 5, 2024
@whitdog47 whitdog47 self-assigned this Dec 5, 2024
Copy link
Contributor

@forestmonster forestmonster left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent!

@whitdog47 whitdog47 merged commit 15cc89d into master Dec 11, 2024
8 checks passed
@whitdog47 whitdog47 deleted the enhancement/update-metadata-on-incident-type-change branch December 11, 2024 00:48
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