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.
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())
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;}
It looks like you're new here. Sign in or register to get started.