#Weighted Defect Count Calculator
##Release Notes
- 1.1.7: Update: Category changed to Plan and track based on MS request.
- 1.1.6: New: Support WDC calculation per team. Need to create a query for the bugs included in the calculation, name the query "_wdc_query" and save it under the folder "Shared Queries/wdc/".
- 1.1.5: New: Support reading query from the system instead of hard coded query.
- 1.1.4: Bug fix: Show iteration path in the grid instead of iteration path and ID.
- 1.1.3:
- New: WDC value is returned as a table showing the WDC number as well as defects distribution.
- Bug fix: Issue where double click on the bug did not open the bug in a new window.
- 1.0.14: New: Priority and Iteration path/id added to the grid.
- 1.0.13: Bug fix: Query updated to return open bugs on PROD and QA environments only.
- 1.0.2: First Release.
##Features
- Calculate the Weighted Defect Count for all the bugs that are active in the project.
- Show the total Weighted Defect Count as well as a list of the the bugs that are included in the calculation.
- Support double click on the bug to open the bug in a new window.

##Prerequisites
(To learn more about how to create custom processes, check the following link: https://docs.microsoft.com/en-us/vsts/work/customize/process/customize-process)
- Create custom scrum process (default scrum process does not support likelihood attribute)
- Under Bugs, create "gfSeverity" attribute as a picklist with following pickable values:
- 1- Critical
- 2 - Major
- 3 - Minor
- 4 - Cosmetic
- Under Bugs, create "gfLikelihood" attribute as a picklist with following pickable values:
- 1- High
- 2 - Medium
- 3 - Low
- 4 - Unlikely
- Under Bugs, create "gfEnvironment" attribute as a picklist with following pickable values:
##FAQ
###What is the theory behind Weighted Defect Count?
There are two factors to determine the importance of the bug:
- Severity: How server impact will occur on the system when the bug occur.
- Likelihood: How likely could the bug occur.
Weighted Defect Count is a method to weight each bug based on its Serverity and Likelihood. The sum of the weight of all the bugs is called Weighted Defect Count (apprivated as - WDC)
###How are the bugs weighted?
Bugs are weight according to the following table:
Likelihood\Severity |
1- Critical |
2 - Major |
3 - Minor |
4 - Cosmetic |
1- High |
1 |
1 |
0.25 |
0.05 |
2 - Medium |
1 |
1 |
0.05 |
0 |
3 - Low |
0.25 |
0.05 |
0 |
0 |
4 - Unlikely |
0.05 |
0 |
0 |
0 |
From the table above, you can read that Critical bugs with Low likelihood (weight 0.25), are more important than Minor bugs with Medium Likelihood (weight 0.05).
###How is the Total Weight calculated?
The WDC is calculated by summing the weight for all the bugs.
###What can I use the Weighted Defect Count for?
The Weighted Defect Count provide a factul basis to determine whether the system is ready for release or not.
It is often a debate between development organizations and maintenace organizations whether it is time to release the system or not. By agreeing on the highest acceptable WDC figure to permit the release beforhand the relase date, these discussions can be prevented.
###What is the typical acceptable WDC figure?
Typically, WDC < 1 is acceptable. If WDC is > 1, then it is risky to accept the release.
###End