Forums

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

AQL Condition on Automation

Bryan Tito
Contributor
January 16, 2023

Is there a way to enable this? We wanted to fetch the user data from asset (Employee Directory) into our Automation. It seems that we can't query and object and add asset field

 

Screen Shot 2023-01-16 at 7.42.12 PM.pngScreen Shot 2023-01-16 at 7.42.25 PM.png

4 answers

0 votes
Milo van Loon August 16, 2023

Hi @Bryan Tito ,

I might have found the reason this is greyed out.

On the condition page of automation conditions for automation  under the AQL Header it states :

You can either search based on objects, or Assets fields on an issue. To select the Object tab, your rule must have the Object trigger.

Hope this clarifies the reason why.

It is actually kinda logical. We trigger on a field change, and then search for an object.

Regards,

Milo 

0 votes
Joshua Kochelek
Contributor
February 27, 2023

I'm seeing the same issue. Here's my use-case:

  1. Receive URL
  2. Based on webhookData, search for existing objects
    1. If no objects exist, create an object
    2. If an object exists, update the object

Any insight would be much appreciated! 

I realized my error in logic.. 🙈

For reference, I had to use an object lookup and reference {{lookupObjects.size}} in my conditional statement.

0 votes
Dirk Ronsmans
Community Champion
January 16, 2023

Hey @Bryan Tito ,

The Automation is not looking for a Asset but for an Asset field meaning it will take the issue that it was triggered on and then use the data from the specific Asset field.

What are you using as the trigger for your Automation?

If you wish to simply query the object Schema, you can do that using a Scheduled trigger OR you can use the Lookup Objects action which will allow you to run any AQL and use the results of that AQL further down the automation in a smartvalue.

Otherwise you'll have to specific a field that is on the issue on which it will fetch the data

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-objects

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-insight/#Lookup-objects

Bryan Tito
Contributor
January 16, 2023

Hi @Dirk Ronsmans thank you for checking on this. 

What are you using as the trigger for your Automation?

- We used the Field value changed of a customfield that we have created. When this field is updated by an agent it will add or remove him/her from a group.

 

Screen Shot 2023-01-16 at 10.31.41 PM.png

Bryan Tito
Contributor
January 16, 2023

Also when we add an AQL the mapping it disappears.

Screen Shot 2023-01-16 at 10.33.39 PM.png

Dirk Ronsmans
Community Champion
January 16, 2023

Can you elaborate a bit on the automation use case itself?

So,

  1. Field "Turn on Autoassign?" is updated
  2. look in Assets for that person?
  3. If value of the field = Yes -> Do something (and what exactly?)
  4. If value of the field = No -> Do something else? (and what exactly?)

is this pretty much what you are trying to do?

Bryan Tito
Contributor
January 16, 2023

Surething,

 

  1. Field "Turn on Autoassign?" is updated
  2. look in Assets for that person? - It will look for an attribute for on agent/user. Example: location.
  3. If value of the field = Yes -> Do something (and what exactly?) - the agent will be added to the group that will do a round robin assigning of ticket on that group.
  4. If value of the field = No -> Do something else? (and what exactly?) - will remove the agent from the group.

 

Thanks you,

0 votes
Ste Wright
Community Champion
January 16, 2023

Hi @Bryan Tito 

Why won't it let you query them? Will it not let you enter anything into the Assets Field / Query boxes?

For Assets Field, this is a search box, not a drop-down menu. It will show results as you begin typing into it.

For help with AQL, see this help page.

Ste

Bryan Tito
Contributor
January 16, 2023

Hi @Ste Wright thank you for checking on this.

On the Query tab, it won't let me type on the text box, while on the Assets nothing comes up on it even though we have already have created some Assets.

Ste Wright
Community Champion
January 16, 2023

Hi @Bryan Tito 

And you are creating the Objects rule at a Global level, as the purple note suggests in your screenshot?

Ste

Bryan Tito
Contributor
January 16, 2023

Helo @Ste Wright we have tried it via Global Automation but it seems it is the same.

Please see screenshot.

Screen Shot 2023-01-16 at 10.27.38 PM.png

Daniel Ebener
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 21, 2023

Hi @Bryan Tito 

I just ran across the same problem. In the meantime, are there any other findings on this issue?

Thank you
Daniel

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