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
![]()
Ralph Schoon (62.3k●3●36●43)
| answered Aug 16 '17, 9:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER 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.
Comments 1) The need is with a prjct whch hve sme RTP dates. Once the RTP date reaches project status attribute must be set to WR (Under warranty) the same thing is with RTP+30 days when the project status will change to closed. Another issue is associated task i.e. as soon as all associated tasks will be completed associated parent should achieve a certain status. I hve seen if i am not wrong some of ur post rgrdng ths conceptually i agree but these r d team need at the moment. I have seen the below post but its through API : https://rsjazz.wordpress.com/2012/11/27/resolve-parent-if-all-children-are-resolved-participant/ ![]() FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
The API and some tough customization is the only way to do this.
Thanks Ralph. I appreciate the justification provided. I will check with the team will it be worth the effort to invest so much of time and high end customization. |