summaryrefslogtreecommitdiffstats
path: root/extensions/Ember
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-12-18 06:22:09 +0100
committerDave Lawrence <dlawrence@mozilla.com>2013-12-18 06:22:09 +0100
commitfd34e8cc669933ef50ab6a866b6adea017205a62 (patch)
tree21ad6a8999dc3632f23df46f06ff3fa6c88ff820 /extensions/Ember
parent45c4b91b8e0208b36baef469bc60fb56a5bc17a3 (diff)
downloadbugzilla-fd34e8cc669933ef50ab6a866b6adea017205a62.tar.gz
bugzilla-fd34e8cc669933ef50ab6a866b6adea017205a62.tar.xz
Bug 951442 - Stop including attachments and comments in Ember.show API response
Diffstat (limited to 'extensions/Ember')
-rw-r--r--extensions/Ember/lib/WebService.pm28
1 files changed, 1 insertions, 27 deletions
diff --git a/extensions/Ember/lib/WebService.pm b/extensions/Ember/lib/WebService.pm
index 96c6a5646..7a037e654 100644
--- a/extensions/Ember/lib/WebService.pm
+++ b/extensions/Ember/lib/WebService.pm
@@ -144,23 +144,7 @@ sub show {
WHERE bug_when > ? AND bug_id = ?',
undef, ($last_updated, $bug->id));
- # Find any comments created since the last_updated date
- $comments = $self->comments({ ids => $bug_id, new_since => $last_updated });
- $comments = $comments->{bugs}->{$bug_id}->{comments};
-
- # Find any new attachments or modified attachments since the
- # last_updated date
- my $updated_attachments =
- $dbh->selectcol_arrayref('SELECT attach_id FROM attachments
- WHERE (creation_ts > ? OR modification_time > ?)
- AND bug_id = ?',
- undef, ($last_updated, $last_updated, $bug->id));
- if ($updated_attachments) {
- $attachments = $self->_get_attachments({ attachment_ids => $updated_attachments,
- exclude_fields => ['data'] });
- }
-
- if (@$updated_fields || @$comments || @$updated_attachments) {
+ if (@$updated_fields) {
# Also add in the delta_ts value which is in the bugs_activity
# entries
push(@$updated_fields, get_field_id('delta_ts'));
@@ -170,10 +154,6 @@ sub show {
# Return all the things
else {
@fields = $self->_get_fields($bug);
- $comments = $self->comments({ ids => $bug_id });
- $comments = $comments->{bugs}->{$bug_id}->{comments};
- $attachments = $self->_get_attachments({ ids => $bug_id,
- exclude_fields => ['data'] });
}
# Place the fields current value along with the field definition
@@ -226,12 +206,6 @@ sub show {
# Complete the return data
my $data = { id => $bug->id, fields => \@fields };
- # Add the comments
- $data->{comments} = $comments;
-
- # Add the attachments
- $data->{attachments} = $attachments;
-
return $data;
}