19. Annotations¶
MQC provides the possibility to annotate the quality of the quality properties and artifacts in your project. This functionality allows you to add a description to justify the observed quality for a duration of your project. This description/comment allows other users to know why a certain quality property might be performing poorly. In this way the justification is documented in a more transparent way.
MQC objectively calculates the quality of your project. This can be configured in Quality Model, Project Structure, Target Values, and Context Categories, etc.
For special, real-world cases you could use annotations to document deviations from expected values. Additionally, you can use annotations to change the quality value or bin if they need to be treated differently than the one calculated.
See When not to use Annotations to learn about use cases that have to be treated by other MQC features rather than using annotations.
Use annotations sparingly to describe or justify the quality of certain quality properties and artifacts. Modify the quality value or bin only if necessary.
19.1. Configuration of Annotations¶
To configure annotations go to the Actions and Configuration menu on the left-hand side and select Annotations. This opens the Annotations dialog.
To add a new annotation select Add Annotation
at the top right of the
dialog.
This opens a form that has to be filled out by the user.
Note
If you had already marked certain artifacts, quality properties from the
KPIs or an element from the main visualization, the marked elements are
pre-selected respectively in the Annotations
dialog as well as in the
Add Annotation
dialog. If you would like to remove this pre-selection
simply uncheck the Limit by Marking
check box at the top of the
Annotations dialog.
In case of an element was marked in the main visualization, also the
Valid From
, Valid To
and Bin
fields will be filled automatically
with the corresponding information.
When no quality properties or artifacts were selected, the form is empty and has to be filled out completely.
The following fields are available to define an annotation.
Artifacts: (mandatory) Select one or more artifacts this annotation should be applied to. The drop-down menu restricts you to the artifacts present in your project.
Quality Properties: (mandatory) Select one or more quality properties this annotation should be applied to. The drop-down menu restricts you to the quality properties defined in the quality model.
Short Description: (mandatory) Add a caption or a title to identify the annotation easily or to provide a quick overview of the annotation.
Long Description: (optional) Here you can add a more detailed justification or description of the annotation.
Valid From: (optional) Select the start date in the calendar from which the annotation is active. If left empty MQC treats the annotation as active from the start date of the project.
Valid To: (optional) Select the end date until which the annotation is active. If left empty MQC treats the annotation as active until the end date of the project.
Condition: Define the qualifying condition based on which the underlying quality value or bin would be changed. The first drop-down menu allows you to select the type of condition. By default the condition is set to
Bin
. The field below selects the bins defined in your project for which the annotation must be active. If you selectQuality
as the condition type you will see a range selection bar. Here you can select the range of quality for which the annotation must be active.Target: Define the target quality value or bin you would like to annotate when the condition defined above is true. By default the target type is set to
Bin
and you can select only one target quality bin. If you selectQuality
in the drop-down menu you can change the target quality value with the slider or edit the field directly.Disabled: Enable or disable an annotation. Disabled annotations are not applied but remain in the project and can be enabled at any point in time.
You can use different combinations of qualifying conditions and desired target values for an annotation. For example:
If you want to change a quality bin from Bad to Acceptable, set the Condition type to Bin and select the quality bin
Bad
. Then set the Target type to Bin and select the quality binAcceptable
.If a quality bin is too broad you could use the Quality condition instead. Set the Condition type to Quality and select a range between
10
to15
. Then set the Target type to Bin and select the quality binAcceptable
.If the target bin makes the quality too high and you would like to specify it directly, then set the Target type to Quality and the quality value to
25
.Finally, you can also define the condition as bin and target as value. Set the Condition type to Bin and select the quality bin
Bad
. Then set the Target type to Quality and the quality value to25
.
Note
If the target is a bin then the underlying quality value is also changed and vice versa. The respective values are chosen from the bin configuration defined in the quality model (see Quality Bin Configuration).
Once annotations are added, they can be seen in the Annotation dialog.
If any field is invalid it is marked in red, the annotation is grayed out,
and the annotation cannot be applied to the project, for example, if the
Valid From
or Valid To
dates are outside the timeline of the project.
To view annotations, MQC supports two viewing modes:
a
Flat
view shows a flat list of all existing annotations (see Figure 19.5)a
Grouped
view shows annotations in a tree structure grouped by artifacts and quality properties per artifact (see Figure 19.6)
Use the drop-down menu to choose whether to see all annotations as flat list or grouped by artifacts and quality properties.
The grouped view mode shows all artifacts that are currently present in your
project. The left-hand side of the menu displays the name of the artifact. The
right-hand side shows the number of annotations defined for this artifact. Here
0 (0) Annotations
informs you that there are 0 active annotations and (0)
unmatched annotation, whereas an unmatched annotation is one which does not
match the project timeline, artifacts, quality properties or bins that are
currenlty defined.
Select an artifact to list the quality properties of your project. Here you can easily view and edit the annotations associated with each artifact and its respective quality properties (see Figure 19.7).
Each quality property itself is a drop-down list showing the enabled or
disabled annotations and No Annotations
if none are defined (see
Figure 19.8).
Once an annotation has been added, you can also edit, disable or delete it on the right-hand side of each annotation.
Note
When an annotation is disabled, it stays in your project. It can be enabled at any point in time.
In contrast to disabling, deleting an annotation completely removes it from the project.
The Edit Annotation dialog is the same as the Add Annotation except for
additional fields: the creation date, the modification date, and the author
of the annotation. Select Update
to save the changes.
If you have made any changes, that is, added, edited, enabled, disabled or
deleted annotations, select Update Project
to apply these changes to your
project. All the changes will then be visible. If you don’t apply these changes
and try to close the Annotations dialog, another dialog will pop out (Figure 19.11)
informing that the changes should be saved (Update Project
) or discarded (Discard
).
By pressing Back
you go back to Annotations dialog.
MQC displays applied annotations:
as an “A”-Indicator inside the quality matrix (cells with annotated quality show an “A” in addition)
as an “A”-Indicator inside the Heatmap (cells with annotated quality show an “A” in addition)
within the Tooltip for an annotated quality point (title, description and the change of quality, if defined, will be displayed)
in the KPIs (the KPI value shows the annotated quality, the comparative value shows the “Non-Annotated Quality”).
19.2. Import and Export of Annotations¶
MQC provides the possibility to import and export annotations to or from your project.
Select Save as
to create a YAML (yml) file containing all the annotations
defined in your project.
The annotations are structured hierarchically as per artifacts and quality properties. The export contains only the defined fields of each annotation.
Such an annotations file can be loaded by selecting Load
.
In this way an annotation file may be used for multiple projects as well.
The possibility to load annotations from a file allows you to import
annotations with undefined mandatory fields, definitions outside of the project
scope (Artifact, Quality Property), unmatched dates (Valid From, Valid To), or
unmatched conditions (Condition). These annotations are considered unmatched.
After loading, you can edit these unmatched annotations to make it applicable
to your current project and then using Save
to save all the changes to the
initially loaded file.
Note
Loading annotations from a file replaces all of the existing annotations in your project.
Once you have saved your annotations in a file or loaded annotations from a file, MQC keeps a file reference. By that it is possible to simply reload if the content of the file has been changed outside MQC. Removing the file reference does not delete the annotations from the project.
19.3. When not to use Annotations¶
Annotations should be used to justify very specific and local deviations, especially if such a deviation applies to a specific point in time only. Particularly, annotations should not be used to cover one of the following cases.
If you don’t expect any data measure and don’t want MQC to calculate quality for a particular artifact respectively model, this artifact should be excluded from the project using a proper Project Structure configuration (see Artifact Structure).
If you don’t want to track a certain quality for a particular artifact, you should use context categories to exclude the underlying data for that particular artifact (see Context Categories). If data is excluded for an artifact, also the quality resulting out of this data will not be calculated for that artifact.
If the measured data values, that are loaded into MQC, objectively imply a certain quality, but the resulting quality value shown in MQC does not reflect that, the corresponding quality measurement function should be adapted accordingly (see Quality Properties).
Define targets for quality values (see Target Values) rather than using annotations as justification. By using targets, you may specify that the relative quality is 100% if the configured target was reached or even exceeded, even if the calculated absolute quality does not reflect that at all, but meets the expectations for that point in time.