The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

how to set assignee as reporter only if assignee left as blank?

muhannad Almunyif
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 30, 2019

how to set assignee as reporter only if assignee left as blank? as we need to make any logged user needs to create an issue to make him as assignee if assignee left blank or as automatic assignee.

2 answers

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

0 votes
Alexey Matveev
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 Champions.
July 1, 2019

Hello,

You would need an app for it like Power Scripts, ScriptRunner, Automation for Jira and so on.

@PVS  gave an example with ScriptRunner or any app, that supports groovy.

If you want to use the Power Scripts app, then you could create a post function with a code like this:

if (isNull(assignee)) {

   assignee = reporter;

}
0 votes
PVS
Banned
June 30, 2019

Hi  @muhannad Almunyif 

Try to use a code like this:

 

You can find more info here:

https://scriptrunner.adaptavist.com/5.4.12/jira/behaviours-overview.html

import com.atlassian.jira.component.ComponentAccessor
import com.onresolve.jira.groovy.user.FieldBehaviours
import static com.atlassian.jira.issue.IssueFieldConstants.*
import groovy.transform.BaseScript

def assignee = getFieldById(ASSIGNEE)
def reporter = getFieldById(REPORTER) assignee.setFormValue(reporter.getValue())





TAGS
AUG Leaders

Atlassian Community Events