summaryrefslogtreecommitdiffstats
path: root/extensions/MyDashboard/lib
diff options
context:
space:
mode:
authorDylan William Hardison <dylan@hardison.net>2014-10-11 02:31:06 +0200
committerDylan William Hardison <dylan@hardison.net>2014-10-11 02:31:06 +0200
commit2f5045ad5b20492db98f7666429053d2a9276266 (patch)
tree35ded23a72d0d9a3a1ba5c9d2bb9c6dc1e935bbc /extensions/MyDashboard/lib
parentccea670dcba24ff2ac0233437aa549b22edb390c (diff)
downloadbugzilla-2f5045ad5b20492db98f7666429053d2a9276266.tar.gz
bugzilla-2f5045ad5b20492db98f7666429053d2a9276266.tar.xz
Revert "Bug 1074586 - New Feature: Bugs of Interest"
Diffstat (limited to 'extensions/MyDashboard/lib')
-rw-r--r--extensions/MyDashboard/lib/BugInterest.pm70
-rw-r--r--extensions/MyDashboard/lib/Queries.pm17
-rw-r--r--extensions/MyDashboard/lib/WebService.pm27
3 files changed, 0 insertions, 114 deletions
diff --git a/extensions/MyDashboard/lib/BugInterest.pm b/extensions/MyDashboard/lib/BugInterest.pm
deleted file mode 100644
index 4f14eb4fd..000000000
--- a/extensions/MyDashboard/lib/BugInterest.pm
+++ /dev/null
@@ -1,70 +0,0 @@
-# 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/.
-#
-# This Source Code Form is "Incompatible With Secondary Licenses", as
-# defined by the Mozilla Public License, v. 2.0.
-
-package Bugzilla::Extension::MyDashboard::BugInterest;
-
-use 5.10.1;
-use strict;
-
-use parent qw(Bugzilla::Object);
-
-#####################################################################
-# Overriden Constants that are used as methods
-#####################################################################
-
-use constant DB_TABLE => 'bug_interest';
-use constant DB_COLUMNS => qw( id bug_id user_id modification_time );
-use constant UPDATE_COLUMNS => qw( modification_time );
-use constant VALIDATORS => {};
-use constant LIST_ORDER => 'id';
-use constant NAME_FIELD => 'id';
-
-# turn off auditing and exclude these objects from memcached
-use constant { AUDIT_CREATES => 0,
- AUDIT_UPDATES => 0,
- AUDIT_REMOVES => 0,
- USE_MEMCACHED => 0 };
-
-#####################################################################
-# Provide accessors for our columns
-#####################################################################
-
-sub id { return $_[0]->{id} }
-sub bug_id { return $_[0]->{bug_id} }
-sub user_id { return $_[0]->{user_id} }
-sub modification_time { return $_[0]->{modification_time} }
-
-sub mark {
- my ($class, $user_id, $bug_id, $timestamp) = @_;
-
- my ($interest) = @{ $class->match({ user_id => $user_id,
- bug_id => $bug_id }) };
- if ($interest) {
- $interest->set(modification_time => $timestamp);
- $interest->update();
- return $interest;
- }
- else {
- return $class->create({
- user_id => $user_id,
- bug_id => $bug_id,
- modification_time => $timestamp,
- });
- }
-}
-
-sub unmark {
- my ($class, $user_id, $bug_id) = @_;
-
- my ($interest) = @{ $class->match({ user_id => $user_id,
- bug_id => $bug_id }) };
- if ($interest) {
- $interest->remove_from_db();
- }
-}
-
-1;
diff --git a/extensions/MyDashboard/lib/Queries.pm b/extensions/MyDashboard/lib/Queries.pm
index 34c63e07b..9dff5abe4 100644
--- a/extensions/MyDashboard/lib/Queries.pm
+++ b/extensions/MyDashboard/lib/Queries.pm
@@ -106,7 +106,6 @@ sub QUERY_DEFS {
name => 'lastvisitedbugs',
heading => 'Updated Since Last Visit',
description => 'Bugs updated since last visited',
- mark_read => 'Mark Visited',
params => {
o1 => 'lessthan',
v1 => '%last_changed%',
@@ -114,25 +113,9 @@ sub QUERY_DEFS {
},
},
{
- name => 'interestingbugs',
- heading => 'Interesting Bugs',
- description => 'Bugs that you may find interesting',
- mark_read => 'Remove Interest',
- params => {
- j_top => 'OR',
- f1 => 'bug_interest_ts',
- o1 => 'isnotempty',
-
- f2 => 'last_visit_ts',
- o2 => 'lessthan',
- v2 => '%last_changed%',
- }
- },
- {
name => 'nevervisitbugs',
heading => 'Involved with and Never Visited',
description => "Bugs you've never visited, but are involved with",
- mark_read => 'Mark Visited',
params => {
query_format => "advanced",
bug_status => ['__open__'],,
diff --git a/extensions/MyDashboard/lib/WebService.pm b/extensions/MyDashboard/lib/WebService.pm
index 9e9de42be..87061eabe 100644
--- a/extensions/MyDashboard/lib/WebService.pm
+++ b/extensions/MyDashboard/lib/WebService.pm
@@ -17,7 +17,6 @@ use Bugzilla::Util qw(detaint_natural trick_taint template_var datetime_from);
use Bugzilla::WebService::Util qw(validate);
use Bugzilla::Extension::MyDashboard::Queries qw(QUERY_DEFS query_bugs query_flags);
-use Bugzilla::Extension::MyDashboard::BugInterest;
use constant READ_ONLY => qw(
run_bug_query
@@ -128,32 +127,6 @@ sub run_flag_query {
return { result => { $type => $results }};
}
-sub bug_interest_unmark {
- my ($self, $params) = @_;
- my $user = Bugzilla->login(LOGIN_REQUIRED);
-
- ThrowCodeError('param_required', { function => 'MyDashboard.bug_interest_unmark', param => 'bug_ids' })
- unless $params->{bug_ids};
-
- my @bug_ids = ref($params->{bug_ids}) ? @{$params->{bug_ids}} : ( $params->{bug_ids} );
-
- Bugzilla->dbh->bz_start_transaction();
- foreach my $bug_id (@bug_ids) {
- Bugzilla::Extension::MyDashboard::BugInterest->unmark($user->id, $bug_id);
- }
- Bugzilla->dbh->bz_commit_transaction();
-}
-
-sub rest_resources {
- return [
- qr{^/bug_interest_unmark$}, {
- PUT => {
- method => 'bug_interest_unmark'
- }
- }
- ];
-}
-
1;
__END__