Skip to content

Commit 44a6530

Browse files
Set Content only when a value is returned from transactions
Previously if an Incident had no content in the Create transaction, TransactionData would return undef, setting $ARGS{Content} to undef. This would cause the message box to show the string "null" rather than the default empty placeholder text.
1 parent 91ae627 commit 44a6530

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

html/RTIR/Create.html

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,14 +174,18 @@
174174
if ( RT::IR->IsInvestigationQueue($QueueObj) ) {
175175
$quote = 1;
176176
}
177-
$ARGS{Content} = $m->scomp(
177+
my $starting_content = $m->scomp(
178178
"/RTIR/Elements/TransactionData",
179179
Transactions => $Transactions,
180180
Type => 'messages',
181181
Include => { 'Create', 'Correspond' },
182182
QuoteText => $quote,
183183
);
184-
$ARGS{Content} =~ s/\>/>/g if $ARGS{Content};
184+
185+
if ( $starting_content ) {
186+
$starting_content =~ s/\>/>/g;
187+
$ARGS{Content} = $starting_content;
188+
}
185189
}
186190
}
187191

0 commit comments

Comments
 (0)