[rt-users] [bug] Message without text but with attachment(s) is not recodered

Alain Sips asips at nl.clara.net
Mon Aug 20 07:44:05 EDT 2007


Hello Boris,

Thanks for the reply. This works perfect for the Tickets now. The bulk 
update doesn;t seem to work yet, however we don;t really use that for 
attaching files, so that is no problem for us.

Thanks again for the great help !

Alain



Boris Lytochkin schreef:
> The reason is in share/html/Ticket/Display.html:
> ================
>     $ARGS{'UpdateContent'} =~ s/\r\n/\n/g if defined $ARGS{'UpdateContent'};
>     if ( $ARGS{'UpdateTimeWorked'} || (
>         defined $ARGS{'UpdateContent'}
>         && $ARGS{'UpdateContent'} ne ''
>             && $ARGS{'UpdateContent'} ne "-- \n"
>                . $session{'CurrentUser'}->UserObj->Signature ) )
>     {
>             $ARGS{UpdateAttachments} = $session{'Attachments'};
>             ProcessUpdateMessage(
>             ARGSRef   => \%ARGS,
>                         Actions   => \@Actions,
>                         TicketObj => $TicketObj,
>         );
>             delete $session{'Attachments'};
>     }
> ================
> But should be
> ================
>     if ( $ARGS{'UpdateTimeWorked'} || (
>         defined $ARGS{'UpdateContent'}
>         && $ARGS{'UpdateContent'} ne '' ) ||
>         scalar(keys(%{$session{'Attachments'}})) )
>     {
>             $ARGS{'UpdateContent'} = $ARGS{'UpdateContent'}."-- \n".$session{'CurrentUser'}->UserObj->Signature;
>             $ARGS{UpdateAttachments} = $session{'Attachments'};
>             ProcessUpdateMessage(
>             ARGSRef   => \%ARGS,
>                         Actions   => \@Actions,
>                         TicketObj => $TicketObj,
>         );
>             delete $session{'Attachments'};
>     }
> ================
> Additionally, 'IncludeSignature => 0' must be set in MessageBox on Update.html page.
>
>
> The same situation is with BulkUpdate form, it must be like this:
> ================
> # Prepare for ticket updates
> if ($ARGS{'UpdateContent'}) {
>     if ( $ARGS{'UpdateContent'} ne '' || scalar(keys(%{$session{'Attachments'}})) ){
>        $ARGS{'UpdateContent'} .= "\n-- \n".$session{'CurrentUser'}->UserObj->Signature;
>        $do_comment_reply = 1;
>     }
> }
> ================
> with  'IncludeSignature => 0' set in MessageBox.
>
>
> 'IncludeSignature => 0' should be used because of different wrapping
> styles - make your signature be with looong lines without
> hand-made wrapping (using \n) - RT will record your signature as text because
> $ARGS{'UpdateContent'} ne "-- \n".$session{'CurrentUser'}->UserObj->Signature )
> will be true because of broken '\n' sequence.
>
>
>
>   




More information about the rt-users mailing list