Welcome to the Jazz Community Forum
Can we call OSLC URI from Attribute Customisation(Script based value set) and retrieve the value ?

One answer

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.