JSONformat
Overview
Bughugger is a tool that displays bug tasks from Launchpad. Note that a bug task is different than a bug. There is a many to one relationship between bug tasks and a bug. Bughugger can display data extracted from Launchpad, but is flexible enough that you can provide extra custom computed columns as well.
Required Objects
To properly display your report, Bughugger will expect a list that has at least two objects. It will look for a list of strings called "keys", and a list of dictionaries called "bug_tasks". So the overall structure of the JSON should looks like this:
{"keys":[],"bug_tasks:[{},{}]}
Key List
The list of keys tells bughugger which columns you want it to display, and in what order. Note that you can and should include data with each bug task that is not displayed (see below). If possible, it will probably be easiest if you stick to the default ordering, but with unsupported keys removed, and custom keys added. The default keys are: default_keys = ["id","title","status","importance","release","target","milestone","assignee","team name","tags","patch","gravity","affected users"]
Bug Tasks
In order for plugins to work, they will need to find the specific bug task in Launchpad. To support this, you should include a reference to the Launchpad object for the bug task. This unique url is accessible in the bug task object: bug_task.url
The key for this property should be "bug_task" (starts with two underscores). Typically, this should not be included in your list of keys to display. Bughugger will fetch the description if users have clicked the bug task. If you already have the description for the associated bug cached, this will help bughugger be more responsive. So include the description in the bug task dictionary under the key "
description" (starts with two underscores).
Turn priorities into numbers, with the following mapping:{ 'Critical':1, 'High':2, 'Medium':3, 'Low':4, 'Wishlist':5, 'Undecided':6 }
If you have the bug task's status, label it like this: statuses = ( '1 - Won't Fix', '2 - New', '3 - Incomplete', '4- Confirmed', '5 - Triaged', '6 - In Progress', '7 - Fix Committed', '8 - Fix Released' )
Bughugger/JSONformat (last edited 2009-12-17 22:27:33 by 97-126-104-11)