Linking a newly created ticket with automation for Jira

Deleted user April 24, 2017

I'm struggling how to use the link issues action in automation for Jira. I've setup a rule that when a specific issue type is created, it creates another of a different type. I want these two to be linked but can't get my head around how to do that...

Thanks!

1 answer

1 accepted

0 votes
Answer accepted
andreas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 25, 2017

Hi Saskia,

So your rule for this would have to look like this:

  • Trigger: Issue crated
  • JQL condition: type = Bug (or whatever issue type you have)
  • Action: Create issue
  • Action: Related issues with 'created issues' selected
    • On this related issues branch add the 'Link issues' action and select 'Trigger issue' as the issue you want to link to

So I think the trick here is the related issues condition to branch off for the newly created issue and then link that back to the issue that originally triggered the rule.  The issue on the main branch always refers to the trigger issue and not the created issue.  We've already got https://codebarrel.atlassian.net/browse/AUT-277 as well to make this particular case a bit easier!

Hope this helps!

Cheers,

  Andreas

Deleted user April 26, 2017

I think I'm doing something wrong... It's still not linking them - have I missed something? Thanks!

Screenshot.png

 

andreas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 26, 2017

Hi Saskia,

That looks about right.  Is this a project specific rule though (you can see this in 'Rule details')?  Is the 'CONFIG' project different to the project this rule is defined in?

If that's the case, then you need to make this a global rule that can perform actions across different projects.

You can do so by visiting global admin -> system -> automation rules then edit the rule details and change this to be a global rule.

You'll probably want to add a JQL condition immediately after the trigger to check the created issue is in the current project (so project = 'ABC').

Hope this helps.

Cheers,

  Andreas

Deleted user April 27, 2017

I made no changes and noticed this morning whilst someone else was creating a ticket it linked them... It works, not sure why it wasn't yesterday!

Thanks!

Deleted user April 27, 2017

A related question... How do I refer to related issues? E.g. when referring to a parent issue it would {{issue.parent.fieldname}}.

Thanks!

andreas
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 27, 2017

Hi Saskia,

Great the linking is now working.

For parent issue you should be able to use:

{{issue.parent.fields.summary}}

(to get the 'summary' for example)

Cheers,

  Andreas

Deleted user April 27, 2017

Gotcha - didn't realize the parent parameter worked for related items too, assumed it was just child/parent relationship.

Will give that a go.

Thanks!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events