Hello,

I need to get history of a ticket (in order to send modifications elsewhere).
Doing this I got a strange behavior with PriorityUpdate.

In a few word, It appear that the priority I got is not the current one but the previous one


Example with one ticket, and 3 changes in priority


Here is the excerpt of history (using the WUI)

 PriorityUpdate Changed priority from "2 low" (2) to "1 very low" (1). -  10/10/2012 16:18:05 

 PriorityUpdate Changed priority from "1 very low" (1) to "3 normal" (3). - 10/10/2012 16:22:40                             

 PriorityUpdate Changed priority from "3 normal" (3) to "5 very high" (5). - 10/10/2012 17:42:48   


Here is the result using API 

 [root@xxxxxxx ~]# ./TestPriorityUpadete.pl 
 Case PriorityUpdate, createTime 2012-10-10T16:18:05, PriorityID =2,
 Case PriorityUpdate, createTime 2012-10-10T16:22:40, PriorityID =1,
 Case PriorityUpdate, createTime 2012-10-10T17:42:48, PriorityID =3,


and looking in the DB
 mysql> select create_time,priority_id   from ticket_history where ticket_id=1024 and history_type_id=22 ;
 +---------------------+-------------+
 | create_time         | priority_id |
 +---------------------+-------------+
 | 2012-10-10 16:18:05 |           2 |
 | 2012-10-10 16:22:40 |           1 |
 | 2012-10-10 17:42:48 |           3 |
 +---------------------+-------------+
    
So (for example) looking at priority set at 16:18:05, I didn't get 'very low' (1) as expected but the previous value  (which is 2)
etc. etc.

Do I miss something in understanding Tickets's history ?

Best regards

---------------
Bernard CHAMBON
IN2P3 / CNRS
04 72 69 42 18