[ Bug]: Jira On-Prem provider resets the priority on every update
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
- Create a ticket through the on-prem provider.
- Raise its priority in Jira to Highest.
- Run a workflow action with
issue_idand a newsummary, saying nothing aboutpriority. - 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.
Source: keephq/keep