BugFields.pm 1.72 KB
Newer Older
1 2 3
# 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/.
4
#
5 6
# This Source Code Form is "Incompatible With Secondary Licenses", as
# defined by the Mozilla Public License, v. 2.0.
7 8 9

package Bugzilla::Config::BugFields;

10
use 5.10.1;
11 12 13
use strict;

use Bugzilla::Config::Common;
14
use Bugzilla::Field;
15

16
our $sortkey = 600;
17 18 19

sub get_param_list {
  my $class = shift;
20 21 22 23 24 25

  my @legal_priorities = @{get_legal_field_values('priority')};
  my @legal_severities = @{get_legal_field_values('bug_severity')};
  my @legal_platforms  = @{get_legal_field_values('rep_platform')};
  my @legal_OS         = @{get_legal_field_values('op_sys')};

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
  my @param_list = (
  {
   name => 'useclassification',
   type => 'b',
   default => 0
  },

  {
   name => 'usetargetmilestone',
   type => 'b',
   default => 0
  },

  {
   name => 'useqacontact',
   type => 'b',
   default => 0
  },

  {
   name => 'usestatuswhiteboard',
   type => 'b',
   default => 0
  },

51 52 53 54 55 56
  {
   name => 'use_see_also',
   type => 'b',
   default => 1
  },

57 58
  {
   name => 'defaultpriority',
59
   type => 's',
60 61
   choices => \@legal_priorities,
   default => $legal_priorities[-1],
62 63 64
   checker => \&check_priority
  },

65 66
  {
   name => 'defaultseverity',
67
   type => 's',
68 69
   choices => \@legal_severities,
   default => $legal_severities[-1],
70 71 72 73
   checker => \&check_severity
  },

  {
74 75
   name => 'defaultplatform',
   type => 's',
76
   choices => ['', @legal_platforms],
77 78
   default => '',
   checker => \&check_platform
79 80 81
  },

  {
82 83
   name => 'defaultopsys',
   type => 's',
84
   choices => ['', @legal_OS],
85 86
   default => '',
   checker => \&check_opsys
87 88 89 90 91
  } );
  return @param_list;
}

1;