Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Jira Automation: Lookup Objects Error Message

Haig Aboyan April 12, 2023

I have created an automation that runs when an issue is transitioned from one phase to another. When the automation is triggered an attribute within an asset object is updated.

 

 

However, for some reason the lookup keeps causing errors. The object lookup logic is as follows:Screenshot 2023-04-12 at 4.28.42 PM.png

and has been causing the following error:Screenshot 2023-04-12 at 4.28.32 PM.png

However, both the objectType and the Name (seen below) within the query logic seem correct to me. Am I missing something here?

Screenshot 2023-04-12 at 4.29.13 PM.pngScreenshot 2023-04-12 at 4.28.54 PM.png

1 answer

0 votes
Frederic Wolf
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.
April 12, 2023

Just a quick count of position 38 is at the number 13 of the vendor. 

can you put quotes „“ around the variable?

“{{issue.vendor.name}}“ 

looks like a classic variable with spaces problem. 

aditionally you could try to change the vendor name to TestVendor13 ao you so not have any spaces in it. 

give it a shot and let me know if it helped.

Haig Aboyan April 13, 2023

Unfortunately that didn't help and removing the spacing in this case is not feasible.

Haig Aboyan April 13, 2023

Its odd because its pulling the vendor name "Test Vendor 13" in the error message. So i'm not getting what the issue is.

Frederic Wolf
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.
April 13, 2023

Hi @Haig Aboyan ,

i tried some AQL in my own asset structure and i could reproduce your error.

2023-04-13 22_24_52-Assets Object Schema - Jira und 10 weitere Seiten - Geschäftlich – Microsoft​ Ed.png

2023-04-13 22_19_53-Assets Object Schema - Jira und 10 weitere Seiten - Geschäftlich – Microsoft​ Ed.png

Error Text:

AQL "objecttype = manufacturer AND name = acer computer GmbH" has invalid syntax at position 42 with error message "mismatched input 'c' expecting {<EOF>, ' '}"

Nearly the same error. Just to clarify: I have done the search directly in Assets and not in a object lookup within an automation. But the result looks the same.

I then changed the AQL and i added the quotes. Andd voila, no error.

2023-04-13 22_22_25-Assets Object Schema - Jira und 10 weitere Seiten - Geschäftlich – Microsoft​ Ed.png

As you can see there is only 1 Result left.

 

If we look into the error message again:
AQL "objecttype = manufacturer AND name = acer computer GmbH" has invalid syntax at position 42 with error message "mismatched input 'c' expecting {<EOF>, ' '}"

 

And yours: which says "mismatched input 'V'

We can assume that the starting letter of the second word is at the error position.

 

Perhaps you can test it Again and change your AQL to:

objectType = "Vendor" AND Name = "{{issue.Vendor Name}}"

---

I have an additonal question. Perhaps you can explain the structure of your requeest type a little bit more.

I assume you have a TEXT Field where the user can type the Vendor. Why don't you create an Asset Object Field, where you can link the asset directly?

Like Geir Windsland likes this
Haig Aboyan April 14, 2023

The project for which this automation rules lives within is to manage 3rd party vendors within our org. Through a separate automation users can submit a request form which creates an issue and a vendor(the object). 

 

Where I'm seeing problems is with a separate automation that then updates vendor's attribute when the issue is transitioned to "Done". 

 

You can see below the vendor name is populated within the object.

Screenshot 2023-04-14 at 2.22.36 PM.png

Frederic Wolf
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.
April 20, 2023

Where I'm seeing problems is with a separate automation that then updates vendor's attribute when the issue is transitioned to "Done". 

 

--> You can not update a object from an issue triggered automation.

Like gabriel.gavillon likes this

Suggest an answer

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

Atlassian Community Events