jiracalc

atlassian jira storypoint calculator

Dovrai installare un'estensione come Tampermonkey, Greasemonkey o Violentmonkey per installare questo script.

You will need to install an extension such as Tampermonkey to install this script.

Dovrai installare un'estensione come Tampermonkey o Violentmonkey per installare questo script.

Dovrai installare un'estensione come Tampermonkey o Userscripts per installare questo script.

Dovrai installare un'estensione come ad esempio Tampermonkey per installare questo script.

Dovrai installare un gestore di script utente per installare questo script.

(Ho già un gestore di script utente, lasciamelo installare!)

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione come ad esempio Stylus per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

Dovrai installare un'estensione per la gestione degli stili utente per installare questo stile.

(Ho già un gestore di stile utente, lasciamelo installare!)

// ==UserScript==
// @name        jiracalc
// @name:ru     jiracalc
// @namespace   jc
// @description atlassian jira storypoint calculator
// @description:ru калькулятор сторипоинтов для atlassian jira
// @include     https://digipro.atlassian.net/issues/*
// @version     1.1
// @grant       none
// @author   [email protected]
// ==/UserScript==
function jiracalc()
{
  if ($('.customfield_10005').size() > 0)
  {
    var sum = [];
    
    $('.customfield_10005').each(function (i, elm)
    {
      var el = $(elm);
      if (el.text() !== '') 
      {
        var com = el.parent().find('.components').text();
        if (com) com = com.trim();
        if (com != '')
        {
          if (isNaN(sum[com])) sum[com] = 0;
          sum[com] += parseFloat(el.text());
        }
      }
    });
    var msg = '';
    for (var prop in sum)
    {
      msg += '<b>' + prop + ':</b> ' + sum[prop] + ' ';
    }
    if (!$('.jiracalc').size()) $('.aui-item:eq(0)').append('<div class=\'jiracalc\' style=\'font-size: 16px; width: 100%; text-align: center; margin: 10px\'>calllllc</div>');
    $('.jiracalc').html(msg);
  }
}
setInterval(jiracalc, 2000);