FilterIdReplacement
* 
Corrections related to reference filters and tracker views are strongly connected, and each correction relies on inconsistencies being fixed by previous corrections.
Before using this correction, it is important to use these corrections in the following order:
1. RemoveInvalidReferenceFilters
2. ReferenceFilterUnifier
3. SanitizeDuplicateViews
* 
For a general, step-by-step guide on using the corrector module, see Using the Data Inconsistency Corrector Module.
Description
This correction handles issues with tracker views that result from tracker inheritance.
In older versions of Codebeamer, errors can sometimes cause tracker views in a template tracker to be duplicated in derived trackers, and these duplicated trackers can have different configurations, which can result in issues. Some of these issues are resolved by the SanitizeDuplicateViews correction.
If a field references a derived tracker that includes a tracker view, and that tracker view is the duplicate of a tracker view in the template tracker, an error can occur where the field attempts to reference the tracker view of the template tracker instead of the tracker view of the derived tracker.
In this case, this correction resolves the issue by replacing the reference to the tracker view in the template tracker by a reference to the tracker view in the derived tracker.
This issue may be compounded with the increasing layers of inheritance. For example, a similar issue can be caused by a field referencing a derived tracker whose template tracker is also a derived tracker, which is itself derived from an older template tracker. Tracker views can be duplicated in some, but not all, of these derived and template trackers. In cases like this, this correction resolves the issue by finding the newest tracker view in the chain of inheritance.
Example #1
As an example, suppose the following:
There is a tracker named OriginalTracker. This tracker contains a tracker view named TrackerView.
A derived tracker named DerivedTracker is created, with OriginalTracker as its template tracker.
The tracker view TrackerView is inherited by DerivedTracker. This means DerivedTracker includes a duplicate of TrackerView, which is also named TrackerView.
The tracker view TrackerView in OriginalTracker and the tracker view TrackerView in DerivedTracker are two different tracker views, but they have the same name. They are considered duplicates. They can have different configurations.
A third tracker named NewTracker is created. NewTracker is not related to OriginalTracker and DerivedTracker. It is not derived from either tracker, and it is not the template of either tracker.
NewTracker contains a field, and that field references the tracker DerivedTracker. In addition, the user applies an existing tracker view named TrackerView to the field.
To avoid errors, this TrackerView should be the one in DerivedTracker, not the TrackerView in OriginalTracker.
If the TrackerView in OriginalTracker is applied to a field referencing DerivedTracker, errors can occur due to the different configurations of the tracker views.
In this case, attempting to save or use NewTracker can result in unpredictable errors. This issue is resolved by making the field in NewTracker correctly reference the tracker view TrackerView in DerivedTracker.
This is done by replacing the reference to the TrackerView in OriginalTracker with a reference to the TrackerView in DerivedTracker.
Example #2
As an example of a more complicated issue involving several layers of inheritance, suppose the following:
There is a tracker named OriginalTracker. This tracker contains a tracker view named TrackerView.
A derived tracker is created, named DerivedTracker_1, with OriginalTracker as its template tracker. This tracker does not contain a tracker view.
A second derived tracker is created, named DerivedTracker_2, with DerivedTracker_1 as its template tracker. This tracker contains a duplicate of the tracker view TrackerView.
The tracker view TrackerView in OriginalTracker and the tracker view TrackerView in DerivedTracker_2 are two different tracker views, but they have the same name. They are considered duplicates. They can have different configurations.
A third derived tracker is created, named DerivedTracker_3, with DerivedTracker_2 as its template tracker. This tracker does not contain a tracker view.
A new tracker named NewTracker is created. NewTracker is not related to any of the above trackers. It is not derived from any of the other trackers, and it is not the template of any of the other trackers.
NewTracker contains a field, and that field references the tracker DerivedTracker_3. In addition, the user applies an existing tracker view named TrackerView to the field.
To avoid errors, this TrackerView should be the TrackerView that is closest in inheritance to DerivedTracker_3. In this case, that means the TrackerView in DerivedTracker_2.
If the TrackerView in OriginalTracker is applied instead, errors can occur due to the different configurations of the tracker views.
In this case, attempting to save or use NewTracker can result in unpredictable errors. This issue is resolved by making the field in NewTracker correctly reference the closest tracker view, which in this example is the TrackerView in DerivedTracker_2.
This is done by replacing the reference to the TrackerView in OriginalTracker with a reference to the TrackerView in DerivedTracker_2.
Report Table
The report table for the FilterIdReplacement correction is named filter_id_replacement_report_table. It contains the following information:
Column
Description
id
The ID number for the detected issue.
Detected issues are numbered, starting at 1.
old_filter_project_id
The ID of the project that contains the tracker view to be replaced.
old_filter_project_name
The name of the project that contains the tracker view to be replaced.
old_filter_tracker_id
The ID of the tracker that contains the tracker view to be replaced.
old_filter_tracker_name
The name of the tracker that contains the tracker view to be replaced.
old_filter_id
The ID of the tracker view to be replaced.
old_filter_name
The name of the tracker view to be replaced.
old_filter_description
The configuration of the tracker view to be replaced, in JSON format.
better_filter_project_id
The ID of the project that contains the tracker view to replace the other tracker view.
better_filter_project_name
The name of the project that contains the tracker view to replace the other tracker view.
better_filter_tracker_id
The ID of the tracker that contains the tracker view to replace the other tracker view.
better_filter_tracker_name
The name of the tracker that contains the tracker view to replace the other tracker view.
better_filter_id
The ID of the tracker view to replace the other tracker view.
better_filter_name
The name of the tracker view to replace the other tracker view.
better_filter_description
The configuration of the tracker view to replace the other tracker view, in JSON format.
domain_id
The global ID of the tracker that includes the detected tracker views.
flag
The flagged status of the issue, which can be 0 or 1. Clicking Restore corrects issues with a flagged status of 1.
For more information, see the Flagging and Processing Inconsistencies page on the Codebeamer Help Center.
processed
The processed status of the issue, which can be 0 or 1.
For more information, see the Flagging and Processing Inconsistencies page on the Codebeamer Help Center.
Was this helpful?