From: Kohei Yoshino
Date: Fri, 2 Aug 2019 17:13:38 +0000 (-0400)
Subject: Revert "Bug 1565403 - Log how a bug was filed (via standard, guided, custom bug form...
X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7da6884f5f25955dbd16dedb93b9879baa41bde2;p=thirdparty%2Fbugzilla.git
Revert "Bug 1565403 - Log how a bug was filed (via standard, guided, custom bug form or API)" (#1401)
---
diff --git a/Bugzilla/Bug.pm b/Bugzilla/Bug.pm
index 5a224451f..bc5416fc4 100644
--- a/Bugzilla/Bug.pm
+++ b/Bugzilla/Bug.pm
@@ -91,7 +91,6 @@ sub DB_COLUMNS {
delta_ts
estimated_time
everconfirmed
- filed_via
lastdiffed
op_sys
priority
@@ -131,7 +130,6 @@ sub VALIDATORS {
dup_id => \&_check_dup_id,
estimated_time => \&_check_time_field,
everconfirmed => \&Bugzilla::Object::check_boolean,
- filed_via => \&_check_filed_via,
groups => \&_check_groups,
keywords => \&_check_keywords,
op_sys => \&_check_select_field,
@@ -313,15 +311,6 @@ use constant REQUIRED_FIELD_MAP =>
use constant EXTRA_REQUIRED_FIELDS =>
qw(creation_ts target_milestone cc qa_contact groups);
-sub BUG_FILE_METHODS {
- my @methods = qw(standard_form custom_form api);
-
- # Allow extensions to add other methods, e.g. `guided_form`
- Bugzilla::Hook::process('bug_file_methods', {methods => \@methods});
-
- return @methods;
-}
-
with 'Bugzilla::Elastic::Role::Object';
sub ES_TYPE {'bug'}
@@ -884,7 +873,6 @@ sub possible_duplicates {
# C - A string.
# C - The initial status of the bug, a string.
# C - The URL field.
-# C - How this bug is being filed.
#
# C - The full login name of the user who the bug is
# initially assigned to.
@@ -1960,13 +1948,6 @@ sub _check_component {
return $object;
}
-sub _check_filed_via {
- my ($invocant, $method) = @_;
-
- return $method if defined $method && grep(/^$method$/, BUG_FILE_METHODS());
- return 'unknown';
-}
-
sub _check_creation_ts {
return Bugzilla->dbh->selectrow_array('SELECT LOCALTIMESTAMP(0)');
}
@@ -2652,7 +2633,7 @@ sub fields {
# Standard Fields
# Keep this ordering in sync with bugzilla.dtd.
- qw(bug_id alias filed_via creation_ts short_desc delta_ts
+ qw(bug_id alias creation_ts short_desc delta_ts
reporter_accessible cclist_accessible
classification_id classification
product component version rep_platform op_sys
@@ -3694,7 +3675,6 @@ sub deadline { return $_[0]->{deadline} }
sub delta_ts { return $_[0]->{delta_ts} }
sub error { return $_[0]->{error} }
sub everconfirmed { return $_[0]->{everconfirmed} }
-sub filed_via { return $_[0]->{filed_via} }
sub lastdiffed { return $_[0]->{lastdiffed} }
sub op_sys { return $_[0]->{op_sys} }
sub priority { return $_[0]->{priority} }
diff --git a/Bugzilla/DB/Schema.pm b/Bugzilla/DB/Schema.pm
index 2ea176c50..dce61c08b 100644
--- a/Bugzilla/DB/Schema.pm
+++ b/Bugzilla/DB/Schema.pm
@@ -247,7 +247,6 @@ use constant ABSTRACT_SCHEMA => {
bug_severity => {TYPE => 'varchar(64)', NOTNULL => 1},
bug_status => {TYPE => 'varchar(64)', NOTNULL => 1},
bug_type => {TYPE => 'varchar(20)', NOTNULL => 1},
- filed_via => {TYPE => 'varchar(40)', NOTNULL => 1, DEFAULT => "'unknown'"},
creation_ts => {TYPE => 'DATETIME'},
delta_ts => {TYPE => 'DATETIME', NOTNULL => 1},
short_desc => {TYPE => 'varchar(255)', NOTNULL => 1},
diff --git a/Bugzilla/Field.pm b/Bugzilla/Field.pm
index e19f85435..503befdb9 100644
--- a/Bugzilla/Field.pm
+++ b/Bugzilla/Field.pm
@@ -423,7 +423,6 @@ use constant DEFAULT_FIELDS => (
},
{name => 'target_milestone', desc => 'Target Milestone', buglist => 1},
- {name => 'filed_via', desc => 'Filed via', buglist => 1,},
{
name => 'creation_ts',
desc => 'Opened',
diff --git a/Bugzilla/Hook.pm b/Bugzilla/Hook.pm
index ad6c8ebab..22b15c876 100644
--- a/Bugzilla/Hook.pm
+++ b/Bugzilla/Hook.pm
@@ -400,20 +400,6 @@ User is not a sufficiently empowered user, so B.
=back
-=head2 bug_file_methods
-
-This happens in L, and allows you to add one or
-more valid file methods stored with bugs.
-
-Params:
-
-=over
-
-=item C - A arrayref containing an array of method names. Push your
-method name(s) onto the array.
-
-=back
-
=head2 bug_fields
Allows the addition of database fields from the bugs table to the standard
diff --git a/Bugzilla/Install/DB.pm b/Bugzilla/Install/DB.pm
index 6ff2d4d51..6cee28e10 100644
--- a/Bugzilla/Install/DB.pm
+++ b/Bugzilla/Install/DB.pm
@@ -798,10 +798,6 @@ sub update_table_definitions {
_add_oauth2_jwt_support();
- # Bug 1565403 - kohei.yoshino@gmail.com
- $dbh->bz_add_column('bugs', 'filed_via',
- {TYPE => 'varchar(40)', NOTNULL => 1, DEFAULT => "'unknown'"});
-
################################################################
# New --TABLE-- changes should go *** A B O V E *** this point #
################################################################
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index 1ac75a585..5b1dca146 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -878,9 +878,6 @@ sub create {
$params = Bugzilla::Bug::map_fields($params);
- # Define the bug file method if missing
- $params->{filed_via} //= 'api';
-
my $flags = delete $params->{flags};
# We start a nested transaction in case flag setting fails
@@ -1529,9 +1526,6 @@ sub _bug_to_hash {
if (filter_wants $params, 'duplicates') {
$item{'duplicates'} = [map { $self->type('int', $_->id) } @{$bug->duplicates}];
}
- if (filter_wants $params, 'filed_via', ['extra']) {
- $item{'filed_via'} = $self->type('string', $bug->filed_via);
- }
if (filter_wants $params, 'groups') {
my @groups = map { $self->type('string', $_->name) } @{$bug->groups_in};
$item{'groups'} = \@groups;
@@ -2874,13 +2868,6 @@ take.
If you are not in the time-tracking group, this field will not be included
in the return value.
-=item C
-
-How the bug was filed, e.g. C.
-
-This is an B field returned only by specifying C or
-C<_extra> in C.
-
=item C
An array of hashes containing the information about flags currently set
@@ -3231,9 +3218,8 @@ and all custom fields.
in Bugzilla B<4.4>.
=item The C, C, C, C,
-C, C, C, C, C,
-C, C and C fields were added in Bugzilla
-B<6.0>.
+C, C, C, C, C,
+C and C fields were added in Bugzilla B<6.0>.
=back
@@ -3511,10 +3497,6 @@ backwards compatibility with older Bugzillas.
C The description (initial comment) of the bug.
-=item C
-
-C Searches for bugs that were created with this method.
-
=item C
C The numeric id of the bug.
@@ -3744,9 +3726,6 @@ the version the bug was found in.
=item C (string) B - The description (initial comment)
of the bug. Some Bugzilla installations require this to not be blank.
-=item C (string) B - How the bug is being filed.
-It will be C by default when filing through the API.
-
=item C (string) B - The operating system the bug was
discovered on.
diff --git a/bugzilla.dtd b/bugzilla.dtd
index a9eb46935..88ebab14d 100644
--- a/bugzilla.dtd
+++ b/bugzilla.dtd
@@ -5,7 +5,7 @@
maintainer CDATA #REQUIRED
exporter CDATA #IMPLIED
>
-
-
diff --git a/extensions/BMO/template/en/default/bug/create/create-blocklist.html.tmpl b/extensions/BMO/template/en/default/bug/create/create-blocklist.html.tmpl
index 63d95e0d9..f3c95fa15 100644
--- a/extensions/BMO/template/en/default/bug/create/create-blocklist.html.tmpl
+++ b/extensions/BMO/template/en/default/bug/create/create-blocklist.html.tmpl
@@ -131,7 +131,6 @@ window.addEventListener("DOMContentLoaded", function() {
[% cgi = Bugzilla.cgi %]