How to retrieve the "Used in" information of a requirement artifact with client extension?
In the documentation for RM client extensions (https://jazz.net/wiki/bin/view/Main/RMExtensionsAPI502) I found under "Well known attributes and properties"
CONTAINING_MODULE = The Used In property of an artifact that refers to a containing module
I expected to get the references as displayed in the "Where Used" section of the artifact.
the code looks like this
RM.Data.getAttributes(refs, [RM.Data.Attributes.IDENTIFIER, RM.Data.Attributes.CONTAINING_MODULE], function(opResult) {
if (opResult.code === RM.OperationResult.OPERATION_OK) {
opResult.data.forEach(function(item){
var id = item.values[RM.Data.Attributes.IDENTIFIER];
var used = item.values[RM.Data.Attributes.CONTAINING_MODULE];
});
});
The "id" is ok. For "used" I always get the value "undefined".
What is wrong?
Comments
Peter Morgenthaler
Jan 21 '15, 12:58 a.m.Hi,
Did you find an answer to this? I am trying to do the same thing. I get used populated but it looks like it is with an empty object. (I am using 5.0.1)
Hutter Donat
Jan 21 '15, 3:18 a.m.Not really ... the only thing I recognized: if I run the extension from within a module, it returns the the current module !?
Donald Nong
Jan 22 '15, 5:22 a.m.See my answer in the other post.
https://jazz.net/forum/questions/172208/getting-the-artifacts-related-modules-attributes/172319
1 vote