BugFields.pm 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. # -*- Mode: perl; indent-tabs-mode: nil -*-
  2. #
  3. # The contents of this file are subject to the Mozilla Public
  4. # License Version 1.1 (the "License"); you may not use this file
  5. # except in compliance with the License. You may obtain a copy of
  6. # the License at http://www.mozilla.org/MPL/
  7. #
  8. # Software distributed under the License is distributed on an "AS
  9. # IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
  10. # implied. See the License for the specific language governing
  11. # rights and limitations under the License.
  12. #
  13. # The Original Code is the Bugzilla Bug Tracking System.
  14. #
  15. # The Initial Developer of the Original Code is Netscape Communications
  16. # Corporation. Portions created by Netscape are
  17. # Copyright (C) 1998 Netscape Communications Corporation. All
  18. # Rights Reserved.
  19. #
  20. # Contributor(s): Terry Weissman <terry@mozilla.org>
  21. # Dawn Endico <endico@mozilla.org>
  22. # Dan Mosedale <dmose@mozilla.org>
  23. # Joe Robins <jmrobins@tgix.com>
  24. # Jacob Steenhagen <jake@bugzilla.org>
  25. # J. Paul Reed <preed@sigkill.com>
  26. # Bradley Baetz <bbaetz@student.usyd.edu.au>
  27. # Joseph Heenan <joseph@heenan.me.uk>
  28. # Erik Stambaugh <erik@dasbistro.com>
  29. # Frédéric Buclin <LpSolit@gmail.com>
  30. #
  31. package Bugzilla::Config::BugFields;
  32. use strict;
  33. use Bugzilla::Config::Common;
  34. use Bugzilla::Field;
  35. $Bugzilla::Config::BugFields::sortkey = "04";
  36. sub get_param_list {
  37. my $class = shift;
  38. my @legal_priorities = @{get_legal_field_values('priority')};
  39. my @legal_severities = @{get_legal_field_values('bug_severity')};
  40. my @legal_platforms = @{get_legal_field_values('rep_platform')};
  41. my @legal_OS = @{get_legal_field_values('op_sys')};
  42. my @param_list = (
  43. {
  44. name => 'useclassification',
  45. type => 'b',
  46. default => 0
  47. },
  48. {
  49. name => 'showallproducts',
  50. type => 'b',
  51. default => 0
  52. },
  53. {
  54. name => 'usetargetmilestone',
  55. type => 'b',
  56. default => 0
  57. },
  58. {
  59. name => 'useqacontact',
  60. type => 'b',
  61. default => 0
  62. },
  63. {
  64. name => 'usestatuswhiteboard',
  65. type => 'b',
  66. default => 0
  67. },
  68. {
  69. name => 'usevotes',
  70. type => 'b',
  71. default => 0
  72. },
  73. {
  74. name => 'usebugaliases',
  75. type => 'b',
  76. default => 0
  77. },
  78. {
  79. name => 'defaultpriority',
  80. type => 's',
  81. choices => \@legal_priorities,
  82. default => $legal_priorities[-1],
  83. checker => \&check_priority
  84. },
  85. {
  86. name => 'defaultseverity',
  87. type => 's',
  88. choices => \@legal_severities,
  89. default => $legal_severities[-1],
  90. checker => \&check_severity
  91. },
  92. {
  93. name => 'defaultplatform',
  94. type => 's',
  95. choices => ['', @legal_platforms],
  96. default => '',
  97. checker => \&check_platform
  98. },
  99. {
  100. name => 'defaultopsys',
  101. type => 's',
  102. choices => ['', @legal_OS],
  103. default => '',
  104. checker => \&check_opsys
  105. } );
  106. return @param_list;
  107. }
  108. 1;