Hi @CM_9399659 , I could not find any way so far to achieve this on Codebeamer out of the box. For example, there is currently no way to get associations via computation and I see no default workflow that could catch / keep the count of the operation. Once the copy is done, no more information about the operation is stored in Codebeamer, unless you explicitly set the Association Type. To complicate things:
- There can be cases where a copy is done but "None" is chosen as Association Type:

In that case, the copied item will not have a link to the master
- The opposite is also true, one could manually set a Copy association between two items that have nothing in common and have been created separately
- The Summary can be edited later, making a report based on the title equality unreliable.
Always assuming the copy is done by explicitly setting "Copy Of ..." Association Type and when doing the Copy operation, one idea is that you could get the associations via Swagger REST API. Consider this example:
- Master item ID is 40012
- Copied item ID from 40012 is 5030565
- The associations between the two are:
- 40012 > 5030565 was copied from this item
- 5030565 > This item is a copy of 40012
You can query Associations on the master item with GET /v3/items/40012/relations. The response will be something like:
{
"itemId": {
"id": 40012,
"version": 5
},
"downstreamReferences": [],
"upstreamReferences": [],
"incomingAssociations": [
{
"id": 30386829,
"itemRevision": {
"id": 5030565,
"version": 2
},
"type": "IncomingTrackerItemAssociation"
}
],
"outgoingAssociations": [],
"page": 1,
"pageSize": 500,
"itemCount": 1,
"isLastPage": true
}
incomingAssociations says "id": 30386829, so you can query that at GET /v3/associations/30386829 with a response like:
{
"id": 30386829,
"descriptionFormat": "PlainText",
"from": {
"id": 5030565,
"name": "As support person, I can easily read out firmware version",
"type": "TrackerItemReference"
},
"to": {
"id": 40012,
"name": "As support person, I can easily read out firmware version",
"type": "TrackerItemReference"
},
"type": {
"id": 9,
"name": "copy of",
"type": "AssociationTypeReference"
},
[...]
Based on this, you could develop a programmatic way to parse and count the "copy of" in the JSON and return the copied count value.
Other than that, why are you looking for ways to know the number of times an item has been copied? By knowing more about your use case, perhaps I or other community users can look into other alternatives.