Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,360,965
Community Members
 
Community Events
168
Community Groups

Jira Automation - Check components in summary issue

Hello,

 

I'm trying to create an automation rule which check if an existing project component name is in the issue summary.

I'm quite new to the Jira Automation system and this is my rule :

 

1- Webhook : GET all components from rest/api/2/project/{{project.key}}/components

2- If : Advanced compare condition : {{webResponse.body.name.split(", ")}} contains {{issue.summary}}

        Then return "1" in the log

        Else : Return "0" in the log

 

The only time the rule worked was when i've put only the exact component name in it. If multiple words are in the summary the condition doesn't work even if a component name exists.

 

Thanks already for your help on that :) 

Best regards

 

 

1 answer

1 accepted

1 vote
Answer accepted

Hi @Yohan Brunet 

To clarify, are you trying to determine if the issue Summary contains any of the current Components configured for the project?

If so, I think you could...use an advanced compare condition by parsing the components into a regular expression.  For example:

  • first value: {{issue.summary}}
  • condition: contains regular expression
  • second value: ({{#webResponse.body.name}}{{.}}{{^last}}|{{/}}{{/}})

That second value will produce a regular expression with the list of components, such as this:

(myComponentA|myComponentB)

Kind regards,
Bill

Hello Bill,

 

Thanks you, it's working well !

I've added those conversions to avoid lower or upper case issues :

 

{{issue.summary.toLowerCase()}}

({{#webResponse.body.name.toLowerCase()}}{{.}}{{^last}}|{{/}}{{/}})

 

Thanks you again for your help.

Best regards

Like Bill Sheboy likes this

Well done!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Software

An update on Jira Software customer feedback – June 2022

Hello Atlassian Community! Feedback from customers like you has helped us shape and improve Jira Software. As Head of Product, Jira Software, I wanted to take this opportunity to share an update on...

5,049 views 18 32
Read article

Atlassian Community Events