Bug 1080049 - Add 'tags' support to Bug.get
Summary: Add 'tags' support to Bug.get
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 4.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: 4.4
Assignee: Matt Tyson 🤬
QA Contact: Simon Green
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-24 15:09 UTC by Cole Robinson
Modified: 2018-12-09 06:29 UTC (History)
4 users (show)

Fixed In Version: 4.4.4019
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-07 00:58:31 UTC
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Mozilla Foundation 992091 0 None None None Never

Description Cole Robinson 2014-03-24 15:09:28 UTC
Bugzilla 4.4 has an update_tags API, but there's no corresponding API to actually 'get' the tags for the bugs. I tried get with extra_fields, nothing I can find actually works.

Comment 2 Matt Tyson 🤬 2014-03-31 05:50:52 UTC
I've updated the Bug.get RPC call to optionally return tags.  Tags must be explicitly requested using the include_fields or extra_fields arguments.

Comment 3 Cole Robinson 2014-03-31 15:24:52 UTC
Will this make Bug.search work for 'tags' as well or should I file a separate issue for that?

Comment 4 Matt Tyson 🤬 2014-04-01 00:53:32 UTC
(In reply to Cole Robinson from comment #3)
> Will this make Bug.search work for 'tags' as well or should I file a
> separate issue for that?

It seems you can already, but this is not documented in the API docs.  I'll submit a bug upstream to get this fixed.

EG using perl xmlrpc:

my $call = $xml->call('Bug.search', {
    tag => ['tag_name']
})

so the argument to Bug.search is a hash with the key named 'tag', and the vaule is an array of tag name strings.

Comment 5 Cole Robinson 2014-04-01 14:32:03 UTC
Thanks Matt, that works for me

Comment 6 Matt Tyson 🤬 2014-05-06 03:32:05 UTC
(In reply to Matt Tyson from comment #4)
> 
> EG using perl xmlrpc:
> 
> my $call = $xml->call('Bug.search', {
>     tag => ['tag_name']
> })
> 
> so the argument to Bug.search is a hash with the key named 'tag', and the
> vaule is an array of tag name strings.

Just an update, the field name 'tag' has been renamed to 'tags' to be more consistent with the rest of the bugzilla webservice API.  This change has also been submitted and approved upstream in this bug: https://bugzilla.mozilla.org/show_bug.cgi?id=992091

'tag' should still work as a backwards compatibility measure, but new code should use 'tags'

So it would now be:

my $call = $xml->call('Bug.search', {
    tags => ['tag_name']
})

Comment 7 Simon Green 2014-05-07 00:58:31 UTC
This change is now live. If there are any issues, do not reopen this bug.
Instead, you should create a new bug and reference this bug.

  -- simon


Note You need to log in before you can comment on or make changes to this bug.