Is there way to roll up old work log into EPIC ?

Abhishek Goyal November 2, 2023

Hello All 

Greetings !!! 

I Have one question to ask mentioned below. 

 

I have one EPIC , which has multiple user-story, and all the user-story have some work logged. 

Now I created one automation that logged the work into epic but that worked only for the worklog which I modified after this automation.

So the ask is how I rolled-up the old worklog into parent EPIC.

Let's understand by an example.

I have one Epic X , which has 2 userstory in it.

1 userstory logged worked 10 hrs 

2 userstory logged work 8 .

Now I enable the automation, after the 

I added 10 hrs logged work in 1 user story and 10 into 2 user story, now in the EPIC its showing only 20 but ideally I want it should show 38 .

 

Can some one help how can I achieve this buy automation?

 

automation.jpg

1 answer

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 2, 2023

Hi @Abhishek Goyal 

You would need two rules: one for new work logged (your current rule), and another to sum and log the earlier values.  Once the second rule has added the earlier logging values, it may be disabled for future use.

Regarding that second rule...As adding the individual logs for each issue could be challenging to "catch up", you may want to consider instead adding a single entry with the total for the prior time.

Kind regards,
Bill

Abhishek Goyal November 2, 2023

Thanks, @Bill Sheboy  For your reply 

Yes we are using the JIRA server

Need to know more about the second rule and how we can achieve this. 

Is there a way to add the old work logs in one shot before running the above-mentioned rule? 

I am new to this and currently not have an idea how I can achieve this your help is appreciated.

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 3, 2023

Please try writing JQL to return the issues that you want to sum up, or the Epics which have child issues you want to sum.  Test that JQL outside of a rule, using View All Issues from the Jira menu.

That JQL may then be used with a scheduled trigger, processing up to 100 epics at a time until they are all caught up.  Then the rule can be disabled.

In the rule, try using the Lookup Issues action to gather the issues for each epic from the trigger.  Use the work log smart values to sum the results, and then log those to the epic.

Here are some documentation sources to help you with that approach:

https://support.atlassian.com/jira-software-cloud/docs/what-is-advanced-search-in-jira-cloud/

https://support.atlassian.com/cloud-automation/docs/jira-automation-actions/#Lookup-issues

https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--worklog--

Abhishek Goyal November 8, 2023

@Bill Sheboy  But the issue i am using the JIRA server so I don't have the lookup issue.

 

So without a lookup issue can we achieve this?

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 8, 2023

Depending upon your rule needs, there are two ways to do this with Jira Server:

When you only need to view data, there is a bulk-handling feature of Scheduled Triggers and Branching.  That does not seem to fit your scenario, but here is the documentation to learn more: https://confluence.atlassian.com/automation/run-a-rule-against-issues-in-bulk-993924653.html

When you want to use the data to update an issue, as with your scenario, the Send Web Request action may be used to call a REST API function, searching for issues with JQL.  This is very similar to using Lookup Issues, as it results in a list of issues for sum, min, max, and other batch operations.  If you want to try that approach, here are a couple of references, including a walk-through article:

https://community.atlassian.com/t5/Jira-articles/Automation-for-Jira-Send-web-request-using-Jira-REST-API/ba-p/1443828

https://docs.atlassian.com/software/jira/docs/api/REST/9.11.0/#api/2/search-search

Suggest an answer

Log in or Sign up to answer