Forums

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

Convert rule from “When: Object updated” to “Scheduled”

Antonia
Contributor
August 14, 2025

I want to modify a rule so that it does not always run when an asset is updated, but only once a month.

I then copied the original rule and added a schedule in front of it with a lookup function, but it doesn't work. How else should I use it?

It doesn't work without the lookup function either. I just thought the rule needed something to tell it where to look.

Lookup function, Query: objectType = "[NAME]"

 

Brief explanation of the rule:
The rule should always run on the first day of the month and check how the name of an asset begins. If it begins with “XYZ,” a tag should be added to the field; if the name begins with “ABC,” a different tag should be added.

 

NEW ONE with errors:

Screenshot 2025-08-14 152244.png

Old one, works:Screenshot 2025-08-14 152409.png

2 answers

1 vote
Marc - Devoteam
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.
August 14, 2025

Hi @Antonia 

When using as lookup you will need to branch based on the {{lookupObjects}} as you need to iterate over the found objects.

The initial rule acts on a change of a single object, by changing it to scheduled with a lookup it will find multiple objects and you will need to address each found object.

Antonia
Contributor
August 14, 2025

Hi @Marc - Devoteam

thanks for your reply.


So, under the lookup, I create a For AQL loop and then I have to put all the “If” and “Then” statements in the loop?
Or what exactly do I have to write in the lookup?
I have several requirements.
If an asset starts with “ABC”, write “abc” in the tag.
If an asset starts with “XYZ”, write “xyz” in the tag.
If an asset starts with “123”, write “890” in the tag.

 

I can also enter a query in the Branch (For AQL) field. What should I enter there?

Marc - Devoteam
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.
August 14, 2025

Hi @Antonia 

You needed to branch on the lookup and then use If/els conditions in the branch

No you can branch for AQL, as you have multiple objects found

Antonia
Contributor
August 14, 2025

Hi @Marc - Devoteam

Screenshot 2025-08-14 165228.png

Do you mean like this?

“For AQL” contains the name of the object type, which now looks for the entire type and then checks the conditions.

Bill Sheboy
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.
August 14, 2025

Hi @Antonia 

Yes, and...to the suggestion from @Marc - Devoteam 

The branch to the objects is needed...however, the if / else condition block cannot be used inside of a branch.

One possible workaround for your scenario is use a Lookup Table to perform the mapping of values to tags, then use the table get() function to check for a result, and when found, add the tag.

Kind regards,
Bill

Like Marc - Devoteam likes this
1 vote
Mikael Sandberg
Community Champion
August 14, 2025

You cannot use automation to edit Assets objects without an associated work item. You always have to start with the work item and if that one is associated with an Asset object you do the editing of the object.

Antonia
Contributor
August 14, 2025

Hi, that's not correct. I've already created several rules that only have to do with assets. This rule also worked, but with a different trigger.

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