[rt-users] Comment/Resolve Notification
Ruslan U. Zakirov
Ruslan.Zakirov at acronis.com
Wed Sep 29 04:29:40 EDT 2004
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:
http://wiki.bestpractical.com/index.cgi?ScripExecOrder
Don't forget to enable it with '$RT::UseTransactionBatch' config option.
And this old description is also applicable:
Scrip stages:
Scrips can be applied in different stages: 'TransactionCreate' and
'TransactionBatch'.
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.
Example:
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
1) scrip's action will be committed two times.
2) First time $TicketObj->TransactionBatch will return [a_obj b_obj] and
$ScripActionObj->TransactionObj will return b_obj.
3) 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
1) scrip's action will be committed only once.
2) $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:
> Currently I include the comment made when a ticket is resolved into
> the email notification.
>
> I also have a scrip that sends a modification notification when a
> regular comment is made, including the comment in the email
> notification.
>
> The only issue now is that whenever a ticket is resolved, a comment
> notifcation containing the resolving comment as well as the resolution
> nofiction, also contaiing the resolving comment, is sent out.
>
> Is there anyway to have the comment notification scrip fire when a
> comment is made _unless_ that comment is part of a resolution?
>
> Hope that makes some kind of sense ....
>
> Thanks.
>
> Sean
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT wiki at http://wiki.bestpractical.com
More information about the rt-users
mailing list