When story point in epic is updated, it should update story points in portfolio epic
Asked by Nagarjuna Busireddypally:

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 total count of epic story points in portfolio epic aa-3

Please help on this.

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

I have tried the above, but lookup issues is not pulling the parent one


Answers:
author: Mark Segall
body: Hi [@Nagarjuna Busireddypally](/t5/user/viewprofilepage/user-id/5103416) - It's in your branch. Parent is intended strictly for Sub-Tasks. You'll want to use a JQL lookup instead like this:

```
Key = {{issue.Parent Link}}
```

comments: author: Nagarjuna Busireddypally
body: Hello [@Mark Segall](/t5/user/viewprofilepage/user-id/4666637)

Through your suggestion i was able to lookup for the portfolio epic, but the story points are not getting updated. Below is the screenshot of the rule.

I have used {{lookupIssues.Story Points.sum}} for edit issue fields story points  

When story points is updated for epic, automation rule was pulling its parent epic but story points are not updated in portfolio epic

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


author: Mark Segall
body: So you're on track with the {{lookupIssues.sum}}. However, there is no lookup issues action in your rule.

You'll want to add the Lookup Issues action just before your Edit Issues component inside the branch. JQL would look like this:

```
"Parent Link" = {{issue}}
```

This will return all Epics under the branch issue. From there you should be able to use the {{lookupIssues.sum}} smart value in the Edit Issue action.


author: Nagarjuna Busireddypally
body: Hello [@Mark Segall](/t5/user/viewprofilepage/user-id/4666637)

Thank you for your suggestion and help.

Based on the same suggestion i tried for a similar automation but i was got confused on how to pull the issues

I am trying to automate this when an issue is created and assigned to epic, then the team(field) value from epic should be automatically copied to created issue.

Can you please help

Thank you


author: Mark Segall
body: You should be able to get there with something like this:

* TRIGGER: Field Value Changed (Epic Link)  
  *NOTE - Using field value changed instead of issue created will addresses use cases where the story either has no Epic at creation or the story changes Epics*
* ACTION: LookupIssues
  *

    ```
    Key = {{issue.Epic Link}}
    ```

* ACTION: Edit Issue (Advanced)  
  **Team is a tricky one because it needs to be set by JSON. [Here's a question](https://community.atlassian.com/t5/Advanced-Roadmaps-questions/Can-Automation-set-the-Team-field-when-an-issue-is-assigned/qaq-p/1616145) on setting Team (Note - It appears that the working approach was not set as the accepted answer) but the final comment was encouraging.**