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 :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sure I have a Scriptrunner :) So should I paste a script like this in post function for this transition?
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)
if (issue.fields.assignee == null {
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.
Sure I have a Scriptrunner :)
So should I put a script into transition postfunction?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.