Hello,
i want to set a default component "Example1" and "Example2" when I want to create a issue. i found this behaviour in Initialiser :
import com.atlassian.jira.component.ComponentAccessor
import static com.atlassian.jira.issue.IssueFieldConstants.*
if (getActionName() != "Create Issue") {
return // not the initial action, so don't set default values
}
// set Components
def projectComponentManager = ComponentAccessor.getProjectComponentManager()
def components = projectComponentManager.findAllForProject(issueContext.projectObject.id)
getFieldById(COMPONENTS).setFormValue(components.findAll { it.name in ["Example1","Example2"] }*.id)
But when i want to create a issue, the components field is not filled with the values "Example1" and "Example2":

Please can you help, is very urgent.
Thanks community .
Fayçal
PS : we already have a list of values in components field.