I am trying to use below IF condition with Automation for JIRA plugin but it's not working.
Can anyone correct me ?. I am commenting on ticket with visibility set as Administrator
I tried below without luck
{{#if(comment.visibility.value.equals("Administrators"))}}
{{#if(equals(comment.visibility.value,"Administrators"))}}
Hi @Ifteqar Ahmed ,
could you give a little more context?
What is the trigger? How is your if configured? Show us a printscreen of possible at all.
- Tessa
I am trying to copy comment to another ticket from a source ticket.
PI am able to print sample string but conditional printing is not working.
If condition is not able to return true/false output
My full Comment on issue rule is below
{{#if(equals(comment.visibility.value, "Administrators"))}}
TEST----> {{comment.author.displayName}}
{{triggerIssue.comment.last.body}}
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ifteqar Ahmed ,
I'm not sure I get how you configured your rule, can you show a (redacted) screenshot?
In any case, the "comment.visibility.value" ONLY works if your rule is triggered with "comment added". With any other trigger, automation does not know which comment you mean so you will have to specify (last probably).
If you trigger is a comment, this is how it works:
(you can see I added log lines as well as actions to see what my smart values return, always a good way to debug).
Please let me know if you need any more help!
- Tessa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, and...to Tessa's ideas:
The visibility information is only available with the smart values from the comment-related triggers. However it does appear the visibility information is available from the REST API functions for issues in case you want to try that route with a web request.
Kind regards,
Bill
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @Tessa Tuteleers @Bill Sheboy , You solution has helped me to achieve our requirements.
Added compare condition and solved the issue.
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.