Assets Automation rules in Jira Datacenter are not working.
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles for non-Data Center-specific features may also work for Server versions of the product, however they have not been tested. 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
Summary
In this article we are going to discuss a scenario where few of the asset automation rules which were working earlier, suddenly stopped working. New automation rules are also not working.
Following is an example of asset automation rule which is not working, here email notification are not sent whenever object is created or updated.
Environment
JSM 9.x
Diagnosis
In insight_automation.log we find entry like "NO condition matched for ruleEvent.InsightAsyncEvent".
2024-07-16 10:11:56,072 [insight-event-12] NO condition matched for ruleEvent.InsightAsyncEvent category: USER, rule id: 26, name: SampleRuleName, isActive: true. objectRuleEvent Id: 47 object: TestObj(OBJ-12345)
- Conditions specified in Automation rule can also be executed as AQL search(Assets -> Search for objects) and check if it return any result. Check screenshot for example.
- We can also break complex AQL to simpler and smaller AQL and check if complete condition is not working or some part.
- If AQL search does not yield any result then user would have to perform asset Re-index. Check Asset Re-index for more details.
A re-index means that all objects will stay in the index during the process, and Assets will index them again. You can search for objects during the process.
- However in this scenario Asset Re-index did not resolve problem.
- We can further check if attributes of objects are correctly set in Database with following asset REST API. We can get object-id as mentioned in following screenshot, here object-id is SCHEM1-5.
<jira-base-url>/rest/assets/1.0/object/<object-id>/attributes
- Here we found that object attributes are correctly set in Database from REST API output.
- As attributes are correctly set in Database and normal Asset Re-index is not helpful. User can perform Clean Re-index operation.
Solution
- Problem resolved when user performed asset Clean Re-index operation. Check Asset Re-index for more details. Perform this operation during non-business hours or when traffic is less.
- Conditions in AQL search were providing results after Clean Re-index operation. Also all asset automation rule started working.
A clean re-index means that all objects will be removed from the index across all nodes, and then will be indexed again. This is recommended if you want to have a fresh state of the index. Once the indexing is in progress, you won't be able to cancel it or search for objects or filter them.