It's all about the answers!

Ask a question

automatically status flipping in RTC 5.0.2 from resolved to closed


Aruna Kachakayala (112) | asked Mar 03 '16, 6:19 a.m.

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



permanent link
Ralph Schoon (63.2k33646) | 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
Aruna Kachakayala commented Mar 04 '16, 5:14 a.m.

 Ralph,

I am not able to access this URL.


Ralph Schoon commented Mar 04 '16, 5:17 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Some companies/countries  filter wordpress.com. You could try from home otherwise there is not much I can do.

Your answer


Register or to post 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.