Page 1 of 1

Fetch date time for a state

PostPosted: Wed Mar 25, 2015 12:45 pm
by skd
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

Re: Fetch date time for a state

PostPosted: Fri Mar 27, 2015 12:50 pm
by dpochtarev
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();