To use this notebook, install the bz package: npm install -g bz.
In [3]:
var data, query, bz = require("bz");
var bugzilla = bz.createClient();
Out[3]:
alice0775@yahoo.co.jp is a prolific contributor of high quality bugs to The Project. Let's see how many new, untriaged bugs they have reported.
The bz package expects an object with query parameters.
See the bugzilla.mozilla.org documentation for the fields supported.
In [8]:
query = { include_fields: 'id,summary,status,last_change_time',
email1: 'alice0775@yahoo.co.jp',
resolution: '---',
emailassigned_to1: '1',
emailreporter1: '1',
emailtype1: 'exact',
status: 'NEW'};
Out[8]:
Use the searchBugs method and give it a callback function.
In [9]:
bugzilla.searchBugs(query, function(error, bugs) {
if (error) {
console.error(error);
}
console.log("I found", bugs.length, "bugs");
data = bugs;
});
Out[9]:
In [10]:
data[0]
Out[10]: