[rt-users] BCC Staff members replies

Catalin Constantin dazoot at gmail.com
Fri Dec 31 06:10:12 EST 2010


Hello,

Thank you for your reply.
It works.

Below is the SCRIP update (fixed).

return 0 unless $self->TransactionObj->Type eq 'Correspond';

my $PrincipalObj = RT::Principal->new( $self->TransactionObj->CreatorObj );
$PrincipalObj->Load( $self->TransactionObj->CreatorObj->Id );

my $GroupObj = RT::Group->new($self->TransactionObj->CreatorObj );
$GroupObj->LoadUserDefinedGroup( 'Group Name' );

return $GroupObj->HasMemberRecursively( $PrincipalObj );

On Fri, Dec 31, 2010 at 3:01 AM, Kevin Falcone
<falcone at bestpractical.com> wrote:
> On Fri, Dec 31, 2010 at 12:04:06AM +0200, Catalin Constantin wrote:
>> I am trying to the following scrip:
>>
>> return 0 unless $self->TransactionObj->Type eq 'Correspond';
>> my $GroupObj = RT::Group->new( $RT::SystemUser );
>> $GroupObj->LoadUserDefinedGroup( 'Group NAME' );
>> return $GroupObj->HasMemberRecursively( $self->CurrentUser->PrincipalObj );
>>
>> The problem i have is that $self->CurrentUser->Id is always 1, no
>> matter what Staff members is logged in.
>> Is this normal behavior ?
>
> Yes, that is correct.
>
> You missed a key part of my note:
>
>> > if the transaction creator is privileged or in a group.
>
> You need the creator of the transaction, not the current user
>
> -kevin
>
>>
>> On Thu, Dec 30, 2010 at 5:33 AM, Kevin Falcone
>> <falcone at bestpractical.com> wrote:
>> >
>> > On Wed, Dec 29, 2010 at 06:51:15PM +0200, Catalin Constantin wrote:
>> > >    Hello,
>> > >    I would like to BCC the replies our staff members send.
>> > >    Currently we have a Bcc: line to the Correspondence template, but this also sends BCC for the
>> > >    replies the customers send to a ticket.
>> > >    Can this be done with a "Custom condition" for the "On Correspond Notify Other Recipients"
>> > >    Scrip ?
>> >
>> > Sounds like you may want to just have your template add Bccs if the
>> > transaction creator is privileged or in a group.  If you want to write
>> > a custom condition, you can do that too, same idea
>

Best wishes for 2011 !

-- 
Catalin Constantin
Dazoot Software
http://www.dazoot.eu/



More information about the rt-users mailing list