I’m working on script that calculate’s the “Time Worked” in every status change from “Working” (it’s a new status created in a new lifecycle) to any status and updates the “Time Worked” automatically with de difference between the status transitions dates (I used two hidden fields for save the transitions date values)
The scrip works fine, but when change the status the “Time Worked” in the ticket appears the user “RT_System” and not the user that is doing the status change (or the owner of the ticket).
The part of code that “fails” it’s this:
$TicketObj->SetTimeWorked( $OldTimeWorked + $NewTimeWorked );
I’m trying a lot of things for make this works in the way I want, I’m search in the forum, doc, wiki, and google/duckduckgo but my knowledge about perl and dev it’s not enough for doing this works.
Therefore, I am here as the last option to ask for help or information to help me solve this problem.
By the way, the version I use of RT is 4.1.1.
Thanks in advance.