Automation to get value from Parent in a different Project

Thomas November 13, 2024

I want to get the labels from a parent-issue through automation. I made a autmotino to update a field value (label) when the issue ist updatet. The label should come from the parent-issue. 

 

The automation runs but can't find the parent. Is it possible to get the value label from a different project, if the parent is in the different project?

 

pic1.jpgpic2.jpg

 

2 answers

0 votes
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.
November 13, 2024

Hi @Thomas -- Welcome to the Atlassian Community!

By default, automation rules may only access issues in a single project.  The exception is to create / clone issues in another project.

When you want your rule to access issues in another project, change the scope in the details at the top of the rule to multiple-project or global.  Your Jira Site Admin will need to help with that in the global settings as such rules can have a larger impact on your site.

Kind regards,
Bill

Thomas November 13, 2024

Hi, I already did open the Automation for both projects. 

I made hierarchy in plans (advanced roadmap). There I got a custom issue above the Story. The Story is the Child of the Custom issutype which is the parent. The field on the Parent ist called "Parent Link" (not to confuse with linked issues in JIRA)

So now, when I'm updating my Story I want to get the labels from my parent link, and set it on my Story. 

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.
November 13, 2024

Thanks for clarifying, and I believe rules cannot use the Parent Link when referring to an issue as the "parent" for plans in those actions.

 

As you want to copy the Label values, let's first see if they are available directly: add a write to the audit log with this expression and then re-test your rule:

parent labels: {{issue.Parent link.labels}}

If that works, use the smart value {{issue.Parent link.labels}} in the field.

 

If not, I believe the only way to get the information will be to call the REST API endpoint for an issue search with JQL using the Send Web Request action.

For Jira Cloud, this would be easier as the Lookup Issues action may be used.  However, Data Center's version of Lookup Issues does not support the Labels field yet.

 

Like Kseniia Trushnikova likes this
Thomas November 13, 2024

so i dont get the label. but what i get is the parent link with this

 

parent lables: {{triggerissue.parent link}}

 

pic3.jpg

 

is it possible to get it with smart values and jql search?

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.
November 13, 2024

You could get the issue (and its fields) with a JQL branch, but then you could not use the field in the edit action to change the trigger issue.

This is why I described the approach of using the REST API with JQL to get the data and then use the web response in the edit.

0 votes
Kseniia Trushnikova
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 13, 2024

Hi @Thomas,

Are you talking about a sub-task and its parent? If so, you can't have a sub-task linked to a parent on another project.

What link type is used for your tickets?

Try to use the smart value in the Edit issue action, it will return labels from a linked issue:

{{triggerissue.issuelinks.inwardIssue.labels}}

Screenshot 2024-11-13 at 16.33.07.png

Thomas November 13, 2024

Hi, I made hierarchy in plans (advanced roadmap). There I got a custom issue above the Story. The Story is the Child of the Custom issutype which is the parent. The field on the Parent ist called "Parent Link" (not to confuse with linked issues in JIRA)

So now, when I'm updating my Story I want to get the labels from my parent link, and set it on my Story. 

Suggest an answer

Log in or Sign up to answer