How do I find the original ticket Id from a dependent ticket?

Greetings,
I wish to modify the queue of the original work ticket when its approval
ticket is resolved. Can someone please supply me with a code snippet or Wiki
entry (I have searched and there doesn’t appear to be any) to show how I get
the original ticket Id please?
Thanks,

Michael Osborne