blob: 377d7c244803e322aab7768f6732edcb9fb623a0 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
|
[%# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
#
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
#%]
[% IF who %]
[% who_title = ' (' _ who _ ')' %]
[% ELSE %]
[% who_title = '' %]
[% END %]
[% INCLUDE global/header.html.tmpl
title = "User Activity Report" _ who_title
yui = [ 'autocomplete', 'calendar' ]
javascript_urls = [ "js/util.js", "js/field.js" ]
style_urls = [ "extensions/BMO/web/styles/reports.css" ]
%]
[% PROCESS "global/field-descs.none.tmpl" %]
[% PROCESS bug/time.html.tmpl %]
<form id="activity_form" name="activity_form" action="page.cgi" method="get">
<input type="hidden" name="id" value="user_activity.html">
<input type="hidden" name="action" value="run">
<table id="parameters">
<tr>
<th>
Who:
</th>
<td>
[% INCLUDE global/userselect.html.tmpl
id => "who"
name => "who"
value => who
size => 40
emptyok => 0
title => "One or more email address (comma delimited)"
%]
</td>
<th>
Period:
</th>
<td>
<input type="text" id="from" name="from" size="11"
align="right" value="[% from FILTER html %]" maxlength="10"
onchange="updateCalendarFromField(this)">
<button type="button" class="calendar_button" id="button_calendar_from"
onclick="showCalendar('from')"><span>Calendar</span>
</button>
<div id="con_calendar_from"></div>
to
<input type="text" name="to" size="11" id="to"
align="right" value ="[% to FILTER html %]" maxlength="10"
onchange="updateCalendarFromField(this)">
<button type="button" class="calendar_button" id="button_calendar_to"
onclick="showCalendar('to')"><span>Calendar</span>
</button>
<div id="con_calendar_to"></div>
</td>
<th>
Sort:
</th>
<td>
<select name="sort">
<option value="when" [% 'selected' IF sort == 'when' %]>When</option>
<option value="bug" [% 'selected' IF sort == 'bug' %]>[% terms.Bug %]</option>
</select>
</td>
<td>
<input type="submit" id="run" value="Generate Report">
</td>
</tr>
</table>
[% IF debug_sql %]
<input type="hidden" name="debug" value="1">
[% END %]
</form>
<script type="text/javascript">
createCalendar('from');
createCalendar('to');
</script>
[% IF action == 'run' %]
[% IF debug_sql %]
<pre>[% debug_sql FILTER html %]</pre>
[% END %]
[% IF incomplete_data %]
<p>
There used to be an issue in <a href="http://www.bugzilla.org/">Bugzilla</a>
which caused activity data to be lost if there were a large number of cc's
or dependencies. That has been fixed, but some data was already lost in
your activity table that could not be regenerated. The changes that
could not reliably determine are prefixed by '?'.
</p>
[% END %]
[% IF operations.size > 0 %]
<br>
<table border="1" cellpadding="4" cellspacing="0" id="report">
<tr id="report-header">
[% IF who_count > 1 %]
<th>Who</th>
[% END %]
[% IF sort == 'when' %]
<th class="sorted">[% INCLUDE sort_when_link %]</th>
<th>[% INCLUDE sort_bug_link %]</th>
[% ELSE %]
<th class="sorted">[% INCLUDE sort_bug_link %]</th>
<th>[% INCLUDE sort_when_link %]</th>
[% END %]
<th>What</th>
<th>Removed</th>
<th>Added</th>
</tr>
[% FOREACH operation = operations %]
[% tr_class = loop.count % 2 ? 'report_row_even' : 'report_row_odd' %]
[% FOREACH change = operation.changes %]
<tr class="[% tr_class FILTER none %]">
[% IF loop.count == 1 %]
[% IF who_count > 1 %]
<td>[% operation.who FILTER email FILTER html %]</td>
[% END %]
[% IF sort == 'when' %]
<td>[% change.when FILTER time FILTER no_break %]</td>
<td>[% operation.bug FILTER bug_link(operation.bug) FILTER none %]</td>
[% ELSE %]
<td>[% operation.bug FILTER bug_link(operation.bug) FILTER none %]</td>
<td>[% change.when FILTER time FILTER no_break %]</td>
[% END %]
[% ELSE %]
[% IF who_count > 1 %]
<td> </td>
[% END %]
<td> </td>
[% IF sort == 'when' %]
<td> </td>
[% ELSE %]
<td>[% change.when FILTER time FILTER no_break %]</td>
[% END %]
[% END %]
<td>
[% IF change.attachid %]
<a href="attachment.cgi?id=[% change.attachid FILTER uri %]"
title="[% change.attach.description FILTER html %]
[%- %] - [% change.attach.filename FILTER html %]"
>Attachment #[% change.attachid FILTER html %]</a>
[% END %]
[%IF change.comment.defined && change.fieldname == 'longdesc' %]
[% "Comment $change.comment.count"
FILTER bug_link(operation.bug, comment_num => change.comment.count)
FILTER none %]
[% ELSE %]
[%+ field_descs.${change.fieldname} FILTER html %]
[% END %]
</td>
[% PROCESS change_column change_type = change.removed %]
[% PROCESS change_column change_type = change.added %]
</tr>
[% END %]
[% END %]
</table>
<p>
<a href="buglist.cgi?bug_id=[% bug_ids.join(',') FILTER uri %]">
Show as a [% terms.Bug %] List</a>
</p>
[% ELSE %]
<p>
No changes.
</p>
[% END %]
[% BLOCK change_column %]
<td>
[% IF change_type.defined %]
[% IF change.fieldname == 'estimated_time' ||
change.fieldname == 'remaining_time' ||
change.fieldname == 'work_time' %]
[% PROCESS formattimeunit time_unit=change_type %]
[% ELSIF change.fieldname == 'blocked' ||
change.fieldname == 'dependson' %]
[% change_type FILTER bug_list_link FILTER none %]
[% ELSIF change.fieldname == 'assigned_to' ||
change.fieldname == 'reporter' ||
change.fieldname == 'qa_contact' ||
change.fieldname == 'cc' ||
change.fieldname == 'flagtypes.name' %]
[% display_value(change.fieldname, change_type) FILTER email FILTER html %]
[% ELSE %]
[% display_value(change.fieldname, change_type) FILTER html %]
[% END %]
[% ELSE %]
[% END %]
</td>
[% END %]
[% END %]
[% INCLUDE global/footer.html.tmpl %]
[% BLOCK sort_when_link %]
<a href="page.cgi?id=user_activity.html&action=run&
[%~%]who=[% who FILTER uri %]&
[%~%]from=[% from FILTER uri %]&
[%~%]to=[% to FILTER uri %]&
[%~%]sort=when">When</a>
[% END %]
[% BLOCK sort_bug_link %]
<a href="page.cgi?id=user_activity.html&action=run&
[%~%]who=[% who FILTER uri %]&
[%~%]from=[% from FILTER uri %]&
[%~%]to=[% to FILTER uri %]&
[%~%]sort=bug">[% terms.Bug %]</a>
[% END %]
|