Commit 2e920979 authored by mkanat%bugzilla.org's avatar mkanat%bugzilla.org

Bug 472954: Expose additional properties via the WebService::Bug.get interface

Patch By Kip Hampton <khampton@totalcinema.com> r=mkanat, a=mkanat
parent 82c72145
...@@ -162,7 +162,20 @@ sub get { ...@@ -162,7 +162,20 @@ sub get {
$item{'internals'} = $bug; $item{'internals'} = $bug;
$item{'id'} = $self->type('int', $bug->bug_id); $item{'id'} = $self->type('int', $bug->bug_id);
$item{'summary'} = $self->type('string', $bug->short_desc); $item{'summary'} = $self->type('string', $bug->short_desc);
$item{'assigned_to'} = $self->type('string', $bug->assigned_to->login );
$item{'resolution'} = $self->type('string', $bug->resolution);
$item{'status'} = $self->type('string', $bug->bug_status);
$item{'is_open'} = $self->type('boolean', $bug->status->is_open);
$item{'severity'} = $self->type('string', $bug->bug_severity);
$item{'priority'} = $self->type('string', $bug->priority);
$item{'product'} = $self->type('string', $bug->product);
$item{'component'} = $self->type('string', $bug->component);
$item{'dupe_of'} = $self->type('int', $bug->dup_id);
# if we do not delete this key, additional user info, including their
# real name, etc, will wind up in the 'internals' hashref
delete $item{internals}->{assigned_to_obj};
if (Bugzilla->params->{'usebugaliases'}) { if (Bugzilla->params->{'usebugaliases'}) {
$item{'alias'} = $self->type('string', $bug->alias); $item{'alias'} = $self->type('string', $bug->alias);
} }
...@@ -171,7 +184,7 @@ sub get { ...@@ -171,7 +184,7 @@ sub get {
# don't want it to have a value if aliases are turned off. # don't want it to have a value if aliases are turned off.
$item{'alias'} = undef; $item{'alias'} = undef;
} }
push(@return, \%item); push(@return, \%item);
} }
...@@ -567,26 +580,31 @@ Each hash contains the following items: ...@@ -567,26 +580,31 @@ Each hash contains the following items:
=over =over
=item id
C<int> The numeric bug_id of this bug.
=item alias =item alias
C<string> The alias of this bug. If there is no alias or aliases are C<string> The alias of this bug. If there is no alias or aliases are
disabled in this Bugzilla, this will be an empty string. disabled in this Bugzilla, this will be an empty string.
=item summary =item assigned_to
C<string> The summary of this bug. C<string> The login name of the user to whom the bug is assigned.
=item component
C<string> The name of the current component of this bug.
=item creation_time =item creation_time
C<dateTime> When the bug was created. C<dateTime> When the bug was created.
=item last_change_time =item dupe_of
C<dateTime> When the bug was last changed. C<int> The bug ID of the bug that this bug is a duplicate of. If this bug
isn't a duplicate of any bug, this will be an empty int.
=item id
C<int> The numeric bug_id of this bug.
=item internals B<UNSTABLE> =item internals B<UNSTABLE>
...@@ -594,6 +612,38 @@ A hash. The internals of a L<Bugzilla::Bug> object. This is extremely ...@@ -594,6 +612,38 @@ A hash. The internals of a L<Bugzilla::Bug> object. This is extremely
unstable, and you should only rely on this if you absolutely have to. The unstable, and you should only rely on this if you absolutely have to. The
structure of the hash may even change between point releases of Bugzilla. structure of the hash may even change between point releases of Bugzilla.
=item is_open
C<boolean> Returns true (1) if this bug is open, false (0) if it is closed.
=item last_change_time
C<dateTime> When the bug was last changed.
=item priority
C<string> The priority of the bug.
=item product
C<string> The name of the product this bug is in.
=item resolution
C<string> The current resolution of the bug, or an empty string if the bug is open.
=item severity
C<string> The current severity of the bug.
=item status
C<string> The current status of the bug.
=item summary
C<string> The summary of this bug.
=back =back
=item B<Errors> =item B<Errors>
...@@ -615,6 +665,37 @@ You do not have access to the bug_id you specified. ...@@ -615,6 +665,37 @@ You do not have access to the bug_id you specified.
=back =back
=item B<History>
=over
=item The following properties were added to this method's return value
in Bugzilla B<3.4>:
=over
=item assigned_to
=item component
=item dupe_of
=item is_open
=item priority
=item product
=item resolution
=item severity
=item status
=back
=back
=back =back
=item C<get_history> =item C<get_history>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment