Entering Defects

We all make mistakes. Dealing with those mistakes in a constructive way so that we can learn from them is a lot of what process improvement is all about.

Entering defects in the dashboard is as easy as choosing the defect button.

When the defect button is chosen, the defect dialog pops up so that you can enter information about the defect that you have discovered.

In this dialog box, you enter all the data necessary to describe the defect. Each feature of the dialog box is detailed below.

Project/Task

A label at the top of the dialog shows the name of the project/component/task this defect is being logged against. This can be helpful to maintain context if you're working on more than one defect at a time.

Defect Type

The defect type pulldown allows you to choose the type of defect. The choices are determined by the defect type standard that is in effect for the currently selected project. You can create new defect type standards, and configure the defect type standards that should be used for various projects; see the defect editor help topic for more information.

Defect Date

This field captures the date the defect was found and/or removed. It will automatically be filled in with the current date, but you can edit it if the defect was found or removed in the past.

Phase Injected and Phase Removed

The defect injected and defect removed pulldowns allow selection of the process phases in which the defect was injected and removed, respectively. The dashboard will set both of these to what it thinks are appropriate choices given the current development phase, but that default choice can be overridden easily.

Sometimes, you might discover a defect, but might not choose to fix it right away. (For example, you might need to talk with others to determine the best course of action for the fix.) In this case, you can click the "Removed" label, then select the option indicating that the fix for the defect is still pending. After the defect has been fixed, you can use the Defect Log Editor to re-edit this defect and change the status to "Removed."

Note: changing this "pending" flag will not affect the defect removal counts that appear on the Project Plan Summary form for your project. Those removal counts will still include "pending" defects, even though the defects aren't officially removed. This behavior allows the defect calculations (such as yield, defect density, and defect removal rate) to continue working as expected.

Timing the Defect Fix

When fixing defects, it is helpful to track of the amount of time that was spent finding the root cause and fixing it. Tracking this information makes it possible to analyze the relative costs of different defect types, so you can continually improve your development process.

The defect dialog has a field where you can enter the defect fix time directly. But generally, it is easier to use the fix timer buttons. Just start the defect fix timer as soon as you become aware of a defect, and stop it when the defect has been fixed. Of course, you can also pause the timer if you begin working on some other task, and restart it when you resume working on this defect.

Of course, when you are fixing a defect, you generally need to log time against the corresponding project task as well. So the defect timer and the main timer work together to help you collect accurate data. For example:

Fix Count

Sometimes, you may find and fix several related defects. (For example, during the compile phase, the compiler might identify four missing semicolons, and you might fix all of them at once.) To simplify defect entry, you can make one entry in your defect log describing all of the defects, then enter the number of distinct defects in the "Fix Count" field.

Most of the time, however, you will leave the count at its default value of 1. You should only use the Fix Count field when all of the defects in question have the same type, injection/removal phase, and description. If you use the Fix Count field to record several unrelated defects, it will thwart your ability to analyze the defect data effectively.

As a very special case, you can enter the number "0" in this field to indicate that something isn't really a defect after all, or that it is a defect but should be ignored when calculating quality metrics. (For example, this might be appropriate if you find and fix a defect in legacy code that you did not write.) If you enter a zero in this field, the defect will still appear in defect logs and other reports, but it will not contribute to the "Defects Injected" or "Defects Removed" counts on the plan summary form. As such, it will not affect calculations for yield, defect density, defect removal rates, or other quality metrics.

Fix Defect

The "Fix Defect" entry is where you can put the ID number of another defect if this is a "fix defect". A fix defect is a defect that was injected while fixing another defect. In order to determine the ID number of the other defect, you can pull up the defect editor by choosing "Defect Log" on the menu. One of the columns of information about each defect will show the ID number. For more information about using the Defect Log see the Using the defect log editor help topic.

The "new fix defect" button to the right of the ID entry provides another way to enter a fix defect. Consider the following relatively common case. You are fixing a bug (so you already have the defect dialog open and it is timing your fix). You edit your code and save the changes. You compile and link to run a test to verify your fix. Immediately you notice that your fix broke something else. At this point, you can click the new fix defect button to get a second defect dialog (to enter this new defect). This second dialog will have the ID number of the previous defect already entered in the ID entry blank. You can now input data relating to this new fix defect. The following screenshot shows two defect dialogs open. The second dialog (the one on top) is being used to enter a fix defect.

This process works with defects that you edit from within the defect log editor as well. See the section below on fixing multiple defects for more discussion on having two defect dialogs open at once.

Entering a description

The defect description pane is where you record a description of the defect. To facilitate effective process improvement, you should describe the underlying defect itself, and not just the outward symptom of the defect. (For example, an outward symptom might be that the program hangs, while the underlying problem might have been forgetting to increment the index variable in a loop.)

As you enter the description, you can optionally include URLs to external web pages. For example, you could enter the URL to a webpage from the corporate defect tracking system, or you could include a reference to a requirement that is affected by the defect. When URLs are present in the description, an external link icon will appear above the description pane. You can click that icon to quickly navigate to one of the URLs. If a particular URL is not self-explanatory, you can document its purpose by enclosing the URL and a description in square brackets: for example, [http://some/url Description of webpage]. The description you provide will be used as the text of the hyperlink when you view the defect log in your web browser.

Fixing multiple defects at a time

If you have the need to fix more than one defect at one time, you can do so by simply pushing the defect button on the dashboard again to display another defect dialog. When this happens, the timer on the first dialog will stop (if it was running) and the new defect dialog's timer will start recording time for the new defect. This new defect will become the "current" defect. When this new defect dialog is dismissed, the most previously opened defect dialog will become the current defect. It will pop to the front and its timer will start up again (if it had been running previously).

In this way you can keep an arbitrary number of defect dialogs open at once. If this is to be done, we recommend that you enter a description of the defect into the dialog box as soon as it is opened so that when it comes back to the front as the currently active defect, it will be clear what you were working on.