So there's two ways to achieve this. The easiest way is to simply add the "Linked issues" field to your create issue action like this and link to the 'Trigger issue':
This requires that the linked issues field is on your create issue screen though!
You can also achieve this with the separate 'Link issue' action but it requires branching off (using the 'Branch rule / Related issues action') for the created issue:
One caveat with this approach is that if this is a project specific rule (which you can see in 'Rule details') and the created issue is another project then this wont work. You'll have to change this rule to a 'Global' rule via the 'Automation rules' section in global admin first so that the 'related issues' branch action can find the created issue in a different project.
Find out more about Automation for JIRA on marketplace, or visit our component docs: http://codebarrel.io/available-rule-components
I tried this but am getting an error in the automation log.
The type of link I want to do is "relates to" and linking is available on the create issue screen. I made a minor change to the code to reflect that:
{ "update" : { "issuelinks" : [ { "add" : { "type" : { "name" : "relates to" }, "outwardIssue" : { "key" : "{{issue.key}}" } } } ] } } |
Screen Shot 2016-09-14 at 8.59.31 AM.png
TIA!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I figured it out, after some coffee and chocolate
Our issue link type is called Related.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Phyllis,
Glad to hear you worked it out. Many things are solved with coffee and chocolate (only dark chocolate though I hope )!
Yes I should have made that more clear in my answer. To get the issue link name, you need to check what they are called in your instance by visiting https://<yourinstance>/secure/admin/ViewLinkTypes!default.jspa (if you are a global admin).
Cheers,
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Andreas,
I am very sorry, I am not familiar with the configuration of Jira. How should I configure it to let the linked issues field on my create issue screen?
Sincerely
Qing
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You should add this little statement from the blog to all your documentation:
Just make sure the “Link issues” field is on the appropriate screen in JIRA!
This was causing me havoc till I finally found this.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have the "linked issues" field in the Create issues screen. I have a rule set up to trigger once a story is created in a specific project to a specific Scrum Team....then Create a task...then link the task to the trigger issue. Everything works up to the creation of the new task...but the new task will not link to the parent.
Basically once a story is created under specified conditions
new task is generated
and a link "Child of" is set to Trigger issue.
This doesn't seem to work. Any suggestions??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Brett,
Can you raise a support request please at https://codebarrel.io/support and include screenshots of your rule configuration and audit log (with show more expanded) please?
Cheers,
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Andreas,
I would like to use “Automation for JIRA” with the following behaviour:
“Link any issue if it is mentioned on a comment of any other issue” (using a particular type of relationship).
It is possible?
Kind regards,
Marcos
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I'm new to Jira and I have created set of rules to add a comment to the Service Desk ticket once we transition one of the software tickets. My problem is that I want to add the software ticket name into the comment. Is there a way to automate that in Jira?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Mohammed,
what you meant with " software ticket name"? Summary or what?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
I can successfully create and link the new issue, but im having some trouble pulling across some of our custom fields that contain insight objects.
When I check the new issue created, the data doesn't exist. I can edit the issue and then add them all in manually but it doesnt seem the copy works.
Thanks
Phil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi, I think I have a similar problem. When an Issue's status is changed to Done I use Automation to Clone the Issue and transition it to Backlog. However I need all the Sub-Tasks of the Issue to also be cloned and transitioned to Backlog. How would you set up this rule?
Clone Issue > Transition to Backlog > Branch: Subtasks > Link Issue??
So far I keep ending up with two clones of the parent issue in Backlog of trigger issue and no sub-tasks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
the rule in the picture produces, for a non-null triggerIssue and a non-empty Driver (user picker) the following description:
RulareTeste pt:
TESTS IN PROGRESS status instrumentat de un child- (=belongs-to) task in Daily.
and triggerissue is
and triggerissue.fields.driver e:
Any help is appreciated, thanks!
Pompi
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Pompi,
Looking at your screenshot, it looks like you are using 'triggerissue'. This is case sensitive though. It needs to be:
triggerIssue
Hope that helps. Also to set a user field like 'Tester', you'll need:
{{triggerIssue.fields.Tester.name}}
Cheers,
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That workded like a charm. Thank you. (it would be nice to have it emphasized that curly language , at least as variable names goes, is in fact case sensitive. I was under the impression , after reading the couple doc pages, taht smart fields are case insensitive - could be just my lack of attention though). Thanks again for the prompt response.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Andreas,.
Is there a guarantee that the trigger issue is available in scope via smart values, e.g., {{triggerIssue.fields.MyCustomTextField}}? I am having troubles squeezing any sort of info from the issue triggering the rule once I find myself deep down covered under a branch rule like "For all linked issues". The values there, for both {{triggerIssue}} and {{triggerIssue.fields.MyCustomTextField}} are null (empty string if tried to be dereferenced in, say, Description or Assignee box).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Arici,
That should definitely work. 'triggerIssue' is always defined to be the issue introduced by the rule trigger.
Can you raise a support request please at: https://codebarrel.io/support
Please include a screenshot of your rule configuration and audit log showing a rule execution.
Cheers,
Andreas
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online 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.