Question regarding work item script automatic refresh
Hi
I have created the below sample script to change the "reaction enumeration" as soon as the Due date reaches. The script is working fine but the problem is it will not get updated unless one or more attributes are changed and saved.
Is there any process through Java script to automate the process rather than making the changes and saving manually ??
dojo.provide("Reaction");
dojo.require("com.ibm.team.workitem.api.common.WorkItemAttributes");
dojo.require("dojo.date");
dojo.require("dojo.date.stamp");
(function() {
dojo.declare("Reaction", null, {
getValue: function(attribute, workItem, configuration) {
var currentDate = new Date();
var DueDate = dojo.date.stamp.fromISOString(workItem.getValue("Due Date"));
var DueDiff = dojo.date.difference(currentDate,DueDate,"day");
if (DueDiff>=0)
{
return "Reaction.literal.l2" ;
}
return "Reaction.literal.l4" ;
}
} );
} ) ();
One answer
There is nothing built into the tool. It is possible to create such kind of automation, however I suspect this is some of the many customization attempts that should not be done, because there are other means available to achieve the same.
So the question here is, what is the purpose and why is that important for the business?