Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Rule is executed successfully but no email sent - Status showed as 'NO ACTIONS PERFORMED'

Vijay Kumar October 1, 2024

Hi,

I have created an automation. The automation goes like this. When sprint is about to close in next two days, an email should be sent to all the team members whose user stories are still not complete. So, need to remind them saying, 'Hey guys, you need to close the stories, before the sprint ends.
For this I have created below automation. As you can see, JQL query is executed successfully, but NO email is sent to my mail IS with a details of user stories which are currently in 'Non-Done' status. Can you please help me with this?
You can see the 'Audit Log' as well.


Automation.PNG

3 answers

1 accepted

2 votes
Answer accepted
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.
October 2, 2024

Hi @Vijay Kumar -- Welcome to the Atlassian Community!

Do you have the bulk-handling option selected for your rule's trigger?  https://confluence.atlassian.com/automation/run-a-rule-against-issues-in-bulk-993924653.html

If not, your rule will, iterate over multiple issues (potentially sending multiple emails)

And, if the issues have ever been in multiple sprints, the advanced compare condition will not work.  The reason the condition will not work is the Sprint field is a list of values, and so {{sprint.endDate}} is a list of values, preventing the diff() function from working.

 

To do what you described as the need, the rule's trigger should use the bulk-handling option and the rule should use the plural {{issues}} smart value.

Then assuming your open / active sprint is the latest one, the date needed for the comparison would be: 

{{issues.first.sprint.endDate.max}}

Then your email could again use the {{issues}} smart value to iterate over them for the notification:

