0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

backlogの時間を簡単に集計したい(「課題」画面編)

Last updated at Posted at 2025-05-12

backlog

作成方法

①以下スクリプトをショートカットURLに登録する。

javascript:(function(){  var eSum = 0, aSum = 0;  $('tr').each(function(){    var tds = $(this).find('td');    var e = parseFloat($(tds[13]).text());    var a = parseFloat($(tds[14]).text());    if (!isNaN(e)) eSum += e;    if (!isNaN(a)) aSum += a;  });  alert('予定時間: ' + eSum + ' 実績時間: ' + aSum);})();

以下はEdgeに登録した上記スクリプトの編集画面
image.png

②上記のショートカットURLを開く(実行)すると、こんな感じで表示される。

image.png

注意点

課題のテーブルは列の位置を変更できるので、
集計したい場所にスクリプトを修正してあげる必要がある。

以下は、13列目と14列目に「予定時間」と「実績時間」があり、
image.png

スクリプトも

    var e = parseFloat($(tds[13]).text());
    var a = parseFloat($(tds[14]).text());

のようにtds[99]の位置を修正している。

整形したスクリプト

1行だと何を書いているが分からないので、整形したスクリプトも載せる。

javascript:(function() {
  var eSum = 0, aSum = 0;

  $('tr').each(function() {
    var tds = $(this).find('td');

    var e = parseFloat($(tds[13]).text());
    var a = parseFloat($(tds[14]).text());

    if (!isNaN(e)) eSum += e;
    if (!isNaN(a)) aSum += a;
  });

  alert('予定時間: ' + eSum + ' 実績時間: ' + aSum);
})();

参考にされたし。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?