How to set transaction description

Hi folks,
I’d like to create more detailed transaction descriptions occassionaly. For example when a Scrip opens the resolved ticket because of some unfilled CF. It would be great if in a transaction record was something like Status changed from 'resolved' to 'open' - following Custom Fields are not set: XX YY. Is this achievable in a Scrip?
Thank you, Petr

Hi Petr.

This is possible, just use a comment to insert the requested description.

If you already have a scrip that checks the CF and reopen the ticket it can append a comment. You have to collect the CF while testing and insert the comment like this example:

// Collect the empty CF in $emptyCF
my $log_tag = $ticket->QueueObj->Name . "[Ticket #" . $ticket->id . "]: "; 

if ($emptyCF) {
	my $newSubject = 'CF are missing';
	my $newCommentText = 'following Custom Fields are not set: ' . $emptyCF;
	my $MIMEObj = MIME::Entity->new();
	$RT::Logger->info($log_tag . "Creating comment for missing CF");

	$MIMEObj->build(
		Type => 'text/html',
		Subject => $newSubject,
		Data => $newCommentText);

	my ($trans, $desc, $transaction) = $self->{'TicketObj'}->Comment(
			MIMEObj => $MIMEObj);

	$RT::Logger->info($log_tag . "result-trans: " . $trans);
	$RT::Logger->info($log_tag . "result-desc: " . $desc);
}

It is untested, I just wrote it here.

hope it helps, Andre.

Thank you Andre, this solution works. Finally I chose another one and that is the plugin RT::Extension::MandatoryOnTransition. A quick note for anybody using diacritic in the names of Custom Fields: it’s necessary to use use utf8; in the configuration file before the settings work.
Petr