Jazz Register Log in
Jazz Forum Welcome to the Jazz Community Forum

Welcome to the Jazz Community Forum

Connect and collaborate with IBM Engineering experts and users

Can we call OSLC URI from Attribute Customisation(Script based value set) and retrieve the value ?

Hello All,

Currently I have an Oslc URL, Is there any way I can use the attribute customization techniques like script based value set to retrieve the values ?

Please assist me on this. I see we can use the URLs in the scripts.

1 vote



One answer

Permanent link
See Work Item customization: HTTPConector and OAuth in RTC 4.0 for OSLC

2 votes

Comments

Hello Ralph,

Here is the script that i tried to customize according to my requirement, but no value is returned to the combo box.

Could you please suggest me if anything has gone wrong or i need to add something more..

dojo.provide("org.example.workitems.providers.TracksCountValueSet");
dojo.require("com.ibm.team.workitem.api.common.connectors.HttpConnectorParameters");

(function() {

dojo.declare("org.example.workitems.providers.TracksCountValueSet", null, {

    getFilteredValueSet: function(attributeId, workItem, context, filter) {

        var params= new com.ibm.team.workitem.api.common.connectors.HttpConnectorParameters();
        params.url= "https://localhost:9443/ccm/oslc/workitems/52/oslc_cm:tracksWorkItem";
        params.xpath= "//*[name()='oslc_cm:Collection']";
        params.useOAuth = true;
      

        var connector= context.getDataConnector("HttpConnector");
        var values= connector.get(params);

        var result= [];
        while(values.hasNext()){
            var entry= values.next();
             result.push(entry);
          
        }

        return result;
    }
});
})();

Thank you.

 I really thank you for the details. I tried it :)  however i could not customise to my requirement. I have posted it below...

could you please suggest me on that

I am sorry, but I don't have time to debug other people scripts. You can try to debug your scripts e.g. with the Chrome or Firefox development tools. First I would make sure that the values provided in the script work in the HTTP filtered value set.

PS: we recently found out that this will be very slow for large amount of input data as it has to be loaded several times.

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
× 6,132

Question asked: Dec 15 '16, 12:56 a.m.

Question was seen: 2,360 times

Last updated: Sep 04 '17, 3:01 p.m.

Confirmation Cancel Confirm