github-for-jira: PR status is not propagating correctly with closed draft PRs

We use a 3rd party merge queueing system that will create a draft PR (which is never upgraded into an open PR) that batches multiple change sets together for CI evaluation. This draft PR contains the commit with the Issue-ID prefix and is linked to the PR. The PR creation and merge commit actions are performed via an internal automation user and when that users closes the PR the state doesn’t transition from Open in Jira to Closed or Declined. The PR never enters the “open” PR state.

Am I correct in assuming that if a PR is closed it would show up as Declined in Jira?

This is blocking automation around closing issues as the development[pullrequests].open = 0 evaluates to false.

  1. Is this a bug that draft PR state doesn’t propagate correctly into Jira?

  2. Is this a case of https://github.com/atlassian/github-for-jira/blob/main/SUPPORT.md#workflow-transitions-are-not-running. I briefly looked into this but the patch files for the merge commits are on behalf of the user (who has Jira permissions) and not the automation user. Pr creation is done by the automation user though. It would be strange to me that the creation event would get picked up but then the transition from Open to Declined.. I tested this theory and disproved it.

  3. Is there a way to bypass this bug and target my automation around a single closed Pull Request? development[pullrequests].merged = 1 (this is invalid jql)… I am having trouble finding documentation around the schema for this field.

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 17 (3 by maintainers)

Most upvoted comments

@mboudreau do you need something else from me or can we remove the “awaiting-response” and “question” label?

Hey all. We had someone on our team do some investigatory work on this one. Unfortunately, it looks like it would require changes in several locations (so not solely the GitHub for Jira integration) so this would need to be picked up by an Atlassian employee. I have created a ticket in our backlog.

I confirmed that #2 is not an issue.