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

How to fetch and populate streams and baselines in custom attribute of work item based on GC Project area?

 Hello,


We are trying to fetch and populate the streams and baselines in custom attribute of a work item in CCM based on the select GC project area in another custom attribute. While exploring we came to know that this is possible via dojo scripting but we need an API to fetch the streams and baselines based on the GC project area information. Is it possible to fetch via dojo scripting? Please suggest if there is any better way to fetch the streams or baselines based on GC Project area information,

Thanks and Regards,
Rohit

0 votes

Comments

You will need to use Ajax to make REST calls to GCM. See https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding for public GCM REST APIs.

 Hello David,


We are very new to OSLC, and still exploring, Could you please provide an example if you have it handy it will be very helpful for us.

If you followed the link I gave, you will see there is a link to the GCM REST API pages, one of which is https://jazz.net/gc/doc/scenarios which describes the operations you can perform and includes examples.



One answer

Permanent link

You will need to use Ajax to make REST calls to GCM. See https://jazz.net/wiki/bin/view/Deployment/CLMProductAPILanding for public GCM REST APIs. That page has a link to https://jazz.net/gc/doc/scenarios which describes the operations you can perform and includes examples.

0 votes

Comments

Hello David, I tried the above links. I am able to understand the GC API's, but when I am trying to make an API call (using dojo) I am getting errors. I tried dojo.xhrGet and XMLHttpRequest() as well but both of them are not working. 


For dojo.xhrGet, my pseudocode: 

var xhrArgs = {
url: url,
handleAs: "json",
preventCache: true,
load: function(response) {
  / Do something with response /
},
error: function(response) {
/ Do something with response /
}]};

var deferred = dojo.xhrGet(xhrArgs);

The error which I get is:
TypeError: Cannot find function xhrGet in object [object Object].

Could you please let me know how can I get around this error. I tried to search but I am not able to find any solution.

I suggest you start by using web browser plugins such as Postman or RESTed. Get that working to achieve what you want first. As far as the Dojo error is concerned, that's a Dojo question not a Jazz question. There are plenty of online resources that provide tutorials for Ajax from Javascript or Dojo.

Your answer

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
× 10,932
× 7,492
× 1,321

Question asked: Jul 13 '23, 10:06 a.m.

Question was seen: 896 times

Last updated: Jul 17 '23, 4:28 a.m.

Confirmation Cancel Confirm