Have total of sub tasks override user story estimate?

We are using time based uset story estimating.

Is it possible to set Jira so that the sum of all sub task time estimates for a user story become the new user story time estimate?

1 answer

This widget could not be displayed.

Hello,

I have made a workaround

I did a little something its not perfect at all should any of you do better just put it here.

- It add a button left of PLAN mode

- It work only for certain user since it can create a load on the isntance (get the issues data in rest)

It add the sum of subtask instead of story point/time estimate when you click on it. Also add a custom field (we have another kind of priority system)

Add this code into the Announcement banner

<script type='text/javascript'>
AJS.$(document).ready(function () {
    var username = AJS.$('#header-details-user-fullname').attr('data-username');
    console.log(username);
    if (username == 'name1' || username == 'name2(changeme)') {
        var path = window.location.pathname;
        console.log (path);
        if (path.substring(path.lastIndexOf('/') + 1).indexOf('RapidBoard') > -1) {
            AJS.$('#ghx-modes').before('<button class="aui-button" id="add-ubi">Show CF and Aggregate Time</center>');
                AJS.$('.add-ubi').on('click', function () {
                    $('add-ubi').trigger("click");
                });
                AJS.$("#add-ubi").click(function () {
                    //AJS.$("#add-ubi").toggleClass("active");
                    //AJS.$("#add-ubi").remove();
                    AJS.$('.ghx-issues > div').each(function () {
                     try {
                            console.log('Found issue list in sprints');
                            var row = this;
                            var issueKey = AJS.$(this).attr("data-issue-key");
                            //console.log('Found issuekey' + issueKey);
                        if (issueKey)
                        {
                            
                            AJS.$.getJSON(AJS.contextPath() + '/rest/api/latest/issue/' + issueKey, function (data) {
                                console.log('Got data for - ' + issueKey);
                                if (data.fields.customfield_10222 || data.fields.customfield_10222 != null)
                                {
                                    var value = data.fields.customfield_10222.value;
                                    if (value.lenght)
                                    {
                                    value = value.replace("'", "\'");
                                    var actions = AJS.$(row).find('.ghx-end');
                                    AJS.$(actions).before('<style type="text/css"> .ghx-issue-compact .ghx-end-ubi{position:absolute;right:-20px;top:5px;}</style><div class="ghx-end-ubi"><span title="Ubi Priority">' + value + '</span></div>');
                                    }
                                }
                                if (data.fields.aggregatetimeoriginalestimate)
                                {
                                    var value2 = data.fields.aggregatetimeoriginalestimate / 60 / 60 / 8;
                                    var actions2 = AJS.$(row).find('.ghx-end .aui-badge');
                                    AJS.$(actions2).html(value2.toFixed(2).replace(/[.,]00$/, "") + "d");
                                }
 
                            });
                        }
                     }
                        catch (ex)
                        {
                            console.log ("ERROR");
                        }
                    });
                    AJS.$('.js-issue-list > div').each(function () {
                        try {
                            console.log('Found issue list in backlog');
                            var row = this;
                            var issueKey = AJS.$(this).attr("data-issue-key");
                        if (issueKey)
                        {
                            console.log('Found issuekey' + issueKey);
                            AJS.$.getJSON(AJS.contextPath() + '/rest/api/latest/issue/' + issueKey, function (data) {
 
                                console.log('Got data for - ' + issueKey);
                                if (data.fields.customfield_10222 || data.fields.customfield_10222 != null)
                                {
                                    var value = data.fields.customfield_10222.value;
                                    console.log("we are inside of value" +issueKey)
                                    value = value.replace("'", "\'");
                                    var actions = AJS.$(row).find('.ghx-end');
                                    AJS.$(actions).before('<style type="text/css"> .ghx-issue-compact .ghx-end-ubi{position:absolute;right:-20px;top:5px;}</style><div class="ghx-end-ubi"> <span title="Ubi Priority">' + value + '</span></div>');
 
                                }
                                if (data.fields.aggregatetimeoriginalestimate != null || data.fields.aggregatetimeoriginalestimate != 'undefined' || data.fields.aggregatetimeoriginalestimate != "" || data.fields.aggregatetimeoriginalestimate.lenght != 0)
                                {
                                    var value2 = data.fields.aggregatetimeoriginalestimate / 60 / 60 / 8;
                                    var actions2 = AJS.$(row).find('.ghx-end .aui-badge');
                                    AJS.$(actions2).html(value2.toFixed(2).replace(/[.,]00$/, "") + "d");
                                }
 
                            });
                        }
                    }
                            catch (ex)
                    {
                        console.log ("ERROR");
                    }
                    });
        });
    }
}
});
</script>

So here is it I made it quick but ajust it to your need

Martin Poirier

Ubisoft

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 7 hours ago in Statuspage

What are your best incident management tips and stories? #HugOps

 👋Community members! Downtime happens. And great incident response takes a village. Teams like Support, Dev, SRE, Ops, IT, and Marketing have to come together to resolve the problem while keep...

25 views 0 2
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