[rt-users] Determine OldValue of Status in External Script

Todd Chapman todd at chaka.net
Sun Feb 10 22:00:13 EST 2008


You have to search through all the transaction of each ticket to see
if the transaction you are interested in happened. You could also just
check to see if the ticket has a Resolved time set. I don't think the
resolved time is cleared when a ticket is reopened (easy enough to
check).

You might want to write a scrip that sets a ticket custom field or
attribute when a ticket is reopened, then your script can find the
tickets it needs without search all the transactions (if you go that
route.)

-Todd

On 2/10/08, Mathew Snyder <mathew.snyder at gmail.com> wrote:
> When working with scrips within RT use of
> $self->TransactionObj->OldValue is already in the context of the action
> being performed.  However, I'm trying to write a script outside of RT
> which will write out a list of tickets which have been reopened.  Since
> it is external it doesn't seem, on the surface, that any checks are
> already in the context of what I'm looking for.
>
> If I gather up a list of tickets which are 'new' or 'open', how do I
> narrow that list down to tickets which were previously 'resolved' prior
> to the current status?  Would I still use TransactionObj->OldValue?
> TransactionObj doesn't seem correct since I'm not performing any
> transactions to act as the context.
>
> When dealing with CustomFields I can specify by using
> FirstCustomFieldValue.  How do I specify standard fields like Status?
>
> --
> Keep up with me and what I'm up to: http://theillien.blogspot.com
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Community help: http://wiki.bestpractical.com
> Commercial support: sales at bestpractical.com
>
>
> Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
> Buy a copy at http://rtbook.bestpractical.com
>



More information about the rt-users mailing list