Bug 461467 - Dependency is not set when creating bug over XMLRPC API
Dependency is not set when creating bug over XMLRPC API
Status: CLOSED WORKSFORME
Product: Bugzilla
Classification: Community
Component: WebService (Show other bugs)
3.2
All Linux
medium Severity medium (vote)
: ---
: ---
Assigned To: Noura El hawary
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-08 06:06 EDT by Jiri Skrabal
Modified: 2013-04-02 21:13 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-09-23 09:55:40 EDT
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 Jiri Skrabal 2008-09-08 06:06:33 EDT
Description of problem:
When creating new bug over XMLRPC API, dependency is not set properly.
I'm using following python code:
    rpc.bugzilla.getBug(bug_id, bz_user, bz_password)
    ...
    newBug["dependson"] = bug["bug_id"]
    ...
    newBz, status = rpc.bugzilla.createBug(newBug, bz_user, bz_password)



Version-Release number of selected component (if applicable):
Bugzilla 3.2

How reproducible:
Always

Steps to Reproduce:
1. use the code in example above
  
Actual results:
newly created bug does not depend on specified bug

Expected results:
dependency

Additional info:
Comment 1 Noura El hawary 2008-09-22 01:08:36 EDT
Hi Jiri,

I am not quite familiar but using my perl scripts to create bugs over xmlrpc seems to be working fine for me with the dependencies side of things, basically all you need to do is to pass the bug ids that you want as blocked or dependson as 
Comma or space separate list of bug id's not as a list/array , so for example in perl i do this:

my $VAR1 = {
          'priority' => 'low',
          'assigned_to' => 'admin@redhat.com',
          'version' => 'unspecified',
          'bug_file_loc' => 'http://',
          'cc' => 'admin@redhat.com',
          'rep_platform' => 'All',
          'comment' => 'This is a testing bug please ignore',
          'component' => 'TestComponent',
          'short_desc' => 'This is a testing bug please ignore',
          'product' => 'TestProduct',
          'bug_severity' => 'low',
          'op_sys' => 'Linux',
          'dependson' => "1,4",
          'blocked' => "2,6",
        };

$result = $rpc->call('bugzilla.createBug', $VAR1, $username, $password);


and the above works perfect for me. 

I hops using string of comma separated bug ids solves your problem in python let me know if it didn't work.

Cheers,
Noura
Comment 2 Jiri Skrabal 2008-09-22 02:50:22 EDT
Actually I forgot to comment this ticket that it started working correctly again ~2 weeks ago.

Thanks for your comment anyway.

Cheers,
Jiri

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