Hello everyone,
I have a new topic I am working on and I would need some assistance on one question, as my current solution doesn't work as intended.
Use Case: I want to setup an automation which sends out an E-Mail to stakeholders, if there are tickets in stauts "open" in the currently running sprint and the sprint only has 3 days left, to inform them that these tickets may not be completed.
Current solution:
PS: The 5 minutes is just for testing!
Problem: My issue is, that the E-Mail is sent out even if the sprint end date is not close to remaining 3 days.
I think the issue is, that the smart value for {{sprint.endDate}} isn't usable if I don't use "Sprint" as a trigger? Is this so?
Does anyone have an idea how to slove my Use-Case? :)
Thanks in advance!
Konstantin
Hey everyone,
I managed to solve it myself after a few hours :) Thanks for your hints, they helped me!
My solution was to create a variable with the lookup on the sprint End Date of the first issue. I then needed to format the variable with a ".toDate" and could then use the compare action:
Thanks a lot for your help!
BR
The created variable you show will contain a list of values if the first issue from the lookup results has ever been in multiple sprints. This will certainly make the condition work in unexpected ways.
This is why I suggested the method using smart value, list filtering to get the active sprint's end date:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Bill Sheboy
one question here. I am performing the lookup on "openSprints()" with is defined as "Search for issues that are assigned to a sprint that was started, but has not yet been completed." (https://support.atlassian.com/jira-software-cloud/docs/jql-functions/#openSprints--)
My project always only has one active sprint and previous sprints are always completed. So in this scenario the check on "openSprints()" should be enough or am I misunderstanding something?
Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If there are never any remaining incomplete issues in a sprint when the sprint completes, there will be no problem. But if there are incomplete issues...
Here is the scenario I am describing...
And so this smart value expression:
{{lookupIssues.first.sprint.endDate.jiraDateTime}}
Will contain both Sprint 1 and Sprint 2's endDate values, separated by a comma...for example:
2024-12-09T09:23:12.0-0500, 2024-12-23T08:23:10.0-0500
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This will be feasible using a date difference smart value option.
{{now.diff(spint.endDate).days}} less then 3, you don't specify days in the second value just a number.
Or use {{now.diff(spint.endDate).days.abs}}
This is depending the positive or negative output of the smart clause.
add a log action in your automation to check the output.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Marc - Devoteam
thanks for your quick answer :)
I tried your comment, but I'm not sure if I configured everything correct?
I tried to find out how to configure the Log Action, but the output is empty for both values?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
After the lookup.
Branch your rule, using an advanced branch. the brach should be on {{lookupIssues}}
Then the in the branch place the compare and email action.
Currently the issues found in the lookup are not compared as you need to specify this by using the smart value {{lookupIssues}}.
This is also mentioned in the rule lookup issues action.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Now I'm lost?
I didn't have any issues with the lookup without the advanced branch. All tickets have been correctly grouped in the e-mail sent.
What exactly should I do? Sorry, didn't quite understand your last comment.
Thanks in advance!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The lookup finds issues, but to iterate over the found issues.
Branch your rule, use an advanced branch with the values {{lookupIssues}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your sprints have a repeated and consist schedule, the simplest way to do this is to just set the Scheduled Trigger to only run on that specific day.
If your sprints vary, you could update your rule to check one issue in the sprint, extracting the end date for comparison.
Looking at the rule you show, there appears to be a typo in the JQL. Please check that JQL outside the rule to confirm it works.
Back to your rule, the sprint field is a list of values, and so one value for the active sprint must be extracted to perform the comparison. You could get the sprint end date from one of the issues in the lookup like this:
{{#lookupIssues.first.sprint}}{{#if(equals(state,"active"))}}{{endDate.jiraDate}}{{/}}{{/}}
This works by getting the first issue from the lookup results, iterating over the sprint field, and then filtering to get just the active one. This handles the situation where an issue has been in multiple sprints.
Then store that with Create Variable to perform the comparison later.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.