It's all about the answers!

Ask a question

How to retrieve the "Used in" information of a requirement artifact with client extension?

Donat Hutter (2153539) | asked Jan 12 '15, 12:17 p.m.

In the documentation for RM client extensions ( 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) {{
        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?

Peter Morgenthaler commented Jan 21 '15, 12:58 a.m.


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)

Donat Hutter commented 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 !?

Accepted answer

permanent link
Peter Morgenthaler (102815) | answered Apr 06 '15, 7:12 p.m.
From memory it appears that the containing module can ONLY be used when the module is opened and not when you browse artefacts. This is a pretty big limitation however it does work when the module is open.
Donat Hutter selected this answer as the correct answer

2 other answers

permanent link
Donat Hutter (2153539) | answered Jan 23 '15, 2:26 a.m.
Thanks for the clarification ... I assumed that the CONTAINING_MODULE was returning the "Where used" section, which is definitely not the case.

permanent link
Daniel Moul (4.9k1318) | answered Apr 06 '15, 3:52 p.m.
I believe this question has been answered. If not, please add another comment.

Your answer

Register or to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.