Display reasons why tickets are hidden.
This commit is contained in:
parent
f51f6353a2
commit
1ea215b1d4
2 changed files with 92 additions and 1 deletions
|
@ -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']
|
||||
|
||||
|
|
71
scripts/review-stats/review-templates/hidden.html
Normal file
71
scripts/review-stats/review-templates/hidden.html
Normal file
|
@ -0,0 +1,71 @@
|
|||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"
|
||||
xmlns:py="http://genshi.edgewall.org/"
|
||||
xmlns:xi="http://www.w3.org/2001/XInclude">
|
||||
<head>
|
||||
<META http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
|
||||
<base href="https://bugzilla.redhat.com/bugzilla/"/>
|
||||
<title>$title</title>
|
||||
<style type="text/css" media="screen">
|
||||
.bz_state_NEEDSPONSOR {background-color: #AAFFAA}
|
||||
.bz_row_even {background-color: #FFFFFF}
|
||||
.bz_row_odd {background-color: #EEEEEE}
|
||||
|
||||
#content
|
||||
{
|
||||
margin-left: 0ex!important;
|
||||
}
|
||||
|
||||
td, th
|
||||
{
|
||||
border: none!important;
|
||||
padding: 0.5ex 2ex!important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<link rel="stylesheet" type="text/css" media="all"
|
||||
href="http://fedoraproject.org/static/css/fedora.css" />
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div id="wrapper">
|
||||
<div id="head">
|
||||
<h1><a href="http://fedoraproject.org/index.html">Fedora</a></h1>
|
||||
</div>
|
||||
<div id="content">
|
||||
<h2>$description<br/>
|
||||
Last Update: $update (v$version)<br/>
|
||||
There are $count tickets in this category.</h2>
|
||||
<h3>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</h3>
|
||||
|
||||
<table class="buglist" cellspacing="0" cellpadding="4" width="100%">
|
||||
<thead>
|
||||
<tr align="left">
|
||||
<th>ID</th>
|
||||
<th>Alias</th>
|
||||
<th>Why</th>
|
||||
<th>Last Change</th>
|
||||
<th>Summary</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<py:for each="bug in bugs">
|
||||
<tr class="${bug['class']}">
|
||||
<td>
|
||||
<a href="show_bug.cgi?id=${bug['id']}">${bug['id']}</a>
|
||||
</td>
|
||||
<td>${bug['alias']} </td>
|
||||
<td>${bug['reason']}</td>
|
||||
<td>${bug['lastchange']}</td>
|
||||
<td>${bug['summary']}</td>
|
||||
</tr>
|
||||
</py:for>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<xi:include href="bottom.html" />
|
||||
</body>
|
||||
</html>
|
Loading…
Add table
Add a link
Reference in a new issue