How to calculate total original estimate of filtered issues?

Roman Kuznetsov June 16, 2012

We need to calculate the sum of original estimates of filtered issues (from different projects). Is it possible?

Jira has Time Tracking Report. But it shows issues of only one project.

The best way would be total numeric fields for Original Estiamte, Remaining Estimate, Time Spent in Issue Navigator.

Maybe plugins can do it?

Thanks.

9 answers

1 vote
clair clark October 4, 2012

Hi - yes i have done that.

But I agree - inconvenient.

And it is not as good as the time-tracking report per version in Jira.

My issue is that I want a report that tells me if we are on track for a release schedule, however the release is made up of different projects.

Would love a time tracking report that allows filtering cross project :)

Thanks for your help

0 votes
Nikolay Trifonov October 20, 2014

We made a version for the "pretty" format, which also output the results in pretty format smile

It is very handy to run as a snippet (just create a snippet, paste the code and then you only need to run it whenever needed).

Here is the code:

(function () {

 

            function parseJiraTime(time) {

                var splittedTime = time.split(", ");

 

                var result = 0;

                for (var i = 0; i < splittedTime.length; i++) {

                    var currentTimeUnit = splittedTime[i];

                    if (currentTimeUnit.indexOf("week") > -1) {

                        var count = parseInt(currentTimeUnit, 10);

                        result += (count * 40 * 60);

                    }

 

                    if (currentTimeUnit.indexOf("day") > -1) {

                        var count = parseInt(currentTimeUnit, 10);

                        result += (count * 8 * 60);

                    }

 

                    if (currentTimeUnit.indexOf("hour") > -1) {

                        var count = parseInt(currentTimeUnit, 10);

                        result += (count * 60);

                    }

 

                    if (currentTimeUnit.indexOf("min") > -1) {

                        var count = parseInt(currentTimeUnit, 10);

                        result += count;

                    }

                }

 

                return result;

            }

 

 

            var table = document.getElementById('issuetable');

            var ths = table.querySelectorAll('th');

            var index;

            Array.prototype.forEach.call(ths, function (th, i) {

                var data = th.getAttribute('data-id');

                if (data === 'timeoriginalestimate') index = i;

            });

            var rows = table.querySelectorAll('.issuerow');

            var total = 0;

            Array.prototype.forEach.call(rows, function (row) {

                var cells = row.querySelectorAll('td');

                cells = Array.prototype.slice.call(cells, 0);

                var value = cells[index].textContent;

                if (!value) return;

                total += parseJiraTime(value);

            });

 

            var weeks = parseInt(total / (60 * 8 * 5), 10);

            total = total % (60 * 8 * 5);

 

            var days = parseInt(total / (60 * 8), 10);

            total = total % (60 * 8);

 

            var hours = parseInt(total / 60, 10);

            var minutes = total % 60;

 

            console.log('Total original estimate: ' + weeks + 'w, ' + days + 'd, ' + hours + 'h, ' + minutes + 'm.');

        }());

 

0 votes
Anton White July 30, 2014

Hi everybody!

I wrote small javascript snippet which can be easily run in Chrome Developer tools.

You can run this code easily in Console or create a Snippet in a Sources tab.

Notice: Works only with hour format in time tracking settings, e.g. 5h, 14h. You can modify snippet to fit your needs.

Enjoy!

---------------------- COPY CODE UNDER THIS LINE ------------------------------------

var table = document.getElementById('issuetable');

var ths = table.querySelectorAll('th');

var index;

Array.prototype.forEach.call(ths, function(th, i) {

var data = th.getAttribute('data-id');

if (data === 'timeoriginalestimate') index = i;

});

var rows = table.querySelectorAll('.issuerow');

var total = 0;

Array.prototype.forEach.call(rows, function(row) {

var cells = row.querySelectorAll('td');

cells = Array.prototype.slice.call(cells, 0);

var value = cells[index].textContent;

if (!value) return;

total += parseInt(value, 10);

});

console.log('Total original estimate = ' + total + ' hours.');

0 votes
Anton White July 30, 2014

Hi everybody!

I wrote a small javascript snippet which can be easily run in Chrome Developer tools' Console.

Notice: Works only with hour format in time tracking settings, e.g. 5h, 14h.

You can modify snippet to fit your needs like parsing another time format.

---------------------- COPY CODE UNDER THIS LINE ------------------------------------

var table = document.getElementById('issuetable');

var ths = table.querySelectorAll('th');

var index;

Array.prototype.forEach.call(ths, function(th, i) {

var data = th.getAttribute('data-id');

if (data === 'timeoriginalestimate') index = i;

});

var rows = table.querySelectorAll('.issuerow');

var total = 0;

Array.prototype.forEach.call(rows, function(row) {

var cells = row.querySelectorAll('td');

cells = Array.prototype.slice.call(cells, 0);

var value = cells[index].textContent;

if (!value) return;

total += parseInt(value, 10);

});

console.log('Total original estimate = ' + total + ' hours.');

0 votes
Anton White July 30, 2014

Hi everybody!

I wrote small javascript snippet which can be easily run in Chrome Developer tools.

You can run this code easily in Console or create a Snippet in a Sources tab.

Notice: Works only with hour format in time tracking settings, e.g. 5h, 14h. You can modify snippet to fit your needs.

---------------------- COPY CODE UNDER THIS LINE ------------------------------------

var table = document.getElementById('issuetable');

var ths = table.querySelectorAll('th');

var index;

Array.prototype.forEach.call(ths, function(th, i) {

var data = th.getAttribute('data-id');

if (data === 'timeoriginalestimate') index = i;

});

var rows = table.querySelectorAll('.issuerow');

var total = 0;

Array.prototype.forEach.call(rows, function(row) {

var cells = row.querySelectorAll('td');

cells = Array.prototype.slice.call(cells, 0);

var value = cells[index].textContent;

if (!value) return;

total += parseInt(value, 10);

});

console.log('Total original estimate = ' + total + ' hours.');

0 votes
Stefania Tiraboschi May 8, 2013

Solution found!

https://tempoplugin.jira.com/wiki/display/TEMPO/Tempo+7.6+Release+Notes

Released 2 days ago, it does exactly what we need!

0 votes
Stefania Tiraboschi May 7, 2013

Same here. We need to sum up the original estimates of all the issues in one group of issues (version).

Roman Kuznetsov May 7, 2013

Still no solution...

0 votes
Oğuz Kağan Aslan March 31, 2013

i am also waiting for a solution to this problem.

0 votes
clair clark October 4, 2012

Hi

I also need to do this - did you get a resolution at all?

Thanks

Roman Kuznetsov October 4, 2012

Hi

You can download Excel file with filtered issues in Issue Navigator (Views - Excel) and set formula in Excel to calculate total fields.

But it's inconvenient.

Suggest an answer

Log in or Sign up to answer