Hey guys!
I'm doing an automation in jira that sends emails if my project's stories don't have linked items. But I noticed that even when there are linked items in stories, I get warning emails.
I'd like to create a rule that sends a warning e-mail only in cases of missing linked items, and otherwise takes no action!!
Has anyone seen something similar? I will attach how my rule is currently.
Thanks!
Hi @Ana Luiza Chagas
Looking at your use-case and and trying to grasp where you are getting with limitation on JQL in terms of linked issue searching without the help of Scriptrunner et cetera. I came up with this one.
This rule is triggered when a new Sprint is started. It will branch off on Issues in Sprint. When you select the Create a branch, select Branch rule / related issues and select Issues in the sprint. This will go over each item that is in that started sprint. In the next step I added the Related Issues condition with these values:
Then as final step for now I added a log action with {{issue.key}} has no linked issue. So when this rule is completed you can open the Audit log and see all issue keys that have no linked issue. You can chose your own action by sending an email for example and using {{issue.key}} has no linked issue in the message to send out notifications. Or notify the reporter through a comment that it has not been linked.
Hope this helps. Let me know if this helped in your use-case. If this helped please Accept the answer in this response.
I followed the flow you suggested and it seemed simpler, but I have a question.
I added the phrase "{{issue.key}}" in the body of the email and received the items in separate email notices in my inbox. Would it be possible to unify all these items into a single warning, and when there are no items the rule takes no action and I don't receive warnings?
Thanks for the help!!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No worries. In that case it might be easier to do this:
Do a lookup issues with: project = "XXX" and sprint in openSprints() and issueLinkType is Empty
Then have an email action with this:
{{#lookupIssues}}
<a>{{key}}</a>
{{/}}
This should do the trick. You can format it with links by changing the <a>{{key}}</a> to:
<a href="{{url}}" target="_blank">{{key}}</a>
This way the key's are clickable in your email.
Hope this helps. If this helped please Accept the answer in this response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Wouter van den Berg
Thanks for the answer!
The clickable keys solution was great and worked great!
But I'm still receiving empty emails like this when all the items in my sprint already have links, I'm studying a solution that doesn't send emails in these cases. Have you ever seen something similar?
Thanks for the help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Then you need to add an Advanced Compare with {{lookupIssues}} does not equal empty in between the lookupIssues and the email:
If no issues are found (all issues are linked) the result will be no email. The log will show this:
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.
Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.
Register NowOnline forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.