Insight Automation doesn't work

Aleksey Dzyapko August 25, 2021

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)

 

3 answers

1 accepted

4 votes
Answer accepted
Peter-Dave Sheehan
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 27, 2021

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

Aleksey Dzyapko August 30, 2021

Thanks, @Peter-Dave Sheehan it works like a charm.

Charlie Misonne
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 22, 2022

I spent 2 hours looking for this. Thanks!

1 vote
Nikolai Ruban June 16, 2023

Each Groovy script has to be whitelisted. To add Groovy scripts to the allowlist:

  1. Go to Administration > Manage apps > Assets Allowlist.
  2. Select Edit settings.
  3. Enter the filename and the full path to the script.
  4. 4. Select Save.

See Documentation for JIRA: Adding Assets functions to workflows in Jira

0 votes
Deleted user April 27, 2022

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?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events