views:

1187

answers:

4

Our development process is highly automated via a raft of bash and php scripts (including subversion hook scripts.) These scripts do a number of things to integrate with our Bugzilla 3.0 installation.

But the current integration approach is a bunch of SQL calls which update the bugzilla database directly - which obviously has a number of downsides - including making me nervous about upgrading to 3.2 in case the database schema has changed!

For example, to add a comment to a bug, I'm doing an INSERT into the longdescs table.

So my (slightly long-winded) question is:

  • should I be using Bugzilla WebServices (and if so, is there any good documentation other than the Bugzilla API docs which aren't getting me up to speed quickly)
  • or, should I be using some other Bugzilla API (direct perl calls?) - and, again, is there any decent doco on this?
  • or, should I just keep doing what I'm doing (direct SQL calls) because the db doesn't change that much and it "does the job"
+3  A: 

According to the Bugzilla WebServices API, some of the features needed (e.g. changing a bug status) are not yet available, so for the time being, direct SQL calls seem the most appropriate option.

The database schema has not changed significantly between version 3.0 and 3.2 so this is a practical way forward.

Peter Howe
+1  A: 

FYI, in the Bugzilla 3.2 distribution, there is a contrib/bz_webservice_demo.pl file whose intent is to "Show how to talk to Bugzilla via XMLRPC".

Larry Silverman
A: 

Be careful! Some database changes imply other changes as well. Adding a comment to a bug by adding a row to longdescs works, but you should also be updating delta_ts in table bugs.

Until web services are available, here's what I would do: perform the action using the UI that you want to do from the shell. (Assuming MySQL) Go look at the binary log for the database using 'mysqlbinlog' and you'll see what statements Bugzilla usually executes when doing whatever.

If you want the comment you added to be mailed the next time someone makes a change, leave bugs.last_diffed alone. If you don't want the comment you added to be mailed out, update bugs.last_diffed as you are doing to bugs.delta_ts.

Bugzilla has a number of subtle dependencies in the database that you must respect, or you're likely to get some unexpected results.

David M
A: 

I'm working on integrating bugzilla with Hp Qc .. i'm performing this by using perl script by directly manipulating database using sql commands.. I want to use the webservices of bugzilla. I have gone thru the bugzilla webservice Api but tat wasnt enough to get started. I'm a beginner and this is first project of my career . please guide me thru ..

Anitha