1[%# This Source Code Form is subject to the terms of the Mozilla Public
2  # License, v. 2.0. If a copy of the MPL was not distributed with this
3  # file, You can obtain one at http://mozilla.org/MPL/2.0/.
4  #
5  # This Source Code Form is "Incompatible With Secondary Licenses", as
6  # defined by the Mozilla Public License, v. 2.0.
7  #%]
8
9[% colsepchar = user.settings.csv_colsepchar.value %]
10
11[% num_bugs = BLOCK %]Number of [% terms.bugs %][% END %]
12[% tbl_field_disp = field_descs.$tbl_field || tbl_field %]
13[% col_field_disp = field_descs.$col_field || col_field %]
14[% row_field_disp = field_descs.$row_field || row_field %]
15
16[% IF tbl_field %]
17  [% IF tbl_field == 'assigned_to' OR tbl_field == 'reporter'
18        OR tbl_field == 'qa_contact'
19  %]
20    [% tbl_disp = tbl FILTER email %]
21  [% ELSE %]
22    [% tbl_disp = tbl %]
23  [% END %]
24  [% tbl_field_disp FILTER csv %]: [% tbl_disp FILTER csv %]
25[% END %]
26[% IF row_field && col_field %]
27  [% row_field_disp _ ' / ' _ col_field_disp FILTER csv %]
28[% ELSIF row_field %]
29  [% row_field_disp FILTER csv %]
30[% ELSE %]
31  [% col_field_disp FILTER csv %]
32[% END %]
33[% IF col_field -%]
34  [% FOREACH col = col_names -%]
35    [% colsepchar %]
36    [% PROCESS value_display value = col field = col_field %]
37  [% END -%]
38[% ELSE -%]
39  [% colsepchar %][% num_bugs FILTER csv %]
40[% END %]
41
42[% FOREACH row = row_names %]
43  [% PROCESS value_display value = row field = row_field %]
44  [% FOREACH col = col_names %]
45    [% colsepchar %]
46    [% IF data.$tbl AND data.$tbl.$col AND data.$tbl.$col.$row %]
47      [% data.$tbl.$col.$row -%]
48    [% ELSE %]
49      [% -%]0
50    [% END %]
51  [% END %]
52
53[% END %]
54
55[% BLOCK value_display %]
56  [% SET disp_value = display_value(field, value) %]
57  [% IF field == 'assigned_to' OR field == 'reporter'
58           OR field == 'qa_contact'
59  %]
60    [% disp_value = value FILTER email %]
61  [% END %]
62  [% disp_value FILTER csv %]
63[% END %]
64