Automation: Use time tracker to log time to specific person when task changes status

Hi there,
Anyone who can show how to log time to a specific person automatically when a task changes status?

Example:
Status 1 (Person A) <-> Status 2 (Person B)
When task is transferred between these, the time tracker will log the time against the correct person.