It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Auto-Comment an Approved request with JMWE.

I just made a nice post function and I wanted to share it to the world:

In our Company, we have some tickets that after they get approved the component leader must be notified to perform a specific task. 

I made a Post function to get the component leader and mention him in a comment. 

If the component does not have a lead it will randomly mention a specific person from a list. 

{% set comp = issue.fields.components | field("name") %}

{% for i in range(0,comp | length) %}
{%set des = issue.fields.components | find({"name":comp[i]}) | field("description") %}
{% if des | length != 0%}
[~{{des}}] please address this task.
{% else %}
[~{{ ["*****@*****.com","*****@*****.com"] | random }}] please address this task.
{% endif %}
{% endfor %}

 

 In our Jira Cloud instance, some users key is their email address and for other, it is the first part of their email address so we chose to get the description of a component and we made sure that we enter the key of the account of the Project lead. 

1 comment

Thanks @Dimitris_Damaskos , the post function helped me with the @mention syntax in cloud :)

Like Dimitris_Damaskos likes this

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Marketplace Apps & Integrations

How to increase productivity and grow billable hours amount in Jira

    For several managers it’s a real challenge (sometimes a nightmare) to deal with multiple service contracts and turn every working hour into a billable hour. This is crucial to m...

85 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you