diff options
author | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-06 04:24:00 +0200 |
---|---|---|
committer | Max Kanat-Alexander <mkanat@bugzilla.org> | 2010-07-06 04:24:00 +0200 |
commit | cd90a321720332bfeffafc8d78be278d0872aa96 (patch) | |
tree | bab8f38eb8f35e04be9e95b77c7d83e1ca4fab58 /Bugzilla/Bug.pm | |
parent | 29d098297fd0fd914c1cf1211b85cf0580a825ef (diff) | |
download | bugzilla-cd90a321720332bfeffafc8d78be278d0872aa96.tar.gz bugzilla-cd90a321720332bfeffafc8d78be278d0872aa96.tar.xz |
Bug 574892: [SECURITY] Add EXTRA_REQUIRED_FIELDS to Bugzilla::Object, which
allows specifying that certain fields have validator defaults even if they
also have a database default or are in another table.
r=LpSolit, a=LpSolit
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r-- | Bugzilla/Bug.pm | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm index a0c15bafa..08026f1a3 100644 --- a/Bugzilla/Bug.pm +++ b/Bugzilla/Bug.pm @@ -286,6 +286,21 @@ use constant REQUIRED_FIELD_MAP => { component_id => 'component', }; +# Target Milestone is here because it has a default that the validator +# creates (product.defaultmilestone) that is different from the database +# default. +# +# CC is here because it is a separate table, and has a validator-created +# default of the component initialcc. +# +# QA Contact is allowed to be NULL in the database, so it wouldn't normally +# be caught by _required_create_fields. However, it always has to be validated, +# because it has a default of the component.defaultqacontact. +# +# Groups are in a separate table, but must always be validated so that +# mandatory groups get set on bugs. +use constant EXTRA_REQUIRED_FIELDS => qw(target_milestone cc qa_contact groups); + ##################################################################### sub new { |