hello all ,
I have a project area based on scrum template.
I am working on work item customization . I created a custom workitem in that there are three custom attributes.
i.e. 1) actual start date
2) Actual end date
3) Total efforts
let me explain in details ,
1) actual start date ---------->current date/time is set when workitem state moved to "In progress" state.
2) actual end date ----------> current date/time is set when workitem state moved to "complete" state.
3) based on both these values (actual start date and end date) 'total efforts' are calculated immediately.
here is script for more details ...
dojo.provide("Actual3");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
dojo.require("dojo.date.stamp");
dojo.require("dojo.date");
(function() {
var WorkItemAttributes= com.ibm.team.workitem.api.common.WorkItemAttributes;
var fromISOString = dojo.date.stamp.fromISOString;
dojo.declare("Actual3", null, {
getValue: function(attribute, workItem, configuration) {
var metoo;
var currentDate= new Date();
var datum = currentDate.getDate();
var mjesec = currentDate.getMonth() + 1;
var godina = currentDate.getFullYear();
var hours = currentDate.getHours();
var minutes = currentDate.getMinutes();
var seconds = currentDate.getSeconds();
var startdate= dojo.date.stamp.fromISOString(workItem.getValue("asd"));
var state = workItem.getValue(WorkItemAttributes.STATE);
if (state.toString() == "com.ibm.team.workitem.taskWorkflow.state.s3")
{
var InSecond = (Date.now() - startdate.getTime()) / 3600000;
if(InSecond % 24 == 0)
{
if(InSecond / 24 == 1)
{
return "8 Hours";
}
if(InSecond / 24 == 2)
{
return "16 Hours";
}
if(InSecond / 24 == 3)
{
return "24 Hours";
}
if(InSecond / 24 == 4)
{
return "32 Hours";
}
if(InSecond / 24 == 5)
{
return "40 Hours";
}
if(InSecond / 24 == 6)
{
return "48 Hours";
}
}
}
else
{
var Me;
var You;
Me = InSecond % 24 ;
You = InSecond / 24 ;
var Jio = parseInt(You.toString());
You = Jio * 8 ;
return (You + Me).toString()+" Hours";
}
else
{
}
return "";
}
});
})();
****************
Please note this :- this script was working correctly from last 10/15 days , but now suddenly the output is not gonna display. I tried many times but all failed .
****************
can anyone tell me , is there is any issues about javascript ? because code is correct but suddenly not responding.
Comments
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER Apr 06 '17, 2:42 a.m.Consider to look into the log files and/or debug the script.
sayli Boralkar
Apr 07 '17, 1:54 p.m.I am also facing this same problem.
Is their in support issue of JavaScript or else?