Forums

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

Cannot use "equals" conditional logic with Jira project management software v8.6.0

Công Trung January 20, 2025

Hi all,

I'm working with Jira Project Management Software v8.6.0 and trying to build an automation rule that:

- Interactive with DoD (a checklist for needed files)

- If a field has an attachment, it will be ticked with the corresponding position in DoD

I have successfully tested this with Jira v10.3, but it did not work with Jira v8.6.0.

I think that 'equals' does not work or available in v8.6.0


 

{

    "update": {

        "DoD": [

            {

                "edit": [

                    {{#DoD}}

                        {

                           "id": {{id}},

                           "checked": {{#if(equals(name, "Task Report"))}}true{{/}} {{^if(equals(name, "Task Report"))}}{{checked}}{{/}}

                        }

                        {{^last}},{{/}}

                     {{/}}

                 ]

            }

        ]

    }

}

2 answers

1 accepted

2 votes
Answer accepted
Maxime Lefebvre _Okapya_
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 21, 2025

Hi @Công Trung

I believe equals exists in Jira 8.6 since it exists in this documentation for 8.2.

When you do a negative condition, I believe you should write not instead of ^.

{{#if(not(equals(name, "Task Report")))}}{{checked}}{{/}}

If you believe the string condition equals is not working, you could try the match Regex condition.

{{#if(name.match("Task Report"))}}true{{/}}

Kind regards,
Maxime

Công Trung January 21, 2025

Hi man, I appreciate your answer. However, I tested a lot of functions (not, equals, match, if...) but none of them worked, still dont know why!

However, I found a way to make it work.

Here is the code:

{

    "update": {

        "DoD": [

            {

                "edit": [

                    {{#DoD}}

                        {

                           "id": {{id}},

                           "checked":

{{#name.contains("Task Report")}}true{{/}}

{{^name.contains("Task Report")}}{{checked}}{{/}}

                        }

                        {{^last}},{{/}}

                     {{/}}

                 ]

            }

        ]

    }

}

0 votes
Công Trung January 20, 2025

For more information, I have checked a list and it can list all elements. The failure command is 

{{#if(equals(name, "Task Report"))}}true{{/}}

{{^if(equals(name, "Task Report"))}}{{checked}}{{/}}

It cannot do equals()

Suggest an answer

Log in or Sign up to answer