I have 2 projects, Project 1 (ABC) and Project 2 (XYZ). Project 1 is a service desk project to receive tickets, but the team actually do the work in Project 2 (their software project).
For each issue created in Project 1 (e.g. ABC-001), I have an automation rule to clone the issue into Project 2 (e.g. XYZ-002) and link the 2 issues such that "ABC-001 is delivered by XYZ-002".
Since the SLA tracking is done in Project 1 (ABC), any SLA triggered Slack messages need to come from Project 1. So if say ABC-001 is close to breaching a particular SLA and I wish to alert the team with a message that includes the URL of the linked issue (i.e. XYZ-002) instead of ABC-001, what is the smart value I should use?
To include the URL of the linked issue (i.e., the issue in Project 2, XYZ-002) in the SLA alert message, you can use Jira automation smart values effectively. Here's how you can achieve this:
Identify the Linked Issue: Use the smart value to reference the linked issue based on the issue link created during the cloning process.
Access the URL of the Linked Issue: Use the {{issue.issuelinks}}
smart value to fetch details of the linked issue, and specifically the key of the issue in Project 2.
Assuming the link type is "is delivered by" (as mentioned), you can use the following smart value to extract the linked issue's key and form its URL:
{{issue.issuelinks.first.outwardIssue.key}}
You can then construct the URL by combining your Jira base URL and the issue key:
https://<your-jira-domain>.atlassian.net/browse/{{issue.issuelinks.first.outwardIssue.key}}
⚠️ SLA alert for {{issue.key}}! This issue is approaching its SLA breach.
Work is being tracked in the linked issue: [{{issue.issuelinks.first.outwardIssue.key}}](https://<your-jira-domain>.atlassian.net/browse/{{issue.issuelinks.first.outwardIssue.key}})
Hi @Chander Inguva thanks for the response. I tried it out but the Slack message that got sent out only displayed (below)
https://<your-jira-domain>.atlassian.net/browse/
The smart value portions were empty so I'm guessing I have to change the scope to Global.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Nathan Yam Did you try to log the above in automation rule before sending to slack for troubleshooting so we know smart value is working as expected?
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.
Yes please
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I happen to test out the smart value {{issue.issueLinks.inwardIssue}} via log action together with {{#debug}}, and it returns the linked issue key in the audit log.
I then changed the log message to
{{#debug}}https://<jira-domain>.atlassian.net/browse/{{issue.issuelinks.inwardIssue}}{{/}}
and it returns the URL with the issue key in the audit log.
However, when I paste
https://<jira-domain>.atlassian.net/browse/{{issue.issuelinks.inwardIssue}}
into the Slack automation rule, the smart value is not empty. So it seems like the problem isn't with the smart value but the automation rule. I wonder if I have to change the rule scope to global.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Chander Inguva I finally resolved it. I happen to decide to put the Re-fetch issue data action before the Add: Send Slack message action and that did the trick. Thank you so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome Nathan, sorry did not get chance to look back at latest updates from this. Glad it worked for you
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.