Automation for JIRA with condition comment.visibility.value

Ifteqar Ahmed May 11, 2022

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"))}}

 

1 answer

1 accepted

0 votes
Answer accepted
Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2022

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

Ifteqar Ahmed May 11, 2022

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}}
{{/}}

Tessa Tuteleers
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
May 11, 2022

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).

Screenshot 2022-05-11 at 15.01.05.png

Screenshot 2022-05-11 at 15.01.11.png

 

Please let me know if you need any more help! 

- Tessa

Like # people like this
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.
May 11, 2022

Hi @Ifteqar Ahmed 

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

Like Tessa Tuteleers likes this
Ifteqar Ahmed May 14, 2022

Thanks @Tessa Tuteleers @Bill Sheboy , You solution has helped me to achieve our requirements.

Added compare condition and solved the issue.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events