Hi everyone!
I have a question:
I have a Screen on transition with Assignee field and I would like to set a default value as a issue reporter. How can I do this?
TIA
You can use the Post Function to set the default. Copy from reporter. Will that work?
I have already done this but I would like to leave the funcionality to assign this during status change - transition screen. But when I have set post-funkcion "copy assignee from reporter" it's impossible to set this during transition because set value is overwriten by post-function
Thanks for clarifying your requirements Jan. So you want a conditional assignee - ‘if assignee is empty then use default’. For this you will want to use some form of automation. Do you have any such addon, e.g. Scriptrunner, Power Scripts, Automation for Jira, etc?
alternatively you can require the assignee be set during the creation.
Sure I have a Scriptrunner So should I paste a script like this in post function for this transition?
import com.atlassian.jira.component.ComponentAccessorimport com.onresolve.jira.groovy.user.FieldBehavioursimport static com.atlassian.jira.issue.IssueFieldConstants.*import groovy.transform.BaseScriptdef assignee = getFieldById(ASSIGNEE)def reporter = getFieldById(REPORTER)if (issue.fields.assignee == null {assignee.setFormValue(reporter.getValue()) }
It looks like you're new here. Sign in or register to get started.