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;
}
});
})();
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.