Extracting bug metrics from Launchpad

Jones, Bruce E bruce.e.jones at intel.com
Fri Apr 17 18:41:09 UTC 2020


Jeremy, thank you for the prompt reply!

      brucej

-----Original Message-----
From: Jeremy Stanley [mailto:fungi at yuggoth.org] 
Sent: Friday, April 17, 2020 11:22 AM
To: service-discuss at lists.opendev.org
Cc: Jones, Bruce E <bruce.e.jones at intel.com>
Subject: Re: Extracting bug metrics from Launchpad

[I've left Bruce in the Cc for my reply as he does not seem to be subscribed to this mailing list.]

On 2020-04-17 17:44:05 +0000 (+0000), Jones, Bruce E wrote:
> I'm being asked by management to provide bug count metrics for the 
> StarlingX project.  Our LP instance is at 
> https://bugs.launchpad.net/starlingx.
> 
> They are looking for things like "average age of closed bugs", "# bugs 
> closed per week" and so on.
> 
> There doesn't seem to be a way to gather this kind of data from 
> Launchpad.  Some of the items needed like "bug creation date"
> aren't visible in the UI and may not exist in the database.  I can't 
> search using date ranges in the advanced search.  If I could export 
> all of the bug info into a spreadsheet I could just pound it out, but 
> I can't see how to do that.
> 
> Even better would be to extend our project's bitergia page 
> https://starlingx.biterg.io/ to show some of these metrics.  But I'm 
> not sure how to do that or if it's even possible.
> 
> Thoughts and suggestions would be greatly appreciated.  Thank you in 
> advance!

OpenDev doesn't operate Launchpad (nor maintain your Bitergia dashboard), so the most we can really do is provide suggestions.
Launchpad has an extensive HTTP API which is documented here:

https://launchpad.net/+apidoc/devel.html

The entry on the "bug" collection object indicates that "date_created" is one of the attributes it provides. You can see examples of how we interface with Launchpad's API for some code review integration here:

https://opendev.org/opendev/jeepyb/src/branch/master/jeepyb/cmd/update_bug.py

As a convenience we rely on the launchpadlib package from PyPI:

https://pypi.org/project/launchpadlib/

Hopefully that helps?
--
Jeremy Stanley



More information about the service-discuss mailing list