Hi all,
Next week we will be running an advanced automation webinar called ‘How to supercharge your automation in Jira Cloud’. This is the second in our series and this time round, we will focus on 3 powerful use cases. Andreas, who co-built the automation engine and loves sardines, will walk through the 3 use cases below, explaining how it all works in detail. For those who want to examine the rules at their own pace, I will post the 3 rules here also.
Before I do here are other resources that might help:
Register for How to supercharge your automation in Jira Cloud
In this rule, we are going to use automation to send a Slack message showing all of the open issues left in the sprint. We will be using our brand new ‘Lookup issues’ action that allows you to create reports and notifications for a number of issues.
It can send a daily report of outstanding issues in the current active sprint to Slack. We will also get into the nitty gritty and show you how to use list iteration syntax in smart-values to iterate over a collection of issues (e.g. {{#lookupIssues}} {{key}} {{/}})
This is a new twist on a familiar and common automation rule. Again, we are showing off some new functionality - the ability to aggregate math functions in smart-values. In this instance we show you how you can sum up story points of all sub-tasks and update the parent issue with this value whenever a sub-task's story point value changes
This rule uses a related issue branch to navigate up to the parent issue of a sub-task, and then uses the following smart-value to sum up story points from all sub-tasks: {{issue.subtasks.Story Points.sum}}
The feedback from our first webinar was ‘give me more juicy and complex use cases’. Well, Andreas has taken you at your word and this powerful rule is the result!
Again, we will showcase a new feature - our new DevOps triggers, which you can use with BitBucket, GitHub or GitLab. Even if you don’t use a git provider, this this rule will teach some valuable lessons. You can just change the components in and out as suits best.
In this rule, we will react to PR merged events and then notify the Dev team. We will then take this a step further and show you how to build a custom integration with a Jenkins build server using our 'Send web-request' action.
Lastly, this rule showcases that you can even use responses from a third party service (like Jenkins) to perform further actions in Jira! Told you we would dive deep!
It may look intimidating but we will break everything down into bite sizes during the webinar so it is all clear.
We look forward to seeing you all at the webinar! If you haven't already registered, do so now!
John & Andreas
Automation team
Hi Bryan, from the screenshot above, it looks like the rule does not have the 'Lookup Issues' component in its component chain. The Lookup Issues action only defines the {{lookupIssues}} smart value for the Automation rule it is added to, so every rule which wants to use the {{lookupIssues}} smart value must have the 'Lookup Issues' component added to it.
The solution for your use case would be to add the 'Lookup Issues' action after your 'Scheduled' trigger, and before your 'Send Email' action. Let us know if that works for you.
Thanks!
Yes, summing up story points is one of the most desired use cases for this feature. We have a number of fields/properties we will be adding to this shortly, with sum up story points being one of the first that will be rolled out.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's right Santeri. Apologies, as a non-Dev, I don't want to waste your time so best to cut straight to the experts when I am not sure :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Lucy,
Jira's default time stamp is in minutes so you will need to add a little math smarts to it. You can see more on this page which will help you:
Hope that helps
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Curt Holley
You should be able to do this. I have attached a screenshot to show how it might work. Let me know if any issues
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @John McKiernan
Do you know if I can (or will be able to in the future) sum up custom numeric fields?
Use case is: The ability to do WSJF calculations in Jira with the help of Automation for Jira.
Value + Criticality + RR OE = Cost of Delay
Cost of Delay / Job Size = WSJF
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Santeri Huvinen ,
It should work for you. You can learn a little more about it in this post: https://community.atlassian.com/t5/Automation-articles/How-to-sum-up-logged-hours-using-automation-in-Jira-Cloud/ba-p/1409115
Otherwise feel free to post a screenshot of your rule here and we can look into what might be going wrong :)
John
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.
Thanks @John McKiernan and @Sam Harding
I am using Schedule trigger and querying for issues using Lookup Issues action. The JQL in the lookup issues is:
Sprint in openSprints()AND statusCategory != Done
The result set is then being emailed. In the email, I am trying to publish the sprint of each issue using {{sprint}}, but that is coming blank.
Based on your responses, looks like this is not possible.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
John's comment above is how you can access the sprint smart value when using sprint related triggers, so should help you get started with using sprint related automation rules.
Specifically with lookup issues, the sprint field is not supported on lookup issues smart values. This would be the reason your smart values are not working. There are some other ways to work around this depending on your use case, for example a JQL condition could check if the lookup issues sprint match a given sprint name, along the lines of 'id in {{lookupIssues.id}} AND sprint = 'mySprint'. However, direct access of the sprint info for lookup issues is not possible.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Venkata Ramana Kaza ,
I think the value you are looking for is {{sprint.id}}
You can see the full list in the screenshot below or on this page
If no joy there, can you tell me what trigger you are using (or better again, send a screenshot of your rule) and also whether you are working on a next-gen project?
Thanks,
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Is it possible to access the Sprint value of the issues in {{lookupIssues}}? I tried {{sprint.name}}, {{issue.Sprint.name}}, {{issue.sprint.name}}. But none work! Any pointers / help would be greatly appreciated. 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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Olga Buslovich ,
For this question, I think it would be best to pop a question through to our support so one of the engineers can answer it. We might need to get into the weeds a bit :)
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Venkata Ramana Kaza @John McKiernan : I'm trying to figure the same rule for updating / adding comments to ~100 tests in the Test Execution with the date/ Jenkins build and was not successful so far. Please share your rule setting if you find the way of updating jira issues that returned by JQL.
TIA, Olga
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.
Ah apologies Ramana, I see what you were asking now.
I don't believe this would be possible. You can't iterate through a list and comment on each. You could set up a second rule with the same JQL that would leave a comment. Not perfect but it might do the trick.
For example:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @John McKiernan. But this is adding the comment only on the first issue in the search result. Not on all issues. Is there a way to traverse each issue in the result set and add a comment or perform any other action?
Regards, Ramana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @Venkata Ramana Kaza ,
yes absolutely it would be as easy as adding one more action to the end of the rule to comment on the issue:
Hope that helps!
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is it possible to add a comment on the issues obtained through {{lookupIssues}}?
Regards, Ramana.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Ah nice, that's a great use case. Thanks for sharing!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks @John McKiernan !
Tested and this works!
The Edit issue fields code is:
{
"fields": {
"Story Point Estimate": {{lookupIssues.Story point estimate.sum}}
}
}
Thanks again
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @JasonB3 ,
good news, you should be able to do this now.
Any of these smart values should work:
Hope that helps!
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey @JasonB3 ,
Glad you enjoyed the webinar! Always fun running one.
At the moment, this is unfortunately not possible. It is an existing 'bug' / limitation :https://codebarrel.atlassian.net/projects/AUT/issues/AUT-1946
The good news, however, is that it is being worked on by one of our engineers at the moment so it should be working within a few sprints. Hesitant to give an exact date but I'll update this post once shipped.
Hope that helps!
John
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Can I do a SUM function on a filtered list? Scenario: Sum Story Points of all sub task that are not Done.
I can't seem to get the filtered list working. I've tried nesting a math IF function, regex string matching on the collection, and Lookup Issue. I couldn't get any of these methods working in from a variety of syntaxes and permutations.
BTW, thx for the webinar! @John McKiernan & @Andreas Knecht . Great stuff!
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.