From 1ea215b1d45fb05c0211c51319675bdf299fff5e Mon Sep 17 00:00:00 2001 From: Jason Tibbitts Date: Jun 15 2013 01:28:49 +0000 Subject: Display reasons why tickets are hidden. --- diff --git a/scripts/review-stats/review-stats.py b/scripts/review-stats/review-stats.py index 0aef313..c362dd0 100755 --- a/scripts/review-stats/review-stats.py +++ b/scripts/review-stats/review-stats.py @@ -397,6 +397,25 @@ def std_row(bug, rowclass): 'summary': to_unicode(bug.short_desc), } +def hidden_reason(reasons): + r = '' + if 'buildfails' in reasons: + r += 'B ' + if 'blocked' in reasons: + r += 'D ' + if 'excessive' in reasons: + r += 'E ' + if 'legal' in reasons: + r += 'L ' + if 'needinfo' in reasons: + r += 'Ni ' + if 'notready' in reasons: + r += 'Nr ' + if 'stalled' in reasons: + r += 'S ' + + return r + # Report generators def report_hidden(bugs, bugdata, loader, tmpdir, subs): data = deepcopy(subs) @@ -408,9 +427,10 @@ def report_hidden(bugs, bugdata, loader, tmpdir, subs): if select_hidden(i, bugdata[i.id]): rowclass = rowclass_with_sponsor(bugdata[i.id], data['count']) data['bugs'].append(std_row(i, rowclass)) + data['bugs'][-1]['reason'] = hidden_reason(bugdata[i.id]['hidden']) data['count'] +=1 - write_html(loader, 'plain.html', data, tmpdir, 'HIDDEN.html') + write_html(loader, 'hidden.html', data, tmpdir, 'HIDDEN.html') return data['count'] diff --git a/scripts/review-stats/review-templates/hidden.html b/scripts/review-stats/review-templates/hidden.html new file mode 100644 index 0000000..6cbae4e --- /dev/null +++ b/scripts/review-stats/review-templates/hidden.html @@ -0,0 +1,71 @@ + + + + + + + $title + + + + + + +
+ +
+

$description
+Last Update: $update (v$version)
+There are $count tickets in this category.

+

Key: B - build fails, D - open dependencies, E - too many packages submitted, L - Legal issues, Ni - NEEDINFO, Nr - ticket marked NotReady, S - ticket marked stalled

+ + + + + + + + + + + + + + + + + + + + + +
IDAliasWhyLast ChangeSummary
+ ${bug['id']} + ${bug['alias']} ${bug['reason']}${bug['lastchange']}${bug['summary']}
+
+
+ + +