Skip to content

fix(jiraonprem): stop resetting the priority on every update - #6755

Open
purisev wants to merge 2 commits into
keephq:mainfrom
purisev:fix/jiraonprem-priority-on-update
Open

fix(jiraonprem): stop resetting the priority on every update#6755
purisev wants to merge 2 commits into
keephq:mainfrom
purisev:fix/jiraonprem-priority-on-update

Conversation

@purisev

@purisev purisev commented Sep 3, 2026

Copy link
Copy Markdown

Problem

See #6751. _notify defaults priority to "Medium" and passes it to
__update_issue, which writes the field for any truthy value. An update about
the summary rewrites the priority of a ticket somebody escalated by hand.

Fix

priority defaults to None and reaches __update_issue as it came, so the
update writes the field only for a value the workflow named. The create path
passes priority or "Medium", so a new issue keeps the same default it has
today.

Tests

tests/test_jira_provider.py grows to 12 tests, all passing: an update with no
priority leaves the field out of the request body, an update naming one sets it,
and a create with no priority still sends Medium.

Note on the other Jira PRs

#6752, #6753 and #6754 report three more gaps in the same two providers, each
with a PR of its own. The on-prem transitions one edits the same _notify
signature line as this PR, so whichever of the two lands second needs a one line
resolution. Everything else between the four is additive.

Fixes #6751

_notify defaulted priority to Medium and passed it straight to
__update_issue, which sets whatever it is given. So an update that only
touched the summary, or added a label, also rewrote the ticket's
priority, without the workflow mentioning priority anywhere. On Data
Center it can be worse than a silent change: priority is often absent
from a project's edit screen, and then the whole update fails on a field
nobody asked for.

The cloud provider has no such default, so the same workflow behaved
differently against the two Jiras.

Default to None and let the existing truthiness check in __update_issue
do the rest; creating an issue still falls back to Medium, which the
create screen always accepts.

Signed-off-by: Iurii Purisev <92510590+purisev@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[🐛 Bug]: Jira On-Prem provider resets the priority on every update

1 participant