Create Jira issue Assets automation rule not working

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

Assets Automation rules "Create Jira issue" does not create a Jira issue

By enabling the debug package for Assets Automation , The following appears in the insight_automation.log 

2022-04-07 16:18:26,220 [http-nio-127.0.0.1-8080-exec-785 url: /rest/insight/1.0/automation/rule/11/events/run; user: psubramaniyan] | AutomationRuleCreateJiraIssueAction, Unexpected error: com.atlassian.jira.util.SimpleErrorCollection@285051f1[errors={customfield_20991=Strategy is required.},errorMessages=[],reasons=[VALIDATION_FAILED]]
com.riadalabs.jira.plugins.insight.common.exception.JiraServiceInsightException: com.atlassian.jira.util.SimpleErrorCollection@285051f1[errors={customfield_20991=Strategy is required.},errorMessages=[],reasons=[VALIDATION_FAILED]]
	at com.riadalabs.jira.plugins.insight.services.jira.JIRAServiceImpl.createIssue(JIRAServiceImpl.java:577)
	at com.riadalabs.jira.plugins.insight.services.jira.JIRAServiceImpl.createIssue(JIRAServiceImpl.java:530)
	at com.riadalabs.jira.plugins.insight.services.automation.action.AutomationRuleCreateJiraIssueAction.doActionSafe(AutomationRuleCreateJiraIssueAction.java:64)
	at com.riadalabs.jira.plugins.insight.services.automation.action.AbstractInsightAutomationAction.doAction(AbstractInsightAutomationAction.java:107)
	at com.riadalabs.jira.plugins.insight.services.automation.rule.impl.AutomationRuleEngineImpl.executeAction(AutomationRuleEngineImpl.java:675)

Diagnosis

Environment

  • Jira Service Management Data Center with Assets

Diagnostic Steps

  • There is an Assetst Automation rule to create a Jira issue with certain criteria is met

  • The user (either the logged-in user or the user that you select for running scheduled events) has at least the Assets Users role for the schema and permissions to create a Jira issue within the project selected

  • There is a Jira field or a custom field set to be required

Cause

Assets has a fixed form for creating issues with Automation rules.  It does not allow to include other custom fields. If you have a custom field or Jira field set to be required on creation, the automation rule will fail.



Workaround

You could create a Jira issue using Assets Automation with the required fields as follows:

  1. Use Execute Groovy Script
    1. This action allows a triggered rule to execute a Groovy Script
  2. Use HTTP request
    1. This action allows a triggered rule to make HTTP request and add the mandatory values to the API's payload



Last modified on Mar 31, 2025

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.