Automation Rule - Link to Parent

Anthony Pugliese
Contributor
January 31, 2024

Hi,

i am trying to have a rule whereby upon creation of a new Epic, and based on particular criteria, it will automatically link an item to a particular "parent link"/Initiative issue type already created.

i can't seem to do this and may need to be done through the advanced section of the rule builder

my knowledge here is limited and i started drafting the below but pretty sure that is wrong. 
in this instance i want to add a parentlink to any created item to ID 781

 

{"update": {
"issuelinks": [
{
"parentlink": { "id": 781}
},
]
}
}

 

1 answer

1 accepted

1 vote
Answer accepted
Bill Sheboy
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.
February 1, 2024

Hi @Anthony Pugliese 

First thing, I believe the Parent Link field has been deprecated as Atlassian standardized the relationships between issues to use the Parent field.

Next, your question seems to indicate you are using the Free license of Jira.  If that is correct, I believe you will not be able to add additional levels to the issue hierarchy as that is only supported for the Premium and Enterprise license levels.  And so even if you link the issues by Parent, that will not impact the features like reports and roadmaps for the Free license.

Kind regards,
Bill

Anthony Pugliese
Contributor
February 1, 2024

thanks Bill

Parent field is fine to use, whatever can be used.....but cannot seem to find a way.
when I select Parent as a field to modify in the rule builder, I do not seem to be able to set an ID to it.

I am using an enterprise account to test my scenario

test.PNG

the options are to link as a parent to the current issue or trigger issue. instead i wish to set it to a defined Initiative

based on that I then proceeded to use the additional area of the rule builder to specifically define this, but i am not sure that is possible?

 

Bill Sheboy
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.
February 1, 2024

If you are trying to set that to a specific key in a rule, I believe you will need to first save the key in a Created Variable, and then reference that.

For example:

  • trigger: issue created
  • action: re-fetch issue (This is always good to add after the issue created trigger to prevent timing / racetrack problems.)
  • condition: issue type is epic
  • action: create variable
    • name: varMyInitiativeKey
    • smart value: ABC-123 (your key value)
  • action: edit issue for Parent, typing in {{varMyInitiativeKey}}

When you type in the smart value, it will appear below the field.  Select it to use it for the edit.

 

Anthony Pugliese
Contributor
February 1, 2024

@Bill Sheboy 

Fantastic!!! that works.
thankyou for the help

Like Bill Sheboy likes this
Cheri Kure June 6, 2024

Hello, I'm trying something similar -- want to update Parent of a story with an epic key.  The rule runs successfully but it does not update the parent field. What did I do wrong?

example.png

Bill Sheboy
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.
June 6, 2024

Hi @Cheri Kure -- Welcome to the Atlassian Community!

Would you please post images of the audit log details showing the rule execution and of the Create Variable action?  Those may help explain what you are observing.  Thanks!

Kind regards,
Bill

Cheri Kure June 6, 2024

Hi Bill,

Hope this helps

audit log.png

Bill Sheboy
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.
June 6, 2024

What are the types of issues involved?  Specifically, is the trigger issue a Story and the "parent" issue an Epic?

 

What is the type of project: company-managed or team-managed?

 

What is in the Create Variable action:

  • Is it a valid, Jira issue key?
  • Is it for an issue in the same project?
  • If it is not in the same project, is it in the same type of project?

 

Cheri Kure June 6, 2024

The Jira issue key is valid and is in the same company-managed project.

The Create variable action simply has the variable name I created of varMyParentKey and the Jira issue key of the Epic issue.

In the Edit issue fields action I've selected the "Parent (textfield)" field and entered {{varMyParentKey}}. If I use the "Parent (System)" field I cannot enter my variable as it only allows a selection of either Current issue or Trigger issue.

Bill Sheboy
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.
June 6, 2024

It appears someone has created another Parent field, which will definitely cause problems.  Please discuss this with your Jira Site Admin to learn why it was added because there should only be one. 

 

To use the system field in the edit, the dropdown makes it appear no value can be smart value entered.  You may type in your smart value, and it will appear below the field.  When it does, select it for use.

Cheri Kure June 6, 2024

Thanks so much Bill, I'm not used to being able to paste data into a dropdown list field. That worked perfectly.

Like Bill Sheboy likes this
jod
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 28, 2024

Bill Sheboy - thanks so much for you info here - totally worked for me! The last trick was entering the smart value in the Parent field where is only has two choices and then selecting it. Sensitive JIRA. 

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS
AUG Leaders

Atlassian Community Events