hi
I got some help the other week from Ruslan and wanted
to ask a quick query. It was regarding changing
status/owner via email.
Code is at the bottom of the email and works fine. My
query is that with the scrips set up it goes out to
the user as its seen the same as a normal reply email
on how to fix the problem. I’d rather if possible not
email out Set-Status etc . Is there a way ?
Thanks for any pointers.
Elaine
Try next commit code:
my $content =
$self->TransactionObj->Attachments->First->Content;
if( $content =~ m/^\QSet-Owner:\E\s*(\S+)\s*$/m ) {
This scrip has drawbacks that are not addressed yet. For example all
transactions this scrip creates comes from RT System user not user who
sent email. This is bad and should be fixed because allow anybody who
has right create/reply/comment on ticket to set status and owner.
hi
I tried the code below, no errors in the log, although
it strips out in the fault the Set-Owner or Set-Status
(good) that is logged, there are no emails sent as the
only scrip i have set is user defined and nothing in
that says send an email ? If i then do another scrip
as “on correspond, reply to requestor with template
correspondence” then nothing gets stripped as its in
the other scrip ? Maybe i’m misunderstanding how i
should be setting things up ?
my $AttachObj =
$self->TransactionObj->Attachments->First;
go out if content is not text!
unless( $AttachObj->ContentType =~ /^text/ ) {
return 1;
}
my $content = $AttachObj->Content;
if( $content =~ m/^\QSet-Owner:\E\s*(\S+)\s*$/m ) {
hi
I tried the code below, no errors in the log, although
it strips out in the fault the Set-Owner or Set-Status
(good) that is logged, there are no emails sent as the
What is logged?
only scrip i have set is user defined and nothing in
that says send an email ? If i then do another scrip
This scrip can’t send email, it change properties. So use blank template
with it.
as “on correspond, reply to requestor with template
correspondence” then nothing gets stripped as its in
the other scrip ? Maybe i’m misunderstanding how i
Hmm. Scrip execution order is unpredictable in RT. And this is
very-very bad. Possible that RT runs “notify” first and only then runs
your custom one. Move code from custom commit block to custom prepare block.
Basically putting it in the prepartion code part of
the scrip and having the scrip to email out AFTER the
email cleanup happened.
Thanks a lot !
Elaine
hi
I tried the code below, no errors in the log,
although
it strips out in the fault the Set-Owner or
Set-Status
(good) that is logged, there are no emails sent as
the
What is logged?
only scrip i have set is user defined and nothing
in
that says send an email ? If i then do another
scrip
This scrip can’t send email, it change properties.
So use blank template
with it.
as “on correspond, reply to requestor with
template
correspondence” then nothing gets stripped as its
in
the other scrip ? Maybe i’m misunderstanding how i
Hmm. Scrip execution order is unpredictable in
RT. And this is
very-very bad. Possible that RT runs “notify” first
and only then runs
your custom one. Move code from custom commit block
to custom prepare block.
should be setting things up ?
my $AttachObj =
$self->TransactionObj->Attachments->First;
go out if content is not text!
unless( $AttachObj->ContentType =~ /^text/ ) {
return 1;
}
my $content = $AttachObj->Content;
if( $content =~ m/^\QSet-Owner:\E\s*(\S+)\s*$/m )
{
RT Administrator and Developer training is coming
to your town soon! (Boston, San Francisco, Austin,
Sydney) Contact training@bestpractical.com for
details.
Basically putting it in the prepartion code part
of
the scrip and having the scrip to email out AFTER
the
email cleanup happened.
Thanks a lot !
Elaine
(good) that is logged, there are no emails sent
as
the
What is logged?
only scrip i have set is user defined and nothing
in
that says send an email ? If i then do another
scrip
This scrip can’t send email, it change properties.
So use blank template
with it.
as "on correspond, reply to requestor with
template
correspondence" then nothing gets stripped as its
in
the other scrip ? Maybe i’m misunderstanding how
i
Hmm. Scrip execution order is unpredictable in
RT. And this is
very-very bad. Possible that RT runs “notify”
first
and only then runs
your custom one. Move code from custom commit
block
to custom prepare block.
should be setting things up ?
my $AttachObj =
$self->TransactionObj->Attachments->First;
go out if content is not text!
unless( $AttachObj->ContentType =~ /^text/ ) {
return 1;
}
my $content = $AttachObj->Content;
if( $content =~ m/^\QSet-Owner:\E\s*(\S+)\s*$/m )