unless $status;
}
+ RT->System->QueueCacheNeedsUpdate(1);
+
return ( $id, $self->loc("Queue created") );
}
$RT::Handle->Commit();
+ RT->System->QueueCacheNeedsUpdate(1);
+
if ( $val == 1 ) {
return (1, $self->loc("Queue disabled"));
} else {
$cfs->SetContextObject( $self );
$cfs->LimitToGlobalOrObjectId( $self->Id );
$cfs->LimitToLookupType( 'RT::Queue-RT::Ticket' );
+ $cfs->ApplySortOrder;
}
return ($cfs);
}
if ( $self->CurrentUserHasRight('SeeQueue') ) {
$cfs->LimitToGlobalOrObjectId( $self->Id );
$cfs->LimitToLookupType( 'RT::Queue-RT::Ticket-RT::Transaction' );
+ $cfs->ApplySortOrder;
}
return ($cfs);
}
my $principal = RT::Principal->new( $self->CurrentUser );
if ( $args{'PrincipalId'} ) {
$principal->Load( $args{'PrincipalId'} );
+ if ( $principal->id and $principal->IsUser and my $email = $principal->Object->EmailAddress ) {
+ return (0, $self->loc("[_1] is an address RT receives mail at. Adding it as a '[_2]' would create a mail loop", $email, $self->loc($args{'Type'})))
+ if RT::EmailParser->IsRTAddress( $email );
+ }
}
elsif ( $args{'Email'} ) {
+ if ( RT::EmailParser->IsRTAddress( $args{'Email'} ) ) {
+ return (0, $self->loc("[_1] is an address RT receives mail at. Adding it as a '[_2]' would create a mail loop", $args{'Email'}, $self->loc($args{'Type'})));
+ }
my $user = RT::User->new($self->CurrentUser);
$user->LoadByEmail( $args{'Email'} );
$user->Load( $args{'Email'} )