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

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Asked 8 hours ago in Confluence

What are the resources that you use to learn more about Atlassian Products?

I am gathering information about resources available for Atlassian product knowledge transferring for a presentation in our local Atlassian User Group. I want to group them in four categories From ...

55 views 3 4
View question

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