Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

DNG - RM Extension iterate over artifacts in module

I am trying to iterate over the artifacts in a module (so I can follow links from each artifact) using an RM extension.
I open the module so it is the current artifact at the start of the script then :-


RM.Client.getCurrentArtifact(function(ref)
{
    RM.Data.getContentsStructure(ref, function(opResult)
    {
        opResult.data.forEach(function(row)
        {
            RM.Data.getLinkedArtifacts(row, [], function(linksResult) // OPERATION_BAD_REQUEST
            {
                // get data from linked artifacts       
            });
        });
    });
});

 I get a OPERATION_BAD_REQUEST from the call to RM.Data.getLinkedArtifacts(row, [], function(linksResult) when I do this because the 'row' parameter is apparently not an artifact.

The operation opResult.data.forEach does not seem to loop through artifacts. Is there any way to loop through the artifacts in a module and get a reference to each artifact in turn that can be used successfully with RM.Data.getLinkedArtifacts?

0 votes


Be the first one to answer this question!

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details
× 6,122

Question asked: Aug 11 '18, 12:58 p.m.

Question was seen: 1,710 times

Last updated: Aug 11 '18, 12:59 p.m.

Confirmation Cancel Confirm