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

how to show date value attribute in any custom attribute of type string using script?

 Hi,
  I want to show the date value of type time stamp in any of the custom attribute using script based value.
i also refer the  https://jazz.net/wiki/bin/view/Main/AttributeCustomization#API_for_Javascript this Link for that. but i am getting expected results in string. this is my script code for fetching the current date

dojo.provide("org.example.workitems.providers.DateFun");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
dojo.require("dojo.date");
dojo.require("dojo.date.stamp");

(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;

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

    getValue: function(attributeId, workItem, configuration) {

       
      var due_date= dojo.date.stamp.fromISOString(workItem.getValue(WorkItemAttributes.DUE_DATE));
    
           return due_date;
    }
});
})();
 Please guide is this correct way to access. 


0 votes



One answer

Permanent link
 I didn't follow your code line by line... but your reference is a good one and I already implemented successful scripts using such reference. So, I think it is the correct way to access.

0 votes

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

Question asked: Aug 05 '15, 7:42 a.m.

Question was seen: 2,419 times

Last updated: Aug 05 '15, 11:33 a.m.

Confirmation Cancel Confirm