hii ,
can anyone please help me with this ,
i want to set default value for Epic Link . Thanks in advance
Hi @sgole
You can try to apply the sample script below in the Behaviour Initialiser:
import com.atlassian.jira.component.ComponentAccessor// Get Epic Link field and it's valuedef epic = getFieldByName("Epic Link")def value = epic.getValue() as Stringif(getActionName() == "Create" && value == null ){ //Set epic link epic.setFormValue("RAIN-12")}
I'm using Scriptrunner 6.18.0 and Jira 8.13.1.
Hope you found this useful!
Hi @sgole ,I found this resolved Atlassian Community discussion to be relevant to this case: Create a default Epic Link using Behavior . Do check it out if it suits your requirement.I hope this helps.Kind regards,Irfan
@Irfan Mazuki thanks for reply . i have already tried this but wont work for me .
hii @Jia Jie Thanks for your help , in my case i was trying to set JIRA in setFormvalue ex. setFormvalue("JIRA") ,
instead of setFormvalue("EEHQAN-2") works .
Hi @sgole ,
Glad that it works now and I'm happy to help!
@Jia Jie , can you please help me to set default "sprint" field also
It looks like you're new here. Sign in or register to get started.