Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automate linking an asset when creating a service management ticket

Bruno Colin January 6, 2023

Hello,

I am creating an automation rule to detect an asset that is "expiring" and creating a ticket for its renewal.

 

What is working:

  • having an automation rules that is scheduled
  • having a "for aql" rules that detect the matching asset ("expiry date" >= now() and "expiry date" < now(30d))
  • creating the ticket and being able to reference the object name

What is not working:

  • populating the "linked asset" field with the asset

Some context:

The "linked asset" is a custom field that allows to select an asset (type: Assets objects)

If I create the ticket manually I am able to fill the field.
But for some reason I am not able to fill the field in the automation.
The error is as follow:
"Unknown fields set during create, they may be unavailable for the project/type. Check your custom field configuration. Fields ignored -Linked assets (customfield_10066)"
After some search, the error is when the field is not available on the creation screen which is not the case here.
The json is as follow:
{
"fields": {
"customfield_10066": {
"key": "TCI-66"
}
}
}
Any help would be appreciated.

2 answers

0 votes
Prasad Rambanam[ACIS] May 12, 2023

@Bruno Colin did you find way to do this ? we have similar requirement.

0 votes
Riley Venable
Community Champion
February 11, 2023

You can use the AQL functions, references, and AQL to populate the "linked asset" field with the asset. For example, you could add multiple object references to a custom field attached to an object, and then search those references for a specific key: object HAVING inboundReferences(Key IN (${MyCustomField${0}})) Or a specific label, by using dot notation: object HAVING inboundReferences(Label IN (${Portfolios.label${0}})).

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events