Fetch date time for a state

Discuss problems installing or using TrackStudio.

Fetch date time for a state

Postby skd » Wed Mar 25, 2015 12:45 pm

Is there any way to get date time for particular state of a task?
Suppose a task have 4 step
----------------------------------------
step 1(new): yyyy-mm-dd hh:mm:ss
step 2(assign): yyyy-mm-dd hh:mm:ss
step 3(resolve): yyyy-mm-dd hh:mm:ss
step 4(closed): yyyy-mm-dd hh:mm:ss
-----------------------------------
I want to fetch step 2 and step 3 time.
Thanks in advance
skd
 
Posts: 9
Joined: Fri Feb 27, 2015 9:54 am

Re: Fetch date time for a state

Postby dpochtarev » Fri Mar 27, 2015 12:50 pm

Use this code in trigger
Code: Select all
Calendar assigndate, resolvedate;
        for(SecuredMessageBean message:task.getMessages()) {
            if ("assign".equals(message.getMstatus().getName())) assigndate = message.getTime();
            if ("resolve".equals(message.getMstatus().getName())) resolvedate = message.getTime();
        }
dpochtarev
 
Posts: 256
Joined: Wed Aug 22, 2012 4:35 pm


Return to TrackStudio Support

Who is online

Users browsing this forum: No registered users and 3 guests