how to show date value attribute in any custom attribute of type string using script?
shweta ranaware (37●1●10●53)
| asked Aug 05 '15, 7:42 a.m.
edited Aug 05 '15, 8:17 a.m. by Ralph Schoon (63.3k●3●36●46)
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.
|
One answer
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.
|
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.