Need to understand how to write condition in autoamtion

Pfohl Jason
Contributor
January 16, 2025

I have an automation that puts specific text into the description field when a specific component is added to an issue. I am running into the issue that if the component is removed from the issue and then readded it will add my specific text to the description field again causing duplicate information. 

How do I create a condition that if the text has already been written to the description field it will not duplicate it if the component is deleted and re-added. 

1 answer

1 accepted

1 vote
Answer accepted
Stephen_Lugton
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 16, 2025

Hi @Pfohl Jason 

You can use an IF condition with something like this as your JQL:

Description !~ "Your text"

Where !~ means 'does not contain'

Pfohl Jason
Contributor
January 16, 2025

Would I need to add an action after the condition to stop the duplication?

 

Stephen_Lugton
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 16, 2025

Assuming your automation is similar to:

Trigger: Component added / issue updated

If Component = "Specific Component"

Then: Add you text to Description 

 

You could add in the check for description alongside or after the check for specific component:

e.g. :

Trigger: Component added / issue updated

If Component = "Specific Component" AND Description !~ "Your text"

Then: Add you text to Description 

OR 

Trigger: Component added / issue updated

If Component = "Specific Component" 

IF Description !~ "Your text"

Then: Add you text to Description 

 

Pfohl Jason
Contributor
January 16, 2025

Capture1.PNG

Pfohl Jason
Contributor
January 16, 2025

This is what I have. 

 

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.
January 16, 2025
Like Pfohl Jason likes this

Suggest an answer

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

Atlassian Community Events