Re: [rt-users] RT send 2 mail notification for setting the ticket owner

2015-05-13 Thread Rabin Yasharzadehe
On Tue, May 12, 2015 at 8:06 PM, Bill Cole <
rtusers-20090...@billmail.scconsult.com> wrote:

> Based on what you posted, I would expect there to be 2 different scrips,
> one for each message. Your solution will probably involve selecting one of
> them to keep and disabling the other.
>
>  but it is not familiar
>> to me,
>> the condition is "User defined" but i can't understand the Perl code,
>>
>> can you help please ?
>>
>> 
>> my $txn = $self->TransactionObj;
>> return 0 unless $txn->Field eq "Owner";
>> return 0 if $txn->NewValue == $txn->Creator;
>> return 1;
>> 
>>
>
> That means the scrip action (sending an email notification using the
> selected template) will trigger only on transactions that (1) change the
> ticket's "Owner" field and (2) set the new value of "Owner" to a value that
> is not equal to the "Creator" field of the transaction. In other words: the
> scrip triggers when a user gives a ticket to someone else.
>

​Thank you :)
​​

--
Rabin


Re: [rt-users] RT send 2 mail notification for setting the ticket owner

2015-05-12 Thread Bill Cole

On 11 May 2015, at 17:50, Rabin Yasharzadehe wrote:


On Sun, May 10, 2015 at 7:45 PM, Bill Cole <
rtusers-20090...@billmail.scconsult.com> wrote:


On 10 May 2015, at 5:41, Rabin Yasharzadehe wrote:

First mail looks like this,


Sun May 10 12:27:14 2015: Request 242534 was acted upon.


Transaction: Given to rabin by X
Queue: sandbox
Subject: *(No subject given)*
Owner: rabin
Requestors: rabin
Status: new
Ticket: https://rt



​the 2nd mail notification look like this,

Sun May 10 12:27:14 2015: Request 242534 was acted upon.


Transaction: Owner set to rabin by X
Queue: sandbox
Subject: *(No subject given)*
Owner: rabin
Requestors: rabin
Status: new
Ticket: https://rt




​why is that ? ​



You have 2 different scrips being triggered by the same transaction. 
You
can find which scrip is sending which message by looking at the 
Message-Id

header. An example from my system:

Message-ID: 

That's: rt-version-Trans-EpochSec-msecs-Ticket-Scrip-MailSeq@hostname



​Thank you Bill,
your tip was very helpful (and probably also in the future)​

I found the scrip which send the email notification,


Based on what you posted, I would expect there to be 2 different scrips, 
one for each message. Your solution will probably involve selecting one 
of them to keep and disabling the other.



but it is not familiar
to me,
the condition is "User defined" but i can't understand the Perl code,

can you help please ?


my $txn = $self->TransactionObj;
return 0 unless $txn->Field eq "Owner";
return 0 if $txn->NewValue == $txn->Creator;
return 1;



That means the scrip action (sending an email notification using the 
selected template) will trigger only on transactions that (1) change the 
ticket's "Owner" field and (2) set the new value of "Owner" to a value 
that is not equal to the "Creator" field of the transaction. In other 
words: the scrip triggers when a user gives a ticket to someone else.






Re: [rt-users] RT send 2 mail notification for setting the ticket owner

2015-05-11 Thread Rabin Yasharzadehe
On Sun, May 10, 2015 at 7:45 PM, Bill Cole <
rtusers-20090...@billmail.scconsult.com> wrote:

> On 10 May 2015, at 5:41, Rabin Yasharzadehe wrote:
>
>  First mail looks like this,
>>
>> Sun May 10 12:27:14 2015: Request 242534 was acted upon.
>>
>>> Transaction: Given to rabin by X
>>> Queue: sandbox
>>> Subject: *(No subject given)*
>>> Owner: rabin
>>> Requestors: rabin
>>> Status: new
>>> Ticket: https://rt
>>>
>>>
>> ​the 2nd mail notification look like this,
>>
>> Sun May 10 12:27:14 2015: Request 242534 was acted upon.
>>
>>> Transaction: Owner set to rabin by X
>>> Queue: sandbox
>>> Subject: *(No subject given)*
>>> Owner: rabin
>>> Requestors: rabin
>>> Status: new
>>> Ticket: https://rt
>>>
>>
>>
>> ​why is that ? ​
>>
>
> You have 2 different scrips being triggered by the same transaction. You
> can find which scrip is sending which message by looking at the Message-Id
> header. An example from my system:
>
> Message-ID: 
>
> That's: rt-version-Trans-EpochSec-msecs-Ticket-Scrip-MailSeq@hostname


​Thank you Bill,
your tip was very helpful (and probably also in the future)​

I found the scrip which send the email notification, but it is not familiar
to me,
the condition is "User defined" but i can't understand the Perl code,

can you help please ?


my $txn = $self->TransactionObj;
return 0 unless $txn->Field eq "Owner";
return 0 if $txn->NewValue == $txn->Creator;
return 1;



​



--
Rabin


Re: [rt-users] RT send 2 mail notification for setting the ticket owner

2015-05-10 Thread Bill Cole

On 10 May 2015, at 5:41, Rabin Yasharzadehe wrote:


First mail looks like this,

Sun May 10 12:27:14 2015: Request 242534 was acted upon.

Transaction: Given to rabin by X
Queue: sandbox
Subject: *(No subject given)*
Owner: rabin
Requestors: rabin
Status: new
Ticket: https://rt



​the 2nd mail notification look like this,

Sun May 10 12:27:14 2015: Request 242534 was acted upon.

Transaction: Owner set to rabin by X
Queue: sandbox
Subject: *(No subject given)*
Owner: rabin
Requestors: rabin
Status: new
Ticket: https://rt



​why is that ? ​


You have 2 different scrips being triggered by the same transaction. You 
can find which scrip is sending which message by looking at the 
Message-Id header. An example from my system:


Message-ID: 

That's: rt-version-Trans-EpochSec-msecs-Ticket-Scrip-MailSeq@hostname



[rt-users] RT send 2 mail notification for setting the ticket owner

2015-05-10 Thread Rabin Yasharzadehe
First mail looks like this,

Sun May 10 12:27:14 2015: Request 242534 was acted upon.
> Transaction: Given to rabin by X
> Queue: sandbox
> Subject: *(No subject given)*
> Owner: rabin
> Requestors: rabin
> Status: new
> Ticket: https://rt
>

​the 2nd mail notification look like this,

Sun May 10 12:27:14 2015: Request 242534 was acted upon.
> Transaction: Owner set to rabin by X
> Queue: sandbox
> Subject: *(No subject given)*
> Owner: rabin
> Requestors: rabin
> Status: new
> Ticket: https://rt


​why is that ? ​


​current RT version = 4.2.10
installed from source on ubuntu 12.04​


--
Rabin