summaryrefslogtreecommitdiffstats
path: root/template/en/default/list/list.csv.tmpl
blob: 8b18d72f0c127ecefedbfb29bbb0872907bad955 (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
[%# 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.
  #%]

[% PROCESS "global/field-descs.none.tmpl" %]

[% colsepchar = user.settings.csv_colsepchar.value %]

[% IF human %]
  [% field_descs.bug_id FILTER csv %]
  [% FOREACH column = displaycolumns %]
    [% colsepchar %][% field_descs.$column FILTER csv %]
  [% END %]
[% ELSE %]
  bug_id
  [% FOREACH column = displaycolumns %]
    [% colsepchar %][% column FILTER csv %]
  [% END %]
[% END %]

[% FOREACH bug = bugs %]
  [% bug.bug_id %]
    [% FOREACH column = displaycolumns %]
      [% colsepchar %]
      [% IF column == "opendate" OR column == "changeddate" %]
        [% rawcolumn = column.replace("date", "time") %]
        [% bug.$column = bug.$rawcolumn FILTER time("%Y-%m-%d %H:%M:%S") %]
      [% ELSIF column == 'bug_status' %]
        [% bug.$column = display_value("bug_status", bug.$column) %]
      [% ELSIF column == 'resolution' %]
        [%- bug.$column = display_value("resolution", bug.$column) %]
      [% END %]
      [% bug.$column FILTER csv %]
    [% END %]

[% END %]