Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Smart Value: Comment from current issue screen?

Martin Boehme
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 26, 2020

Hi guys,

I want to send a custom e-mail when issues transition to a specific status.

During this transition, there is an issue screen, so the user can leave a comment during this transition.

In case there is a comment, it should be included in the e-mail.

So far it's quite easy with Jira Automation:

  • Trigger: Issue transitioned
  • Action: Send Mail
    • using this smart value in the mail body: {{issue.comments.last.body}}

 

Works like a charm. But: in case the user leaves no comment during the transition, the above automation will just use the latest comment on the issue in the mail body.

But in this case, no comment should be included in the e-mail!

 

How do I implement this?

PS: Here is the documentation about using comments as smart values. It did not help me.

2 answers

1 vote
Yvan Martin
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
Nov 08, 2020

Hi Martin,

Developer from Automation here.

Unfortunately we don't receive an event containing both the issue transition and comment together, so we cannot provide a reliable smart value that would indicate that comment came from that transition screen.

You would have to use last comment like you have, potentially you could also check the created date was within a certain timeframe like another user suggested, but there's no guarantee on ordering if that issue comment would have gone through. Adding a "Re-fetch issue data" just before checking last comment might help with that, which might be good enough for your use-case.

Apologies for the inconvenience. 

Cheers.

1 vote
Manon Soubies-Camy _Modus Create_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Oct 28, 2020

Hi @Martin Boehme,

I have just tested the following automation rule and I think it would meet your need:

Capture d’écran 2020-10-28 à 11.21.41.png

In the "if" block, you send an email with the latest comment, and in the "else" one you don't.

Let me know if this helps!

- Manon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events