How do I assign a JIRA issue to a specific user on transition?

Richard Wilkinson May 31, 2012

I want to be able to assign an issue to our lead tester automatically on a 'resolved' transition.

Options for post-functions to add to a transition include:

* Assign to Current User

* Assign to Lead Developer

* Assign to Reporter

There isn't an "Assign to (selected user)" or "Assign to (custom role)".

The page below suggests that you can create your own post-functions, but the links explaining how to do so are broken:

https://confluence.atlassian.com/display/JIRA044/Configuring+Workflow#ConfiguringWorkflow-ApplyingPostFunctionstoTransitions

How can I set up a simple post-function to assign to the lead tester?

Obviously I could pretend the lead tester was the lead developer, and assign it like that, but I'd like to be able to specify the role properly, or select a user without a role.

Thanks,

Richard

3 answers

1 accepted

5 votes
Answer accepted
Faryaaz Kassam May 31, 2012

go to Add new post Function->Update Issue Field->Assignee and select your lead tester.

Richard Wilkinson May 31, 2012

Ah, OK. That should have been obvious... thanks. Since there were specific ones for the other users I thought it would be something more complicated!

Richard Wilkinson June 7, 2012

Doing it this way assigns the issue to the lead tester regardless of whether the resolver selects a different user. Is there a way to assign the issue first to the selection of the person resolving the issue (if any) but default to the lead tester if no new user is selected? Or would a new script be needed for that?

I realise there probably isn't, since the "assign user" drop-down on the resolve screen doesn't have "no selection" - by default the current user remains selected, and I don't see a way to tell whether that's a deliberate choice or not.

I guess we would need something like, "If selected new assignee = current assignee then new assignee = lead tester, else new assignee = selected new assignee" which would involve scripting.

Faryaaz Kassam June 14, 2012

haven't tried anything like that tbh. I would guess you'd need to script it that way.

Sharad_Agarwal August 27, 2015

hi, I tried to follow the steps: Add new post Function->Update Issue Field->Assignee and select specific user. However, when I start typing in the user's ID, it is not recognized by the system. I tried with the ID, first name and last name. The user in question is an Admin in JIRA, and this is Cloud JIRA. Would appreciate ideas and guidance on how I could troubleshoot this. Thanks.

Benjamin Tapley October 24, 2016

Sharad, and any others that stumble here, you need to go to System > Global Permissions > Browse users and enable this permission. Cheers!

1 vote
Khanh Nguyen
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 31, 2012
1 vote
Radu Dumitriu
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
May 31, 2012

Yet another recurrent problem of scripting the WF. You have multiple ways to achieve that:

1) using ScriptRunner - https://marketplace.atlassian.com/plugins/com.onresolve.jira.groovy.groovyrunner - free, praise Jamie for that

2) using JJupin - https://marketplace.atlassian.com/plugins/com.keplerrominfo.jira.plugins.jjupin - created by me, but paid

3) Other plugin, check https://marketplace.atlassian.com/search?q=scripting

4) write your own postfunction, start here: https://developer.atlassian.com/display/JIRADEV/JIRA+Plugin+Tutorials

Have fun

TJ Baker September 3, 2013

Can anyone tell me how to accomplish this task with OnDemand, or if it's even possible?

Suggest an answer

Log in or Sign up to answer