Timestamp object does not take value from scirpt
Yavuz Yasin CELIK (5●1●5●10)
| asked Oct 16 '14, 7:28 a.m.
edited Oct 17 '14, 5:31 a.m. by Ralph Schoon (63.6k●3●36●46)
dojo.provide("com.halkbank.CurrentDateDefaultValueProvider");
dojo.require("dojo.date"); // We need the date class from Dojo to compare two dates dojo.require("dojo.date.stamp"); // We need the stamp class to work with ISO date strings (function() { dojo.declare("com.halkbank.CurrentDateDefaultValueProvider", null, { getDefaultValue: function(attribute, workItem, configuration) { var now = new Date(); var date = dojo.date.stamp.toISOString(now, {milliseconds:true, zulu:true}); console.log("Now is: " + date); return date; } }); })();
Timestamp custom atribute does not take default parameter. Scirpt is enabled. RTC version 5.0
Timestamp custom atribute Format(Turkish) : 16 Eki 2014 12:00:00 |
One answer
Ralph Schoon (63.6k●3●36●46)
| answered Oct 17 '14, 7:45 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER edited Oct 17 '14, 7:46 a.m.
This code works for me:
/******************************************************************************* * 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.example.DefaultValueProvider"); dojo.require("dojo.date"); // We need the date class from Dojo to use dates dojo.require("dojo.date.stamp"); // We need the stamp class to work with ISO date strings (function() { dojo.declare("com.example.DefaultValueProvider", null, { getDefaultValue: function(attribute, workItem, configuration) { var now=new Date(); var nowtimestamp= dojo.date.stamp.toISOString(now, {milliseconds:true, zulu:true}); console.log("Now is: " + nowtimestamp); return nowtimestamp; } }); })(); Comments So, which version of RTC, what do the logs say?
Yavuz Yasin CELIK
commented Oct 23 '14, 4:44 a.m.
My code also works for our Test Environment. We have a issue for our Development Environment. For Development environment we have a PMR now. |
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.