[rt-users] Send-email Action - how to do this?

Mariusz Czulada manieq at wp.eu
Wed Oct 7 10:10:06 EDT 2009


Hi all,

As adwised in Wiki, I implemented my workflow with "STATE" ticked field
(readonly for users) and "ACTION" transaction fields (fields, because
each of my 5 user groups has a different role in the process).

I created a few scrips, which verify if "ACTION" is valid for this group
and the current "STATE", and also check if RT Status changes go with
"STATE" value.

Depending on RT Status, STATE and ACTION, I'd like to send an email
notification to different "set of recipients". On some actions there
will be [members of] groups L1 and L4, on others L1, L3 and L4,
sometimes L5 only. So I can't assign groups do queue's Watchers and
AdminWathers - for me 3 combinations of them is just not enough. Also
adding one-time [B]CCs in transaction is not an option (assume users
will often forget about it).

I was thinking about sending emails "by hand" from scrip action. I was
thinking about such solution:

Condition: User defined
Action: User defined
Template: My notification template

Custom condition:
    if (my_verification_of_action_is_positive) {
        return 1;
    } else {
        return 0;
    }

Custom action preparation code:
    do_some_FIELD_modifications_as_needed;
    SendNotification(To => EmailAdressesOfUsersInGroups(("L1","L2")),
                     Cc => (EmailAdressesOfUsersInGroups(("L4")),
                            EmailAddressOfRequestors));


Can sb help me about how to implement such actions? Im not good in perl
object programming.

Also, any other suggestion about notification is also welcome. Just
notice, that three combinations of "groups" built in RT (Watchers,
AdminWatchers, Watchers+AdminWatchers) are not enouch, since I'll need
some 12+ combinations of L1..L5 groups in CC or BCC roles.

Thank you in advance for your help and suggesions,

Regards,

Mariusz Czułada

----------------------------------------------------
Wygraj wymarzony skuter!
Wyznacz najprostszą drogę - docelu.pl - Kliknij:
http://klik.wp.pl/?adr=http%3A%2F%2Fcorto.www.wp.pl%2Fas%2Fchapman1.html&sid=863





More information about the rt-users mailing list