It's all about the answers!

Ask a question

can we query to get the period the defect is in waiting state?


Surender Biyyala (403448) | asked Jan 06 '15, 12:15 p.m.
 Hi All,

We have a business requirement where we need to get the following information 

-> The period the defect is in "Waiting state".
-> The period that took to fix the defect

we need have a query to get this info.

Tried using the "Date Group" but no luck.
Is this really possible? If so can someone point me the the right procedure?

Thanks
Surender

Comments
sam detweiler commented Jan 06 '15, 1:40 p.m.

could you describe period?  this is not a term I hear in RTC,

One answer



permanent link
Donald Nong (14.5k414) | answered Jan 06 '15, 7:09 p.m.
Essentially you need to compute the difference between two timestamps. To make it easier, you may need to add a custom attribute to hold the value of this "period", and update the attribute programmatically using attribute customization scripts or precondition/follow-up actions. For example, when a work item transitions into the "waiting state", you set the value of "period" attribute to 0. Oh, you may need another attribute to hold the transition timestamp. Then when the work item transitions out of the "waiting state", you compute the difference between "now" and the recorded timestamp, and get the "period" value and set it accordingly. The same goes to other "period" that you may consider.
Note that if you want to show the "period" when the work item is still in the "waiting state", you will need to do dynamic calculation (between "now" and the last transition timestamp"). I think this can be done only with reports, not queries.

Your answer


Register or to post your answer.