I want to leave a comment to inform the reporter of linked issues.
Something like:
Hello, your issue has been moved to another project's backlog. Please follow all future progress in issue _______.
Where ________ is an existing linked issue to the current issue where the comment is being left.
I have tried many smart values but am striking out. Please help! :)
Hi @Ryan Gill ,
to really find a solution that matches exactly your needs please specify your use case in more details and from a functional perspective.
Best
Stefan
Hello Stefan
Here is my use case:
I have a Jira Service Management project which is being used to triage issues before sending them to other projects.
There are workflow transitions that contain a post-function that use Jira Misc Workflow Extensions to create a new issue in another project, and link the new issue to the existing service management issue.
Once the transition to the "Send to Project X" status is done, there is a Jira Automation rule set to update the status of the issue in Jira Service Management to be "Sent to another project" (status type: done/green).
I want, via Jira Automation, for a comment to be left on the Jira Service Management issue, where a message informing the reporter of the Jira Service Management issue that their issue has been triaged and transferred to another project, and inform them of the new key of the issue where they can follow future work on their request by a development team.
Thank you for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ryan Gill
As far as the linking is already made by the workflow post-function the automation rule only needs to react to trigger of "issue linked". This will also take the source issue into context (which as far as I got it right will be your Service Management issue). The destination issue in this case is the newly created issue (see inward-outward link description). Therefore the following rule should do the expected work (just took the problem/incident linking, that needs to be configured according your requirements/linking types):
Please keep in mind to configure the rule as multi-project or global rule as it is considered to operate in more than 1 projects.
Best
Stefean
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.
Hi @Stefan Salzl , this worked perfectly!
I made it a global rule, but added an if condition to make it apply to a single origin project for the time being. Thank you very much.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @ryan
The other commenters here have left great suggestions which you can explore. One other method is to use the smart value `{{issue.issuelinks}}`. This provides a list of the issue links on an issue you can use in smart values. For example, the smart value
`{{#issue.issuelinks}}{{type.name}} - {{inwardIssue.key}}{{/}}`
Will print out:
<issue type> - <issue key>
for each link on your issue. In your case, you may want to filter the issue links down to just the one which is type of "Moved to" or whatever the name is of the link. In that case, you could use smart value
{{#issue.issuelinks}}{{if(equals(type.name, "Moved to"), inwardIssue.key)}}{{/}}
This will filter down the issue links to just the issue key of the linked issue, just replace the "Moved to" to the name of the link type. Depending on how the link was created, you may need to replace the inwardIssue to outwardIssue, if you are seeing the wrong issue key being displayed.
Hope that works for you!
Cheers,
Sam
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I used Sam's method for an automation when we add a link to an issue in a duplicate situation. For our use case if issue A and B are duplicates and issue B has a link added to issue A with link type "duplicates" the automation adds a comment on issue B informing the user that it's a duplicate of issue A. This was the smart value code I used and it worked great. Thanks, @Sam Harding for pointing this out. I had not seen details about this smart value in the documentation.
{{#issue.issuelinks}}
Key: {{outwardIssue.key}}
Reporter: {{outwardIssue.reporter.displayName}}
Summary: {{outwardIssue.summary}}
Description: {{outwardIssue.description}}
{{/}}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Ryan Gill - First, be sure to consider that if your linked issues are on another project, you'll need to expand the rule scope to include those projects. Here's how I'd handle it:
Perform a Lookup Issues action with the following query:
Issue IN (linkedIssues({{issue}}))
Then use {{lookupIssues}} in your comment.
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.