It's all about the answers!

Ask a question

how to get timeline value for workitem using calculated script.


Sreelakshmi nagireddy (11) | asked Feb 09, 6:43 a.m.
I am trying to get the timeline value for particular workitem. I can able to get the iteration value for workitem , but not able to find the timeline value for that particular iteration value. Please check the below code and let me know if any solutions are available.

/*******************************************************************************
* Licensed Materials - Property of IBM
* (c) Copyright IBM Corporation 2011. All Rights Reserved.
*
* Note to U.S. Government Users Restricted Rights: 
* Use, duplication or disclosure restricted by GSA ADP Schedule
* Contract with IBM Corp.
*******************************************************************************/
dojo.provide("com.xx.rtc.js.estimationtoollink");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
(function() {
    dojo.declare("com.xx.rtc.js.estimationtoollink", null, {

        getValue: function(attribute, workItem, configuration) {
    
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;


var state=workItem.getValue( WorkItemAttributes.STATE );
var category=workItem.getValue(WorkItemAttributes.FILED_AGAINST);
var workitemid= workItem.getValue(WorkItemAttributes.ID);
var iteration= workItem.getValue(WorkItemAttributes.PLANNED_FOR);
return "http://sgp-v-0021u.sgp.apac.bosch.com/Estimate/estimation" + "/"+workitemid+ "/"+category;
        }
    });
})();

One answer



permanent link
Ralph Schoon (63.7k33648) | answered Feb 09, 7:23 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Feb 09, 9:01 a.m.

 As far as I am aware you can only get the value of an attribute. The official JavaScript API provides getValue() and getLabel(). That value is usually related to the display value. For complex items sometimes you get an ID or UUID. But the supported API does not allow to get more details from complex items. You can not get or follow links, you can not get the timeline from the iteration or more data for the iteration etc. In summary there is no public JavaScript API to get the timeline from the iteration. At least I am not aware of any.

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.