Bug 218982 - [feature] add the 'flags' to the output of xml-rpc interface
[feature] add the 'flags' to the output of xml-rpc interface
Status: CLOSED CURRENTRELEASE
Product: Bugzilla
Classification: Community
Component: Bugzilla General (Show other bugs)
devel
All Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: Bernd Groh
David Lawrence
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-12-08 16:20 EST by Don Zickus
Modified: 2014-06-18 04:21 EDT (History)
1 user (show)

See Also:
Fixed In Version: 2.18
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2006-12-08 19:08:40 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Don Zickus 2006-12-08 16:20:05 EST
Description of problem:
I like the use the bugzilla xml-rpc interface to verify posted kernel bugzillas
in real-time.  Mainly to catch typos and make sure the bug is in the correct
state for the correct component.  

With the upcoming rhel5 RC1, I have been asked to only take patches whose
bugzillas have the appropriate "blocker flags" set.  It would be easier to do
this in real-time with the xml-rpc interface _if_ that info was provided. 
Otherwise I have to manually peruse a blocker list and compare it to the posted
bugzilla.   :(  

Unless there are other commands that can retrieve this rather quickly.
Comment 1 David Lawrence 2006-12-08 19:08:40 EST
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@redhat.com',
                                                   '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@redhat.com',
                                                     'name' => 'Jay Turner',
                                                     'id' => '405',
                                                     'login' =>
'jturner@redhat.com',
                                                     'showmybugslink' => '1'
                                                   }
                                       }
                                     ],
                            'sortkey' => '13',
                            'request_gid' => '92',
                            'name' => 'qa_ack',
                            'description' => 'Quality Assurance Acknowledgement',
                            'cc_list' => 'eng-process-list@redhat.com',
                            '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'
                          }
                        ],
Comment 2 Don Zickus 2006-12-12 12:09:22 EST
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.


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