Sean, if you use RT 3.2.2 then you can finally use Batch stage to
resolve this notification duplicates. also use this stage to find
resolve resolution comment faster and to be sure that exactly this
comment was added while resolve.
If you you’re interested in stages then you should read:
Don’t forget to enable it with ‘$RT::UseTransactionBatch’ config option.
And this old description is also applicable:
Scrips can be applied in different stages: ‘TransactionCreate’ and
In TransactionCreate stage scrip applied right after transaction is
created and can be committed more then once during one request for each
transaction which is applicable.
In TrabsactionBatch stage scrip applied only once during request when
all transactions are created and all scrips in TransactionCreate stage
already applied. Scrip aplied only once even if batch contain more then
one applicable transaction.
For backward compatibilty reasons and to allow using same scrip action
in both stages $ScripActionObj->TransactionObj return first transaction
which is applicable in batch. You can get full batch with
$TicketObj->TransactionBatch call which return array reference. Array
contain transaction objects ordered by create time.
User’s request creates transactions in next order: a b c d e.
Scrip has condition which trigger b and d transaction.
If scrip in TransactionCreate stage then
- scrip’s action will be committed two times.
- First time $TicketObj->TransactionBatch will return [a_obj b_obj] and
$ScripActionObj->TransactionObj will return b_obj.
- Second time it’ll be [a_obj b_obj c_obj d_obj] and
$ScripActionObj->TransactionObj will return d_obj.
If scrip in TransactionBatch stage
- scrip’s action will be committed only once.
- $TicketObj->TransactionBatch will return [a_obj b_obj c_obj d_obj
e_obj] and $ScripActionObj->TransactionObj will return b_obj(first
transaction which triggered condition).
Sean Johnson wrote: