Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

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

0 votes



One answer

Permanent link
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/

0 votes

Comments

 Ralph,

I am not able to access this URL.

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

Your answer

Register or log in 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.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 03 '16, 6:19 a.m.

Question was seen: 2,345 times

Last updated: Mar 04 '16, 5:17 a.m.

Confirmation Cancel Confirm