Bug 461467 - Dependency is not set when creating bug over XMLRPC API
Summary: Dependency is not set when creating bug over XMLRPC API
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: Bugzilla
Classification: Community
Component: WebService
Version: 3.2
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Noura El hawary
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-09-08 10:06 UTC by Jiri Skrabal
Modified: 2013-04-03 01:13 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-09-23 13:55:40 UTC
Embargoed:


Attachments (Terms of Use)

Description Jiri Skrabal 2008-09-08 10:06:33 UTC
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 05:08:36 UTC
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',
          'version' => 'unspecified',
          'bug_file_loc' => 'http://',
          'cc' => 'admin',
          '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 06:50:22 UTC
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.