Automation setting Asset field takes the first object not the referenced object

Lisa Forstberg
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.
October 14, 2023

In assets I have companies, versions and contacts

Version is an attribute of the company. 

 

When an issue is created, I want to: 

1. set the company (asset custom field  id = 10167) based on reporter 

==> this works fine

2. set the version (asset custom field) that company uses of our product, based on company

===> This one is fetching the FIRST object from Assets, not the (version-)object related to the company-object despite the AQL applied.

The result is this

Screenshot 2023-10-14 at 11.23.23.png

 

As a side note, the Pengvinversion field is restricted with Filter issue scope (AQL): object HAVING inboundReferences(LABEL in ${customfield_10167.label})

===> This works fine. If the user manually set the field, only the referenced versions are available in the select list. Using the same AQL in the automation as I do in the custom field is rendering in an error.

 

What is missing in the automation?  

 

Screenshot 2023-10-14 at 10.29.02.png

2 answers

1 accepted

0 votes
Answer accepted
Lisa Forstberg
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.
October 27, 2023

solved my own problem...

 

The Company object that is set in the first part in the automation is not yet stored on the issue so there is no value yet in the custom field. 

 

I had to find the version from the company via the reporter.

object HAVING inboundReferences(object HAVING inboundReferences(objectType = Kontakter AND "User" = {{reporter.displayName}}))

0 votes
Peter Atthem October 26, 2023

Hello Lisa,

Can try switching the logic to use the Bolag field to pick the key and set it.

I did a small test and it worked doing this instead

 


Key = {{Bolag.Pengvinversion_object}}

Hope it works for you as well =) 

Lisa Forstberg
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.
October 27, 2023

oh, did not notice that I got a response from you! I bet that works too.

Like Susanne Harelius likes this

Suggest an answer

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

Atlassian Community Events