Condition that checks Owner

Hi all,

All I want to do is execute an action if the Owner is a certain user and I
can’t seem to get it to work. Here is what I’m trying but it is
unsuccessful:

Custom Condition:
if ($self->$ticket->OwnerObj->Owner eq ‘userid’) {
return 1;
}
return 0;

Can anyone help me out here?

RT 3.6.5

Thanks!
Jonathan
View this message in context: http://old.nabble.com/Condition-that-checks-Owner-tp27932837p27932837.html

Hi all,

All I want to do is execute an action if the Owner is a certain user and I
can’t seem to get it to work. Here is what I’m trying but it is
unsuccessful:

Custom Condition:
if ($self->Ticket->OwnerObj->Name eq ‘userid’) {
return 1;
}
return 0;

(I’ve also tried this: $self->TicketObj->Owner eq ‘userid’)

Can anyone help me out here?

RT 3.6.5

Thanks!
Jonathan
View this message in context: http://old.nabble.com/Condition-that-checks-Owner-tp27933231p27933231.html

Custom Condition:
if ($self->$ticket->OwnerObj->Owner eq ‘userid’) {
return 1;
}

This says:

if value for ‘Owner’ field matches the literal string
‘userid’ return 1

I doubt that’s what you want.

Jonathan;

What is userid ??
if userid is the numeric id value of the user then what you need is

if ($self->TicketObj->Owner == userid) {

if userid is the user name string then what you need is

if ($self->TicketObj->OwnerObj->Name eq ‘userid’) {

Roy

Jonathan Rummel wrote: