How can I calculate total estimated time of linked issues?

We have Epic issues as new features, we're going to develop. These Epics goes thru its own workflow as requirements is being prepared. Once we prepare user-stories and technical tasks, they all are linked to specific Epic.

When we negotiate the proposed feature(Epic) with clients we need to understand its estimated time which actually is total estimated time of all linked issues.

Question: Is that possible to get total estimated time of all linked issues somehow?

Thank you!

5 answers

1 accepted

This widget could not be displayed.

Mykhaylo, one way to do that is with our Structure plugin, see if it works for you:

  1. Install "Structure" from Plugins menu, follow "Configure" link, switch to "License Details" tab (Administration | Structure | License Details), click on the link to get a free evaluation license and install it.
  2. Enable the project in question for Structure on that "Configuration" tab in the same admin menu.
  3. Exit Administration and open Issues tab (the search). On the search page, run a search (JQL or whatever) that would show all Epics you're interested in.
  4. Then on the search results page, click Views | Structure - this will open an empty structure with a side list of issues showing you the results of search. Click "Add All" to add them to the structure.
  5. Click "+" icon that appears when you hover your mouse over the grid header and add "Total Remaining Estimate" - this column will show you the total estimations you're looking for.
  6. Now it's time to automatically add stories and technical tasks to the structure. Open Structure | Manage Structure page, and click Import.
  7. Select "Issue Links" as the source of import. On the next page, select link type and direction. All other parameters should be fine in their default values. Run import.
  8. Click "Structure" to go back to structure. It should display a hierarchy of Epics and issues linked to them. (However, a child issue can be linked to only one parent!)

If that's what you need, you can also configure a synchronizer to keep this structure up-to-date as you update issues and create/remove links, and also install other synchronizers like sub-tasks synchronizer or GreenHopper synchronizer.

Hope this helps!
Igor

Disclosure: I work for the company behind Structure plugin.

Thank you, Igor, but it is too expensive solution for our case.

This widget could not be displayed.

You can write a custom field that displays the total value of the estimate time for the linked issues. See screenshots attached.

I have also attached the .java file that does this for you.

Currently what I have implemented only displays the long value. You can figure out how you can format that to display the value in hours minutes and second.

If there are linked issues

------------------------------------------------------------------------------------------------------------------------------------

If there are no linked issues

--------------------------------------------------------------------------------------------------------------------------------------

If issue linking is diabled


--------------------------------------------------------------------------------------------------------------

Java code

public class EstimatedTotal extends TextCFType {
    private static final Logger log = LoggerFactory.getLogger(EstimatedTotal.class);

    public EstimatedTotal(CustomFieldValuePersister customFieldValuePersister, GenericConfigManager genericConfigManager) {
        super(customFieldValuePersister, genericConfigManager);
    }

    @Override
    public Map<String, Object> getVelocityParameters(final Issue issue,
                                                     final CustomField field,
                                                     final FieldLayoutItem fieldLayoutItem) {
        final Map<String, Object> map = super.getVelocityParameters(issue, field, fieldLayoutItem);

        IssueLinkManager issueLinkManager = ComponentAccessor.getIssueLinkManager();
        // This method is also called to get the default value, in
        // which case issue is null so we can't use it to add currencyLocale
        if (issue == null) {
            return map;
        }

        String status = "Issue linking is disabled. Total Estimated time required: ";
        Long totalEstimate = new Long(0);
        if(issueLinkManager.isLinkingEnabled()){
            List<IssueLink> inwardLinks = issueLinkManager.getInwardLinks(issue.getId());
            if(inwardLinks ==null || inwardLinks.size() ==0){status="No linked issues. Total Estimated time required: ";}
            else{status=inwardLinks.size() +" linked issues found. Total Estimated time required: ";}
            for(IssueLink link:inwardLinks){
                Issue linkedIssue = link.getSourceObject();
                totalEstimate = totalEstimate.longValue() + linkedIssue.getEstimate();
            }
        }

        status = status + totalEstimate.toString();
        field.createValue(issue,status);
        field.store();

        FieldConfig fieldConfig = field.getRelevantConfig(issue);
        //add what you need to the map here

        return map;
    }
}

Thank you very much! I'll check it with our JIRA support team.

Can you confirm how you were able to get the JAVA code into a custom field? I have the groovy plugin but not sure that will work without being converted to Groovy. Are you using a specific plugin to call this JAVA code? Please confirm!

Can you confirm how you were able to get the JAVA code into a custom field? I have the groovy plugin but not sure that will work without being converted to Groovy. Are you using a specific plugin to call this JAVA code? Please confirm!

@Bhushan Nagaraj Can you confirm how you were able to get the JAVA code into a custom field? I have the groovy plugin but not sure that will work without being converted to Groovy. Are you using a specific plugin to call this JAVA code? Please confirm!

This widget could not be displayed.

And now it´s July 2017.. still waiting for this function.. 

This widget could not be displayed.

July 2015 and I still cannot believe that JIRA does not automatically estimate the time of a story based on subtasks and linked issues.

 

Why is not possible to do it out of the box?

This widget could not be displayed.

And now it's July 2016...

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

115 views 2 0
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you