How to know when a workitem was "tracked for" using OSLC or Reportable REST API?
Accepted answer
https://clm:9443/ccm/rpt/repository/foundation?fields=foundation/auditableLink[name="com.ibm.team.workitem.linktype.trackedworkitem"]/(name|modified|modifiedBy/(userId|name)|sourceRef/(comment|referencedItem/(itemType|itemId|contextId))|targetRef/(comment|referencedItem/(itemType|itemId|contextId)))
The filter [name="com.ibm.team.workitem.linktype.trackedworkitem"] ensures that only the link type of interest is shown. The field selections are just to simplify the output for easier processing.
If you want the other direction (Tracks Work Item), the link type is "com.ibm.team.workitem.linktype.tracksworkitem". Likewise, you can find out other link types by using the appropriate link type name.
P.S. In the field selections in the above URL, "comment" of "sourceRef" and "targetRef" is the work item's ID+title, while "itemId" is the UUID of the work item, and "contextId" is the UUID of the containing project area.
Comments
Thank you! It works!
If you mean that you add a link, and remove it later, and you want to know when it is added and removed, then the answer is no, at least for the method suggested above. As far as I know, link history is not kept, and you can only see information about existing/current links. If you use the web GUI to check the work item history, with the Include Link History checked, you will only see "added" entries for links, and no "removed" at all.
Thank you. It helps a lot. Now, I can know if a workitem has the trackedworditem link, search the auditableLink no know who and when this link was added. If the workitem wasn't the trackedworkitem link, but the search in the auditableLink returns something, I can know when and who removed the link. All this using the RTC'S Reportable REST API.
One other answer
Hello,
I will only comment on your question. OSLC Change Management domain does not specify the way tools should manage the change history on their resources. You may be able to track the history with the OSLC Configuration management specification at OASIS.Comments
I can't find the specification - find only a draft, and there isn't an example of use.
Hello Andre Carlos,
The OSLC CCM specification is managed at OASIS. the link is https://tools.oasis-open.org/version-control/browse/wsvn/oslc-ccm/trunk/specs/config-mgt/oslc-config-mgt.html .
This spec is still in draft version. However, IBM has implemented it in the Jazz platform. As it is a live spec, I came across few inconsistencies that are fixed in the following version of the Jazz platform.
Thank you.