Hello community,
i want to create a behavior script to set assignee based on a custom field (in create screen)
i tried this script but it didn't work
could you help me please!
import static com.atlassian.jira.issue.IssueFieldConstants.ASSIGNEE
def Motifs = getFieldByName("customfield_30100")
if (Motifs.getValue() == "PAYS à risque LCBFT - Corruption - Sanctions internationales") {
// Set assignee to Dape Conformite Service
getFieldById("assignee").setFormValue("Dape Conformite Service")
}
else if (getFieldById("assignee") == "Dape Conformite Service") {
// Set assignee back to "Automatic", in case user picks Support
getFieldById(ASSIGNEE).setFormValue("Automatique")
}
I think these thread could help you
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.