Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I use Automation to copy a field value from a Portfolio Parent?

We are using Portfolio for Jira to create a hierarchy of:

Capability -> Epic ->Story

I want to use Automation Pro for Jira, so that when an Epic is created, a custom field value from the Parent (Capability issue) is copied to the Epic.  I can't see how to do this currently.

1 answer

Hi Pete

I struggled with this a bit in the beginning as well - but first step is to figure out the customfield_id. 

You can find your custom field id:s by browsing your project with the REST API.

https://<your project>.atlassian.net//rest/api/2/issue/<ISSUE ID>?expand=names

By utilising this on a capability issue you should be able to find the issue id:
Example: customfield_10019

Within Automation Pro you should be able to fetch the value using {{issue.parent.fields.customfield_10016}}


Perfect, thanks... I didn't realise you could use issue.parent in the JSON.

Like Komtec LTD likes this

Actually, can't get this to work even though the Automation rule reports success.  I'm setting the custom field to a smart value {{issue.parent.fields.customfield_15780}} and it is still blank after the rule executes.  The parent issue definitely has this value set, and is linked with the Portfolio "Parent Link" field.

Actually - could you try this using straight up copying.

When: Issue Created 
If: Issue Type equals Epic
Then: Edit issue fields "Copy Capability Issue" from Parent Issue.

And just double checking here - Is Capability Issue enabled on the Epic level as well? 

Can you see anything useful in the audit log? 

No, the "Copy from parent" only works for sub-task issue types.  I believe that must be the same for the {issue.parent....} field too.  Seems to be a limitation of Automation.

Hi @Pete Singleton - you are correct.
A4J has a feature request to implement this: JRACLOUD-74105 

The 'parent' option in 'Branched issues' only works for sub-tasks and their parent.

You could try @Scott Harwood 's solution mentioned. here :

* Trigger: Issue Transitioned
* Issue Condition: Issue is Epic & Status is in Progress
* Related Issue Branch (JQL): "key = {{issue.Parent Link}}"
** Transition Action: Copy from trigger issue

 

In addtion: if you have Scriptrunner available, or are willing to evaluate, you might be able to do something with the 'Parent Issue Field' or the Portfolio JQL options.

Good luck,

Edwin.

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Apps & Integrations

🍻🍂Apptoberfest Update: Upcoming Virtual Events 🎉

Hello Community! I hope you've been enjoying the 🍂Apptoberfestivities🍂 (I know I have!) The event is heating up next week with a series of virtual events that we're calling the 🍻🍂Partner App ...

723 views 7 24
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you