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.
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;
}
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())
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.