Skip to content

feat(jiraonprem): transition issues between statuses - #6756

Open
purisev wants to merge 3 commits into
keephq:mainfrom
purisev:feat/jiraonprem-transitions
Open

feat(jiraonprem): transition issues between statuses#6756
purisev wants to merge 3 commits into
keephq:mainfrom
purisev:feat/jiraonprem-transitions

Conversation

@purisev

@purisev purisev commented Sep 3, 2026

Copy link
Copy Markdown

Problem

See #6754. transition_to works on Jira Cloud and does not exist on the on-prem
provider, so a workflow that moves a ticket when its alert changes state cannot
be ported by changing type.

Fix

Two commits. The provider gets __get_available_transitions and
__transition_issue, following the Cloud implementations, and _notify gets
transition_to, applied after an update and after a create. A name is matched
case-insensitively against what Jira offers for that ticket; an unknown one
raises with the names that exist:

Transition 'Invalid' not found. Available transitions: To Do, In Progress, Done, Closed

The token needs the TRANSITION_ISSUES permission on the project. A workflow
that passes no transition_to sends no transitions request.

Tests

tests/test_jira_provider.py grows to 14 tests, all passing: a transition
applied after the id lookup, a name matched in the wrong case, an unknown name
and the message it produces, a created issue transitioned in the same step, and a
notification without transition_to making no transitions call.

Docs

The on-prem page gets an "Auto-Transition Workflows" section and points at the
Cloud page for the longer walkthrough, plus the example workflow
examples/workflows/jira_on_prem_transition_on_resolved.yml. The on-prem
_notify docstring gained an Args block, so the regenerated snippet now
carries a comment per parameter instead of empty ones.

Note on the other Jira PRs

#6755 fixes the priority reset in the same _notify, and the two edit the same
signature line, so whichever lands second needs a one line resolution. #6752 and
#6753 cover the remaining two reports and touch this provider elsewhere.

Fixes #6754

The cloud provider takes a transition_to name on notify and moves the
ticket after the update or the create; on-prem had no way to change a
status at all, so a workflow that closes a ticket when its alert
resolves could not be written against Jira DC.

Port the same two helpers and the same parameter, with the on-prem
request shape: bearer header, the configured verify, a timeout. The
name is matched case-insensitively and an unknown one fails with the
transitions the ticket actually offers, so the result payload and the
error text stay identical between the two providers.

Signed-off-by: Iurii Purisev <92510590+purisev@users.noreply.github.com>
Add the resolved-alert example next to the cloud one it mirrors, and a
short section on the on-prem page: the parameter, the permission the PAT
needs, and a pointer to the cloud page for the longer walkthrough.

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.

[➕ Feature]: Jira On-Prem provider cannot transition a ticket

1 participant