Jira v8.17.0
Insight version is 9.0.7
Insight automation triggers when an insight object (for ex. obj1) is created then run two separate groovy scripts, the first one creates three other insight objects based on previous (obj1 (level 1), obj1 (level 2), obj1 (level 3)), the second one updates linked insight object set in the attributes of obj1.
Separately, both scripts work as expected through Insight Script Console without any errors.
The server log also says that everything works properly.
2021-08-24 16:10:00,049 [insight-event-0] | Got rule and event for insightObjectAsyncEvent: null, id: 23 - InsightObjectEvent eventType: OBJECT_CREATED, rule id: 23, name: Create Skill-Level, isActive true, objectRuleEvent id: 23 and object: Atlassian Crowd (INVENT-1371725)
2021-08-24 16:10:00,095 [insight-event-0] | doAction(), called for event class: InsightObjectCreatedEvent
2021-08-24 16:10:00,095 [insight-event-0] | Object name: Atlassian Crowd, id: 1371725
2021-08-24 16:10:00,095 [insight-event-0] | Execute Rule action (AutomationRuleGroovyScriptAction): Start, id: 27, event [id: 23, iql: No iql], condition: objectType="Skill-Item"
2021-08-24 16:10:00,095 [insight-event-0] | GroovyScriptAction, got absFilePath: /opt/atlassian/jira-sharedhome/scripts/createSkillLevel.groovy
2021-08-24 16:10:00,096 [insight-event-0] | GroovyScriptAction, not in white list, exit, absFilePath: /opt/atlassian/jira-sharedhome/scripts/createSkillLevel.groovy
2021-08-24 16:10:00,096 [insight-event-0] | Execute Rule action (AutomationRuleGroovyScriptAction): Done, id:27, event [id: 23, iql: No iql, condition: objectType="Skill-Item"
2021-08-24 16:10:00,132 [insight-event-0] | doAction(), called for event class: InsightObjectCreatedEvent
2021-08-24 16:10:00,132 [insight-event-0] | Object name: Atlassian Crowd, id: 1371725
2021-08-24 16:10:00,132 [insight-event-0] | Execute Rule action (AutomationRuleGroovyScriptAction): Start, id: 29, event [id: 23, iql: No iql], condition: objectType="Skill-Item"
2021-08-24 16:10:00,132 [insight-event-0] | GroovyScriptAction, got absFilePath: /opt/atlassian/jira-sharedhome/scripts/fillSkillCategory.groovy
2021-08-24 16:10:00,132 [insight-event-0] | GroovyScriptAction, not in white list, exit, absFilePath: /opt/atlassian/jira-sharedhome/scripts/fillSkillCategory.groovy
2021-08-24 16:10:00,132 [insight-event-0] | Execute Rule action (AutomationRuleGroovyScriptAction): Done, id:29, event [id: 23, iql: No iql, condition: objectType="Skill-Item"
2021-08-24 16:10:00,155 [insight-event-0] | Got rule and event for insightObjectAsyncEvent: null, id: 21 - InsightObjectEvent eventType: OBJECT_CREATED, rule id: 21, name: Set status to Assigned on new objects, isActive true, objectRuleEvent id: 21 and object: Atlassian Crowd (INVENT-1371725)
2021-08-24 16:10:00,155 [insight-event-0] | Role Actor configured, and will be run as user with key: userName
2021-08-24 16:10:00,156 [insight-event-0] | NO condition matched for ruleEvent.InsightAsyncEvent category: USER, rule id: 21, name: Set status to Assigned on new objects isActive: true, objectRuleEvent id: 21 object: Atlassian Crowd (INVENT-1371725)
Here is the clue in your log:
2021-08-24 16:10:00,132 [insight-event-0] | GroovyScriptAction, not in white list, exit, absFilePath: /opt/atlassian/jira-sharedhome/scripts/fillSkillCategory.groovy
At some point, Insight introduced a script white list, during the upgrade, your first script might have been added to the whitelist automatically.
But when you created and linked your second script, you didn't populate the whitelist with the new script.
Look for the admin menu under add-ons: Insight Whitelist
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I spent 2 hours looking for this. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Each Groovy script has to be whitelisted. To add Groovy scripts to the allowlist:
See Documentation for JIRA: Adding Assets functions to workflows in Jira
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i'm trying to understand if i can call from automation for jira (for jira datacenter) an insight object and its property (in particular an email attribute that i need to send from automation for jira an email). has anyone ever faced this need and solved it?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.