so today i client contacted me to implement a feature to add a "CC" field when a customer is creating a ticket in the web interface(customer.pl).. in that way, they could send a copy of the ticket to their leader..
at first i tried creating a dynamic field for "tickets".. but then i realised that
Code: Select all
$Self->{TicketObject}->ArticleFirstArticle()
I had this snippet
Code: Select all
my %ArticleAttachmentIndex = $Self->{TicketObject}->ArticleAttachmentIndex(
ArticleID => $Article{ArticleID},
Article => \%Article,
StripPlainBodyAsAttachment => 1,
UserID => 1,
);
my @EmailAttachments = ();
if( %ArticleAttachmentIndex ){
foreach my $AttachmentID(keys %ArticleAttachmentIndex){
my %Attachment = $Self->{TicketObject}->ArticleAttachment(
ArticleID => $Article{ArticleID},
FileID => $AttachmentID,
UserID => 1,
);
next if !%Attachment;
push @EmailAttachments,{
Filename => $Attachment{Filename},
Content => $Attachment{Content},
ContentType => $Attachment{ContentType},
};
}
}

https://github.com/OTRS/otrs/blob/rel-3 ... ge.pm#L618
the attachments are being uploaded after the "ArticleDynamicFieldUpdate" event... so thats right, nothing i could do.. and im not goint to modify OTRS Core code under any circumstance.
so yeah, thats my story..i guess ill have to implement that with the help "Generic Agent". A filter with something like:
Tickets with 5 minutes old would do the trick.
thats it, i just wanted to share my experience
