Bug 218982
Summary: | [feature] add the 'flags' to the output of xml-rpc interface | ||
---|---|---|---|
Product: | [Community] Bugzilla | Reporter: | Don Zickus <dzickus> |
Component: | Bugzilla General | Assignee: | Bernd Groh <bgroh> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | David Lawrence <dkl> |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | devel | CC: | ebaak |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 2.18 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2006-12-09 00:08:40 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Don Zickus
2006-12-08 21:20:05 UTC
The flags are actually included in the bugzilla.getBug(bugid, username, password) call. Although it is kind of cryptic in its output. Look for a toplevel key named 'flag_types'. It is a list of possible data structs that are flags that can be set for that particular bug. If any flags have actually been set to either '+', '-', or '?', then there is a key called 'flags' under that that is a list of data structs containing the flag data. Just iterate through the list and look for a key called 'type' which is a pointer to a struct data that has the key 'name'. Just skip the ones you are not interested in. There is also a key called 'status' to see which symbol the flag is set to. example: 'flag_types' => [ { 'flags' => [ { 'target' => { 'type' => 'bug', 'exists' => '1', 'bug' => { 'bug_status' => 'MODIFIED', 'version' => '5.0.0', 'component_id' => '18961', 'restricted' => '2', 'component' => 'libgtk-java', 'summary' => 'multilib conflicts (libgtk-java)', 'product_id' => '42', 'product' => 'Red Hat Enterprise Linux Beta', 'id' => '210566', 'exists' => '1' } }, 'requestee' => '', 'status' => '+', 'id' => '37136', 'type' => { 'sortkey' => '13', 'request_gid' => '92', 'name' => 'qa_ack', 'description' => 'Quality Assurance Acknowledgement', 'cc_list' => 'eng-process-list', 'is_requestable' => '1', 'is_multiplicable' => '0', 'is_requesteeble' => '0', 'view_gid' => '92', 'is_active' => '1', 'flag_count' => '', 'target_type' => 'bug', 'id' => '9', 'exists' => '1', 'grant_gid' => '11' }, 'setter' => { 'safe_email' => 'jturner', 'name' => 'Jay Turner', 'id' => '405', 'login' => 'jturner', 'showmybugslink' => '1' } } ], 'sortkey' => '13', 'request_gid' => '92', 'name' => 'qa_ack', 'description' => 'Quality Assurance Acknowledgement', 'cc_list' => 'eng-process-list', 'is_requestable' => '1', 'is_multiplicable' => '0', 'is_requesteeble' => '0', 'is_active' => '1', 'view_gid' => '92', 'flag_count' => '', 'target_type' => 'bug', 'id' => '9', 'exists' => '1', 'grant_gid' => '11' } ], I was wondering the other day if it was possible to grab everything out of the bugzilla through an xml-rpc interface (not that I have any use currently). This looks like it should solve my problem. I'll spend some time trying to hack up some perl for this. If I fail, I'll probably bother you again. |