Need help in Automation
Asked by Nagarjuna Busireddypally:

We have hierarchy as portfolio epic \> epics\> tasks\>subtasks.

I need help on, when an portfolio epic is assigned to team ( We have a field named Team) automatically automatically all the issues(epics, stories .....) under that portfolio epic should be assigned to that same team.

Please let me know if there is a way.


Answers:
author: Curt Holley
body: I don't think [@Vikrant Yadav](/t5/user/viewprofilepage/user-id/1801711) solution is what you are after [@Nagarjuna Busireddypally](/t5/user/viewprofilepage/user-id/5103416) as you want to populate the hieratical children, not the linked issues.

I would go about like this.

Trigger: Field (Team) has been edited

Condition: and Team is not empty

Branch: by JQL   
issue in portfolioChildIssuesOf("{{triggerIssue.key}}")

Action (on the branch): Edit issue. *And populate the team using as below.*

*![team.png](https://community.atlassian.com/t5/image/serverpage/image-id/258805i9FC53459501CF508/image-size/large?v=v2&px=999 "team.png")*

comments: author: Vikrant Yadav
body: Thanks [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535) I think this is the correct approach.


author: Nagarjuna Busireddypally
body: Hello [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535)

Thank you for suggestion.

Can you please also help me on this.

When story points for epic is updated, it should automatically update the story points in parent (Portfolio epic), for eg if the aa-1,aa-2 is the epics, aa-3 is the portfolio epic, if we update the story points for epics aa-1, aa-2 it should automatically update story in portfolio epic aa-3


author: Curt Holley
body: Hi [@Nagarjuna Busireddypally](/t5/user/viewprofilepage/user-id/5103416)

It will go much like this [Solved: How do you sum up story points to the epic using j... (atlassian.com)](https://community.atlassian.com/t5/Automation-questions/How-do-you-sum-up-story-points-to-the-epic-using-jira-automation/qaq-p/1731595)  

But taking it up a level so that the 1st condition is Type = Epic

and the branch will need to point at the Portfolio Epic


author: Nagarjuna Busireddypally
body: *Hello [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535)*

*Yeah i tried this way,*

*1) Value changes for story points
2) Issue type equals epic*

*3)then look up issues "parent link" = {{triggerIssue.parent link}}*

*4) For parent branch*

*5) re fetch issue data*

*6) edit issue fields story points {{lookupIssues.Story Points.sum}}*

*![ss.png](https://community.atlassian.com/t5/image/serverpage/image-id/259435i9E4009BCAB247EBD/image-size/large?v=v2&px=999 "ss.png")*

*Please let me know where i have done the mistake*


author: Curt Holley
body: As mark point out here [When story point in epic is updated, it should upd... (atlassian.com)](https://community.atlassian.com/t5/Automation-questions/When-story-point-in-epic-is-updated-it-should-update-story/qaq-p/2370794) your branch needs to be getting the Parent Link from the issue (in this case, the Epic)  

<br />


author: Curt Holley
body: BTW [@Nagarjuna Busireddypally](/t5/user/viewprofilepage/user-id/5103416) could you accept my initial answer, so as to help confirm that it solved the issue and help inform others in the community. Cheers!!


author: Nagarjuna Busireddypally
body: Hello [@Curt Holley](/t5/user/viewprofilepage/user-id/3527535)

I have accepted the answer, could you please detail the automation steps of the one i have asked.

Thank you


author: Curt Holley
body: if you make your branch this, the rest should work.  
![branch.png](https://community.atlassian.com/t5/image/serverpage/image-id/260097i62AF6477F94ECE19/image-size/large?v=v2&px=999 "branch.png")


author: Vikrant Yadav
body: Hi [@Nagarjuna Busireddypally](/t5/user/viewprofilepage/user-id/5103416) You can do this easily using Project Automation.

Select "Edit Issue" trigger \>\> Add condition \>\> Branch For Linked Issue \>\> Select "All Link Type" \>\> Edit Issue action \>\> Update Team field.

Similar post :- <https://community.atlassian.com/t5/Jira-questions/Update-Linked-issues-by-automation-rule/qaq-p/1996757>

Thanks,

V.Y