Bugzilla, YUI, and other things.

Monday, March 15, 2010

YUI and the recordvalueupdateevent event!

This weekend I had a fairly basic task. I had 2 tables with checkboxes that were populated with data and 1 widget that was supposed to listen to changes in the tables.

I could have just wired my widget into the checkboxes, but that didn't seem like the correct way to do it. Instead I decided to wire the widget into the data model. But the thing that really ended up getting me is to use the recordvalueupdateevent, which is basically the only way to listen to updates in a record set requires 2 things.

1. you have to use this.getRecordSet().updateRecordValue()
2. you have to create the event! .getRecordSet().createEvent('recordValueUpdateEvent');

If you don't do these 2 things you won't be able to get this to work

Below are the two ways i could have done it. Actual code to come in the future.

My hope is someone else who gets stuck with this will be able to find it.
Thanks to http://mart.kiev.ua/yui-recordset-events who wrote about this in Russian or some other slovic language which google helpfully translated to English!

Tuesday, March 09, 2010

ideas for User stats to gether for more human bugzilla v0

Statistics to show about a user

All things in list with & in the bullet might have a "veteran" and "newbie" designation.

Newbie and Veteran status can be determined either by a count or time.
-- If it is a count then it would simply be an above a line and below a line
-- If it is a time it would be before X date for veterans and newbie would be determined by N duration before today.
-- We might want to allow users to configure these settings and let them use one or both systems.
-- V1 might just have a config file, V2 might have a table in the database or a param tab

* CC List
***& Num bugs user is on CC list

* QA Field
***& Num bugs user is QA on

* Comments
***& Num
*** Recent Activity ( num bugs in the past N duration )

* Bug Fixing
***& Assigned
*** Assigned and Fixed
*** Recent Activity ( num where status was changed to fixed in N duration )

* Bug Patches
***& Num patches created
*** Num patches created with + flag
*** Recent Activity ( patches created in N duration )

* Bug Filing
***& Num bugs filed
*** Num bugs resolved as duplicates
*** Recent Activity

* Bug Reviewer
***& Num reviews per bug
*** Recent Activity ( Num bugs set to + or - in N duration )

* Bugs Verified
*** How do we do this???

What has the user filed bugs on?
-- With all these stats how do we determine what they have worked on?
-- Do a count per project for how many ANY of the above the user has done, if the number is more than N then that person has that project show up

Once the extension is installed we first need to do old stats gathering
After that we will rely on either a cron job OR hooks or both

We need to extend the user object and add these stats

Monday, March 08, 2010

Bugzilla Extensions: Gravatar and Inline Images

There are 2 bugs which I have been paying some attention to recently.

The first one is Bug 222861 which requests that images are displayed when they are mentioned in comments. This bug was important to me because I often found myself and others referring to images and attachments in comments and then having to open them up in a new window. I really wanted developers to just see the mocks i made along with my comments about them. It was determined that this bug makes more sense as an extension. So I wrote one. I've posted it here: http://github.com/pyrzak/Bugzilla-Extension--Inline-Images. Hopefully you guys like it!

The second one is Bug 395802 which requests to be able to support gravatar images. This is something Aza Raskin specifically mentioned by saying make it easier to know "who is this guy". Step 1 is adding a human face to a comment via the gravatar, Step 2 might be about grabbing their stats.

There were 2 mocks that I made as suggestions for how this should look. The first is:

Here is the other mock:

My hope is that we're finally to the point where many of Aza's and other's ideas might be possible thanks to the new extension system and the jsonp bug 550727. Both of which wouldn't be possible if mkanat didn't work so hard to add this kind of mash-up and extensibility, so thanks!

Any feedback about either of these extensions or anything else I mentioned is very welcomed.