automatically status flipping in RTC 5.0.2 from resolved to closed
![]() How can i Flip the status of workitem from 'Resolved' to 'Closed' automatically after 48 hours.
i can see that we can write our own condition in Dojo. So itried one but i am not sure how that is going to work.
1: Shall i create a dummy types and attribute and set that as to take calculated data.
2: How can i compile my code in RTC to check if it there is any error and if so then what error.
3: please review my first piece of code written in Dojo to achieve this.
dojo.provide("com.CalHEERS.ResolvedToClosed"); 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("com.CalHEERS.ResolvedToClosed", null, {
getValue: function(attribute, workItem, configuration) {
var currentDate = new Date(); var currentDateString = dojo.date.stamp.toISOString(currentDate, {milliseconds:true, zulu:true}); var resolutionDate = dojo.date.stamp.fromISOString(workItem.getValue(com.ibm.team.workitem.attribute.resolutiondate)); var SRStatus = workItem.getValue(com.ibm.team.workitem.attribute.state);
If (((SRStatus == "Resolved") || (SRStatus == "SR.action.a7")) && (currentDateSting.getTime() - resolutionDate.getTime() >= 2)) { SRStatus = "Closed"; } else { SRStatus = "Resolved" }
} }) })();
So please on the same.
Regards,
Aruna.K
|
One answer
![]()
Ralph Schoon (62.3k●3●36●43)
| answered Mar 03 '16, 7:00 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
For all I can tell, you can't do that with attribute customization at all. You will have to create a service in RTC similar to https://rsjazz.wordpress.com/2015/10/16/due-date-notifier-an-asynchronous-task-example/
Comments Ralph,
Some companies/countries filter wordpress.com. You could try from home otherwise there is not much I can do.
|