Two transactions for each comment / correspondence

Hi all,

I’m using a rather old RT, I guess (6.2.1). Hopefully that won’t matter.

I’m trying to write a custom Scrip Action that logs some data to an external
application every time a user comments or corresponds on a ticket.

One thing that I’ve discovered is that when you click on “Comment” through the
web interface, it creates a comment transaction and invokes all of the “on
comment” scrips. But then when you click on submit button with your comment it
creates a second comment transaction and invokes the scrips again. I’m having
trouble finding a way to progmatically tell these two events apart.

For correspondences, it is slightly easier because you can just look for
$self->TransactionObj->Attachments, but comments don’t seem to have these.

Any advice on telling the difference between the start making a comment
transaction and the complete and submit the comment transaction?

Thanks,
-Dan

Daniel J. Wright wright@pair.com
Lead Software Developer, pairNIC https://www.pairnic.com
pair Networks, Inc. http://www.pair.com