Community Tip - Learn all about PTC Community Badges. Engage with PTC and see how many you can earn! X
Hello everyone,
I need to conduct and export a traceability analysis frequently. Currently I have quiet some manual rework to do in Excel to get rid of some unwanted entries. I need the "shortest way to a test case" from a risk analysis (RA).
The linking options are as follows:
RA > Req1 > Verificaton1 (desired to be shown)
RA > SW-safety > SW-Req > SW-Verification (desired to be shown)
RA > Req1 > SW-Req > SW-Verification (NOT desired to be shown)
The issue is: SW-Req items may occur downstream of SW-Safety items (desired) and downstream of Req1 items (not desired). Does anyone has an idea how to show SW-Req items only below items of one tracker (SW-safety) and NOT below another (Req1)?
Note:
Currently I filter on level 2 via cbQL filter (replaced tracker IDs with my short keys for you):
(tracker.id = SW-Req AND referenceToTracker = 'SW-safety') OR (tracker.id != SW-Req)
This removes SW-Req items which only have upstreams to Req1 for me. But there are quiet some which do have links to both, SW-Safety and Req1. So these are still shown below Req1 items and need to be removed manually...
Does anyone has an approach how to get rid of the unwanted entries in the traceability browser? Or in excel (e.g. based on the Tracker key as part of the string in the cells...)?
Thanks a lot!
SW-Info: codeBeamer 20.11-SP5 (mysql)
Hello @GLG ,
I have an idea for Excel export, because there you can use Groovy script.
When you start an Excel export on a tracker, the items of the tracker is provided to the Excel as "items".
You can filter, process this list in the Groovy script.
In my example I start from test cases, and build up the traceability upwards.
<cb:groovy template="false" silent="true">
filteredTcs = new TreeMap();
requirementMap = new TreeMap();
def manager = com.intland.codebeamer.manager.TrackerItemManager.getInstance();
items.each({
testCase = manager.findById(user, it.getId());
coverage = fields.getByLabel(testCase, "Requirements Coverage");
if (coverage != null) {
for(treq in coverage) {
if (treq.getTracker().getName() == trd_name) {
treq = manager.findById(user, treq.getId());
reference = fields.getByLabel(treq, "Upstream Reference");
if (reference != null) {
for (preq in reference) {
preq = manager.findById(user, preq.getId());
if (preq.getTracker().getName() == prd_name) {
tcList = [];
if (filteredTcs.get(treq) != null) {
tcList = filteredTcs.get(treq);
}
if (!tcList.contains(testCase)) {
tcList.add(testCase);
}
filteredTcs.put(treq, tcList);
reqList = [];
if (requirementMap.get(preq) != null) {
reqList = requirementMap.get(preq);
}
if (!reqList.contains(treq)) {
reqList.add(treq);
}
requirementMap.put(preq, reqList);
}
}
}
}
}
}
});
return filteredTcs;
</cb:groovy>
I hope this helps.