How to automatically assign issue to pull request author?

Soamid December 14, 2017

I'm trying to configure my Jira workflow scheme with automatic transitions based on actions performed on Bitbucket Server's Pull Requests. I've already bound "Merge" operation to "Close issue" transition and "Needs work" to "Reopen". 

However, I would also like to change Assignee when PR is merged or reopened. In our workflow, when Jira issue is closed or reopened, we assign it to a developer who was working on that issue. Typically, such developer is also a creator of the PR. I wonder if it's possible to e. g. create post function in the workflow scheme and get information about PR author to change the issue's assignee.

2 answers

1 vote
somethingblue
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 14, 2017

Hi Michal,

There is an outstanding Suggestion that you can find at Pull request REST API: Find by author, reviewer, date range, content that you can vote for to get the functionality you're looking for.  Take a look at the comments for some suggestions.

Another Suggestion to take a look at is BSERV-3856.  Both of these cases are regarding finding the information you're looking for at which point we'd be able to get that data to a custom field.

Cheers,

Branden

Soamid December 16, 2017

Thank you for a great suggestion! Eventually I found "Assign to last role member" built-in post function. It is good enough solution for me, as it works in typical situation (when someone ends his task, assign it to reviewer and than reviewer reopens it).

Braj February 27, 2018

I can't seem to find the "Assign to last role member" anywhere in my default options. I am using Jira Cloud. Has anything changed?

Soamid February 27, 2018

When you add new post function, you must choose "Script post-function" and then you will see additional ready-to-use functions:

2018-02-27_15h18_21.png

Like Dmitry Mikheev likes this
0 votes
Levente Szabo _Midori_
Marketplace Partner
Marketplace Partners provide apps and integrations available on the Atlassian Marketplace that extend the power of Atlassian products.
October 20, 2022

For anyone, looking for ways to automatically assign a Jira issue from the commit message to the committer user or any other user, see this new DevOps automation guide: How to automatically assign a Jira issue to the committer

Suggest an answer

Log in or Sign up to answer