Blogs about Jazz

Blogs > Jazz Team Blog >

Jazz tiny tip #3: Adding Work Item Query to Team Central

Displaying query results in Team Central can be a great way to monitor work item changes as they occur. Since the query is automatically run on a defined interval, the view quickly reflects changes that are important to you. I find that it is less “in your face” than having a popup alert, and easier to notice than a feed. This blog tells the story of a recent query I added to my Team Central view.

In recent weeks, the Jazz team has required that all code changes must be reviewed and approved before they are delivered. We did this to ensure a stable code base as we approach the release of Rational Team Concert 1.0.1. We track approvals and reviews with fields on the work item associated with each change we wanted to deliver. The system works well for making sure changes are good, but it adds a delay between when a developer completes code changes for a bug fix and when she can deliver those changes to the rest of the team. Knowing how absent-minded I can be (:>), I began to worry that I would forget to deliver a change.

I needed a way to be alerted when work items I had fixed had been reviewed and approved for delivery to my team’s stream. I realized that I could write a query that showed the work items that were ready for delivery and add it to my Team Central view. That way, I could tell at a glance whether there was anything I should deliver. I took some pictures of the process, so you can follow along in case you have some data you want to keep an eye on.

The first step was to create a query that would find work items that are ready to deliver. This was the most intimidating part, but it turned out to be easier than I had expected thanks to the graphical query editor.

First, I opened the work item query editor from the Work Items node in the Team Artifacts view:

I chose to write my query from scratch:

I used the graphical editor to add conditions to my query:

As I worked, I ran the query to see if it found the work items I expected it to:

Work item query editor with run button highlighted

I refined the query based on the results from each run. Eventually, I had all of the conditions I needed. As you can see, I even added nested AND conditions:

Work item query editor with query

I saved the query. Then, I returned to the Team Artifacts view and added the query to a new section in Team Central:

Context menu on work item query to add to Team Central

I set the refresh time in Team Central to 3 minutes:

Tahdah! Now I have a visual reminder of when I can deliver my terrific code to the rest of my team.