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]:
undefined

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]:
{ include_fields: 'id,summary,status,last_change_time',
  email1: 'alice0775@yahoo.co.jp',
  resolution: '---',
  emailassigned_to1: '1',
  emailreporter1: '1',
  emailtype1: 'exact',
  status: 'NEW' }

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]:
undefined
I found 387 bugs

In [10]:
data[0]


Out[10]:
{ summary: 'It flickers when I move a mouse on an disabled context menuitem of pull down Bookmarks menu with Windows Classic Theme',
  status: 'NEW',
  id: 492960,
  last_change_time: '2014-11-29T10:37:12Z' }