summaryrefslogtreecommitdiffstats
path: root/Bugzilla/WebService/Bug.pm
diff options
context:
space:
mode:
authorSimon Green <sgreen@redhat.com>2014-09-01 18:35:21 +0200
committerByron Jones <glob@mozilla.com>2014-09-01 18:35:21 +0200
commit2a9db67806fbc2483afce36e0660f03a99b5ec5f (patch)
treecd1de6e3e3c2d39a2be6a1f6974c2e5f73242fb6 /Bugzilla/WebService/Bug.pm
parent2af00b7a13d069719a0fff3f1dd709534e1f5fe9 (diff)
downloadbugzilla-2a9db67806fbc2483afce36e0660f03a99b5ec5f.tar.gz
bugzilla-2a9db67806fbc2483afce36e0660f03a99b5ec5f.tar.xz
Bug 880097: Only retrieve database fetched values if requested
Diffstat (limited to 'Bugzilla/WebService/Bug.pm')
-rw-r--r--Bugzilla/WebService/Bug.pm12
1 files changed, 9 insertions, 3 deletions
diff --git a/Bugzilla/WebService/Bug.pm b/Bugzilla/WebService/Bug.pm
index f3e075fd2..319df7578 100644
--- a/Bugzilla/WebService/Bug.pm
+++ b/Bugzilla/WebService/Bug.pm
@@ -1261,8 +1261,6 @@ sub _bug_to_hash {
# database call to get the info.
my %item = %{ filter $params, {
alias => $self->type('string', $bug->alias),
- classification => $self->type('string', $bug->classification),
- component => $self->type('string', $bug->component),
creation_time => $self->type('dateTime', $bug->creation_ts),
id => $self->type('int', $bug->bug_id),
is_confirmed => $self->type('boolean', $bug->everconfirmed),
@@ -1270,7 +1268,6 @@ sub _bug_to_hash {
op_sys => $self->type('string', $bug->op_sys),
platform => $self->type('string', $bug->rep_platform),
priority => $self->type('string', $bug->priority),
- product => $self->type('string', $bug->product),
resolution => $self->type('string', $bug->resolution),
severity => $self->type('string', $bug->bug_severity),
status => $self->type('string', $bug->bug_status),
@@ -1292,6 +1289,12 @@ sub _bug_to_hash {
my @blocks = map { $self->type('int', $_) } @{ $bug->blocked };
$item{'blocks'} = \@blocks;
}
+ if (filter_wants $params, 'classification') {
+ $item{classification} = $self->type('string', $bug->classification);
+ }
+ if (filter_wants $params, 'component') {
+ $item{component} = $self->type('string', $bug->component);
+ }
if (filter_wants $params, 'cc') {
my @cc = map { $self->type('email', $_) } @{ $bug->cc || [] };
$item{'cc'} = \@cc;
@@ -1321,6 +1324,9 @@ sub _bug_to_hash {
@{ $bug->keyword_objects };
$item{'keywords'} = \@keywords;
}
+ if (filter_wants $params, 'product') {
+ $item{product} = $self->type('string', $bug->product);
+ }
if (filter_wants $params, 'qa_contact') {
my $qa_login = $bug->qa_contact ? $bug->qa_contact->login : '';
$item{'qa_contact'} = $self->type('email', $qa_login);