{{#issues}}
* {{key}} -- {{summary}} -- {{assignee.displayName}}
{{/}}

 

Kind regards,
Bill

Vijay Kumar October 2, 2024

Hi Bill,

Thanks much for the reply. I think I have bulk-handling option selected. Please see below and correct me if I am wrong.

Also, at any point in time, we will have only one active sprint. That is two-week sprint. Issues are moved from one sprint to the other, if team was not able to complete the story in the current sprint. 

Bulk Handling Option.PNG

Other components and values given for those are as below,
Other components.png

 

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.
October 2, 2024

In that case, please test your rule and let us know if it is working as expected.

Vijay Kumar October 2, 2024

Unfortunately, it's not working. As I see, JQL is validated, looks like condition is not meeting. Again, it's just a wild guess. Or it could be something else. Don't know. Very confused.

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.
October 2, 2024

The image you show of the advanced compare is trying to compare a date value to 4.  The smart value I provided was what to use with the diff() function, not the entire expression.  Please update your condition to:

  • first value: {{now.diff(issues.first.sprint.endDate.max).days}}
  • condition: equals
  • second value: 4

Then re-test your rule.

 

If that does not work, please post the following with images large enough to view the details:

  • your current, complete rule
  • each step of your rule: trigger, condition, actions, etc.
  • the audit log details showing the rule execution

 

Vijay Kumar October 3, 2024

I tried with this option. But no luck. Here you go for all the details about Rule.

Scheduler Details
Scheduler Details.PNG

Advanced Compare Condition

Advanced Compare Condition.PNG

Send email component

Send Email.PNG

Log Action:

Log Action.PNG

Audit Log

Audit Log.PNG

Rule Details Section

Rule Details.PNG

Automation Sequence:

Automation Sequence.PNG

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.
October 3, 2024

Thanks for that information, and it appears the nested list-within-list is causing the problem: {{issues}} is a list and the {{sprint}} attribute is a list.

 

As your trigger uses JQL to find the issues in the openSprints(), let's limit your condition to just check the first one:

{{now.diff(issues.first.sprint.endDate.max).days}}

 

The other option is to first merge all sprint, endDate values into a text string, remove any brackets, convert back to dates, and then perform the max and diff():

{{now.diff(issues.sprint.endDate.jiraDate.join(",").replace(" ", "").replace("[","").replace("]","").replace(",,",",").split(",").toDate.max).days}}

 

Vijay Kumar October 4, 2024

Hi Bill,

Thanks so much for the reply again. I used both the condition and I was able to run the rule with a status 'Success'. However, email was not sent to my mail id with a list of issues.
Here is the audit log,
Audit Log 10_04_24.PNG

Not sure, what the heck is wrong here :(

 

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.
October 4, 2024

Sometimes Data Center works differently than Cloud, and that is where I created those expressions.

 

Let's try the simpler expression in the condition instead:

{{now.diff(issues.first.sprint.endDate.max).days}}

Also, please write the value of that expression to the audit log before the condition so we can confirm what it contains.

 

Also please remove all single issue references from your rule, as those appear to be disabling the bulk-handling, which we can see because the condition is listing each issue from the trigger.

  • remove your write to the audit log for {{reporter.displayName}}
  • remove anything in your email body which references a single issue; that is, anything not inside of {{#issues}} ... {{/}}

 

Vijay Kumar October 7, 2024

Hello Bill,

Thank you so much again for all the help so far. 
Yes, I made few changes. as per your last suggestions and now I could be able to get email triggered and sent to me. 
Email is sent but issues are not attached to this email. I am not sure, what's the issue here is. I think we almost there except this NOT sending issue list in email.
Please see below.
Audit Log.PNG
Send email details.PNG

Outlook email.png

Thanks,
Vijay Kumar

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.
October 7, 2024

Awesome!

Now, let's add the issue list iteration back into your email, adjusting to the formatting you want:

{{#issues}}
* {{key}} -- {{summary}} -- assigned to {{assignee.displayName}}
{{/}}

 

Vijay Kumar October 7, 2024

Awesome! I received the issue list in my email, and it’s perfect. I’m really grateful for your help with this. I truly appreciate it.

I’d love to learn more about JIRA automation. If you could recommend any learning materials (preferably free, but paid is also fine), that would be fantastic.

Additionally, I want to make a few changes to the email format. I’ll give it my best shot, but if I get stuck, I might need to reach out to you in a new thread. For now, I’ll go ahead and ‘Accept Answer’ to close this thread and ensure you get the credit you deserve.

Thank you so much again, SIR!

Like John Funk likes 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.
October 7, 2024

To learn more about automation rules, I recommend experimentation, perhaps with a test project!

You could create a free Jira Cloud site to experiment with rules, although that will be a bit different than what you see with Server / Data Center version.

There is also free training on automation available from Atlassian: https://university.atlassian.com/student/catalog/list?search=%22Jira+Automation%22&taxonomy_tag_ids%5B%5D=18735&taxonomy_tag_ids%5B%5D=18713

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 7, 2024

Hi @Vijay Kumar  - Can you share a screenshot of your final rule for future readers? Thanks and congrats on getting it working!

Like David Ahern likes this
Vijay Kumar October 10, 2024

Hi John,

My apologies. Couldn't reply to you as I got busy with few other things. Here you go for the final version.

Hope it helps!
Final version_10_10.png

1 vote
John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 2, 2024

Hi Vijay - Welcome to the Atlassian Community!

The rule is not executing the way you want because it is not passing on the Advance compare step. In other words, when it ran, it did not find a Sprint with an End Date exactly 6 days from now. 

So, you need to make sure that you test with issues that you know are in a Sprint that has that exact end date 6 days from now. Another way to check is to look at a current sprint and calculate the number of days to the end date in your head. Then update the rule to change from 6 to that number and then run it again as a test. 

Vijay Kumar October 2, 2024

hi John, Thanks so much for the reply and I appreciate.
Apologies for my inability to understand the suggestions you made. So let me ask again. When you say, I need to manually check which are all the issues has the end date 6 days from now.  Should I check by taking individual issues and see whether that particular issue ends in 6 days? The reason I am asking is, we do have definitive start date and end date for a sprint.  My understanding is that a sprint once started with definitive start date and end date, all the issues within that sprint are bound to have definitive start and end date and as we progress, the number of days on the sprint would be reducing. As an example, my current sprint will be ending in 4 days. Please see the screenshot below,No of days.png

Also you mentioned that, i need to first find current sprint and calculate the number of days to the end date. SO could you tell me what all the smart values i can leverage for this rule? In the meantime, i will also try from my end about these smart values.

 

John Funk
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 3, 2024

Why don't you just look for Active Sprint? 

Vijay Kumar October 3, 2024

Yes..at any point in time we have only one active sprint. I use following syntax,

{{issues.sprint.endDate.max.diff(now).days}}

1 vote
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 1, 2024

Hello @Vijay Kumar 

Welcome to the Atlassian community.

Your post tags indicate you are using Jira Cloud, but the screen images indicate you are using Automation for Jira on Jira Server or Jira Data Center.

When you click on the Help button near your avatar and select About Jira, what information do you get? I'm asking because it will show you a verion number if you are using Jira Server or Jira Data Center, and I want to know what version you are using.

I suspect that the problem is your reference to sprint.endDate . I suggest that you use a Log action to print {{sprint.endDate}} to your rule execution log file to confirm it has the value you expect.

Vijay Kumar October 2, 2024

Thank you so much Trudy for the reply & my apologies for the late reply.
Here you go for the JIRA version. See below. I also confirmed with JIRA team that, JIRA instance is hosted on CLOUD.
JIRA Version.PNG
Secondly, like the way you suggested, i did add 'print {{sprint.endDate}}' to log action. It gave me the same output as it did before. It didn't print the Sprint end date. Please see the screenshot below.


Rule execution after updating log action.PNG

 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 2, 2024

I will circle back later with more suggestions for your rule.

I wanted to quick reply that while your Jira instance may be hosted in a Cloud provider, like AWS, that is not the same thing as using the "Jira Cloud" product. Jira Cloud is the Software-as-a-Service version of Jira which is hosted and maintained by Atlassian.

Based on the information in your Help screen you are using Jira Server or Jira Data Center v9.12.12. That is a "self-hosted" product. Your company downloaded the software and installed it themselves on a host that they manage (or that is managed for them by a service provider).

The Automation functionality available in the self-hosted product vs. the Jira Cloud product is a bit different, so it is important to know which product you are using and the version (if self-hosted) to provide relevant guidance.

Like Vijay Kumar likes this
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 2, 2024

Also, you need to put the Log action before the Condition. Since the Condition is not passing none of the actions that come after it will be executed.

Like Vijay Kumar likes this
Vijay Kumar October 3, 2024

hi Trudy,

Thanks for the last input. I have put the 'Log Action' before the condition. Now I am able to get the rule executed successfully. But the problem is I didn't get the email with all the issues.
Audit Log 10_03_24.PNG

 

 

Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
October 3, 2024

It appears that you are working through the failing condition, which prevents sending an email, with @Bill Sheboy . I will leave you in his very capable hands on that effort.

Vijay Kumar October 4, 2024

No worries! Thank you so much for all the help offered so far. Appreciate it. I could able to learn few things.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events