Php – How to update Bugzilla bugs from bash and php scripts

bashbugzillaintegrationPHPweb services

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"

Best Answer

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.