Skip to content

[馃悰 Bug]: Jira On-Prem provider resets the priority on every update#6751

Description

@purisev

Describe the bug

JiraonpremProvider._notify
(keep/providers/jiraonprem_provider/jiraonprem_provider.py:524) declares
priority: str = "Medium", and the update branch hands that value to
__update_issue (line 551). __update_issue writes the field whenever the value
is truthy (lines 386-387):

if priority:
    update["priority"] = [{"set": {"name": priority}}]

So a step that updates a summary also sets the priority to Medium. A ticket
somebody escalated by hand goes back to Medium the next time any workflow touches
it, and nothing in that step mentioned priority.

The Jira Cloud provider does not do this. Its _notify has no priority
parameter and passes none to its own __update_issue
(keep/providers/jira_provider/jira_provider.py:546).

To Reproduce

  1. Create a ticket through the on-prem provider.
  2. Raise its priority in Jira to Highest.
  3. Run a workflow action with issue_id and a new summary, saying nothing
    about priority.
  4. The ticket is Medium again.

Expected behavior

An update changes the priority only when the workflow names one. Creating an
issue keeps the Medium fallback, since the create screen carries the field.

Additional context

A PR implementing this follows.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions