summaryrefslogtreecommitdiffstats
path: root/Bugzilla/Bug.pm
diff options
context:
space:
mode:
Diffstat (limited to 'Bugzilla/Bug.pm')
-rw-r--r--Bugzilla/Bug.pm16
1 files changed, 6 insertions, 10 deletions
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 614d83a64..58901c57e 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -115,15 +115,6 @@ sub DB_COLUMNS {
return @columns;
}
-use constant REQUIRED_CREATE_FIELDS => qw(
- component
- product
- short_desc
- version
-);
-
-# There are also other, more complex validators that are called
-# from run_create_validators.
sub VALIDATORS {
my $validators = {
@@ -290,6 +281,11 @@ use constant FIELD_MAP => {
offset => 'OFFSET',
};
+use constant REQUIRED_FIELD_MAP => {
+ product_id => 'product',
+ component_id => 'component',
+};
+
#####################################################################
sub new {
@@ -1696,8 +1692,8 @@ sub _check_reporter {
else {
# On bug creation, the reporter is the logged in user
# (meaning that he must be logged in first!).
+ Bugzilla->login(LOGIN_REQUIRED);
$reporter = Bugzilla->user->id;
- $reporter || ThrowCodeError('invalid_user');
}
return $reporter;
}