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}},{{/}}
{{/}}
]
}
]
}
}
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
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}},{{/}}
{{/}}
]
}
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.