Re: [rt-users] Remove requestor on create?

2007-12-19 Thread Stephen Turner

At Tuesday 12/18/2007 03:20 PM, Kenneth Crocker wrote:


# set Creator to Nobody

$Trans-SetCreatorId(10, 'Force');


Kenn,

I know this is picky, but it's probably better to use $RT::Nobody-Id 
than 10 - there's no guarantee that the Nobody Id will always be 10 
in the future. Plus it makes the code a bit more self-commenting.


Steve 


___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch today. 
   Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.



Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Remove requestor on create?

2007-12-19 Thread Roy El-Hames

Hi;

I don't think there is a need to change the creator to Nobody, I think 
for  Matt's purposes just remove the requester, I have the following 
global scrip working for me:


Condition : On Create
User defined Action ,
prep code : return 1;
clean up code:

$self-TicketObj-DeleteWatcher(Type = 'Requestor', Email 
='emailaddress you want to remove') ;

return 1;

You can add if's if you want to be specific but if RT does not match the 
email address it moves on.


Regards;
Roy

Kenneth Crocker wrote:

Matt,


I have set a few other fields before, but not the Requestor. I 
think the condition should be like this:


# 


# Custom condition:
# 



# determine source of transaction

my $trans;
my $msgattr;

$trans = $self-TransactionObj;
return 0 unless $trans-Type eq Create;
$msgattr = $trans-Message-First;
return 0 unless $msgattr;
return 1 if $msgattr-GetHeader('Received');
return 0;


This will make sure the actor gets set ONLY if it is an email 
create. Then I would either set the TRANSACTION creator like this PREP 
code:


# 


# Custom action preparation code:
# 



# set Creator to “Nobody”

my $Trans = $self-TransactionObj;
$Trans-SetCreatorId(10, 'Force');
return 1;

maybe that should be SetCreator instead of SetCreatorId?

OR

you could change the Ticket Requestor like this cleanup code:

# 


# Custom action preparation code:
# 



return 1;

# 


# Custom action cleanup code:
# 



# set Requestor to “Nobody”

my $Ticket = $self-TicketObj;
$Ticket-SetRequestor(10, 'Force');
return 1;


I'm not sure I have the right object names for the actor Creator 
or Requestor. That might have to change, but the logic and condition 
code should work. Hope this helps.



Kenn
LBNL


On 12/18/2007 11:25 AM, Millard, Matt wrote:

I'm looking for a way to remove the requestor from server generated
email tickets.  These would be from [EMAIL PROTECTED] or
[EMAIL PROTECTED]. Basically what I'm trying to prevent
is any email getting sent back out of RT to a system that is simply
going to bounce the email.  Our servers don't accept incoming mail and
bounce it back to Exchange. 
Any thoughts on how I could do this?  I've looked through the wiki and

didn't find anything like this.

Matt


-Message Disclaimer-

This e-mail message is intended only for the use of the individual or
entity to which it is addressed, and may contain information that is
privileged, confidential and exempt from disclosure under applicable 
law.
If you are not the intended recipient, any dissemination, 
distribution or

copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by
reply email to [EMAIL PROTECTED] and delete or destroy all copies of
the original message and attachments thereto. Email sent to or from the
Principal Financial Group or any of its member companies may be retained
as required by law or regulation.

Nothing in this message is intended to constitute an Electronic 
signature

for purposes of the Uniform Electronic Transactions Act (UETA) or the
Electronic Signatures in Global and National Commerce Act (E-Sign)
unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction
or an idea that is discussed in the publication, it is intended to 
provide
general information about the subject matter covered and is provided 
with

the understanding that The Principal is not rendering legal, accounting,
or tax advice. It is not a marketed opinion and may not be used to avoid
penalties under the Internal Revenue Code. You should consult with
appropriate counsel or other advisors on all matters pertaining to 
legal,

tax, or accounting obligations and requirements.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, 
we'll take
up to 20 percent off the price. This sale won't last long, so get in 
touch today. Email us at [EMAIL PROTECTED] or call us at +1 
617 812 0745.



Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com





Re: [rt-users] Remove requestor on create?

2007-12-19 Thread Kenneth Crocker

Stephan,


	Good point. I've only been using PERL for a little while here so some 
code I've just copied from others. You idea makes sense to me. Thanks.



Kenn
LBNL

On 12/19/2007 7:22 AM, Stephen Turner wrote:

At Tuesday 12/18/2007 03:20 PM, Kenneth Crocker wrote:


# set Creator to Nobody

$Trans-SetCreatorId(10, 'Force');


Kenn,

I know this is picky, but it's probably better to use $RT::Nobody-Id 
than 10 - there's no guarantee that the Nobody Id will always be 10 in 
the future. Plus it makes the code a bit more self-commenting.


Steve



___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch today. 
   Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.



Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


[rt-users] Remove requestor on create?

2007-12-18 Thread Millard, Matt
I'm looking for a way to remove the requestor from server generated
email tickets.  These would be from [EMAIL PROTECTED] or
[EMAIL PROTECTED]. Basically what I'm trying to prevent
is any email getting sent back out of RT to a system that is simply
going to bounce the email.  Our servers don't accept incoming mail and
bounce it back to Exchange.  

Any thoughts on how I could do this?  I've looked through the wiki and
didn't find anything like this.

Matt


-Message Disclaimer-

This e-mail message is intended only for the use of the individual or
entity to which it is addressed, and may contain information that is
privileged, confidential and exempt from disclosure under applicable law.
If you are not the intended recipient, any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by
reply email to [EMAIL PROTECTED] and delete or destroy all copies of
the original message and attachments thereto. Email sent to or from the
Principal Financial Group or any of its member companies may be retained
as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature
for purposes of the Uniform Electronic Transactions Act (UETA) or the
Electronic Signatures in Global and National Commerce Act (E-Sign)
unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction
or an idea that is discussed in the publication, it is intended to provide
general information about the subject matter covered and is provided with
the understanding that The Principal is not rendering legal, accounting,
or tax advice. It is not a marketed opinion and may not be used to avoid
penalties under the Internal Revenue Code. You should consult with
appropriate counsel or other advisors on all matters pertaining to legal,
tax, or accounting obligations and requirements.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch 
today.
Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.


Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Remove requestor on create?

2007-12-18 Thread Drew Barnes
You could set up a separate queue and not use an autoreply scrip.

Millard, Matt wrote:
 I'm looking for a way to remove the requestor from server generated
 email tickets.  These would be from [EMAIL PROTECTED] or
 [EMAIL PROTECTED]. Basically what I'm trying to prevent
 is any email getting sent back out of RT to a system that is simply
 going to bounce the email.  Our servers don't accept incoming mail and
 bounce it back to Exchange.  

 Any thoughts on how I could do this?  I've looked through the wiki and
 didn't find anything like this.

 Matt


 -Message Disclaimer-

 This e-mail message is intended only for the use of the individual or
 entity to which it is addressed, and may contain information that is
 privileged, confidential and exempt from disclosure under applicable law.
 If you are not the intended recipient, any dissemination, distribution or
 copying of this communication is strictly prohibited. If you have
 received this communication in error, please notify us immediately by
 reply email to [EMAIL PROTECTED] and delete or destroy all copies of
 the original message and attachments thereto. Email sent to or from the
 Principal Financial Group or any of its member companies may be retained
 as required by law or regulation.

 Nothing in this message is intended to constitute an Electronic signature
 for purposes of the Uniform Electronic Transactions Act (UETA) or the
 Electronic Signatures in Global and National Commerce Act (E-Sign)
 unless a specific statement to the contrary is included in this message.

 While this communication may be used to promote or market a transaction
 or an idea that is discussed in the publication, it is intended to provide
 general information about the subject matter covered and is provided with
 the understanding that The Principal is not rendering legal, accounting,
 or tax advice. It is not a marketed opinion and may not be used to avoid
 penalties under the Internal Revenue Code. You should consult with
 appropriate counsel or other advisors on all matters pertaining to legal,
 tax, or accounting obligations and requirements.
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

 SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

 If you sign up for a new RT support contract before December 31, we'll take
 up to 20 percent off the price. This sale won't last long, so get in touch 
 today. 
 Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.


 Community help: http://wiki.bestpractical.com
 Commercial support: [EMAIL PROTECTED]


 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com
   
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch 
today. 
Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.


Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com


Re: [rt-users] Remove requestor on create?

2007-12-18 Thread Kenneth Crocker

Matt,


	I have set a few other fields before, but not the Requestor. I think 
the condition should be like this:


#
# Custom condition:
#

# determine source of transaction

my $trans;
my $msgattr;

$trans = $self-TransactionObj;
return 0 unless $trans-Type eq Create;
$msgattr = $trans-Message-First;
return 0 unless $msgattr;
return 1 if $msgattr-GetHeader('Received');
return 0;


	This will make sure the actor gets set ONLY if it is an email create. 
Then I would either set the TRANSACTION creator like this PREP code:


#
# Custom action preparation code:
#

# set Creator to “Nobody”

my $Trans = $self-TransactionObj;
$Trans-SetCreatorId(10, 'Force');
return 1;

maybe that should be SetCreator instead of SetCreatorId?

OR

you could change the Ticket Requestor like this cleanup code:

#
# Custom action preparation code:
#

return 1;

#
# Custom action cleanup code:
#

# set Requestor to “Nobody”

my $Ticket = $self-TicketObj;
$Ticket-SetRequestor(10, 'Force');
return 1;


	I'm not sure I have the right object names for the actor Creator or 
Requestor. That might have to change, but the logic and condition code 
should work. Hope this helps.



Kenn
LBNL


On 12/18/2007 11:25 AM, Millard, Matt wrote:

I'm looking for a way to remove the requestor from server generated
email tickets.  These would be from [EMAIL PROTECTED] or
[EMAIL PROTECTED]. Basically what I'm trying to prevent
is any email getting sent back out of RT to a system that is simply
going to bounce the email.  Our servers don't accept incoming mail and
bounce it back to Exchange.  


Any thoughts on how I could do this?  I've looked through the wiki and
didn't find anything like this.

Matt


-Message Disclaimer-

This e-mail message is intended only for the use of the individual or
entity to which it is addressed, and may contain information that is
privileged, confidential and exempt from disclosure under applicable law.
If you are not the intended recipient, any dissemination, distribution or
copying of this communication is strictly prohibited. If you have
received this communication in error, please notify us immediately by
reply email to [EMAIL PROTECTED] and delete or destroy all copies of
the original message and attachments thereto. Email sent to or from the
Principal Financial Group or any of its member companies may be retained
as required by law or regulation.

Nothing in this message is intended to constitute an Electronic signature
for purposes of the Uniform Electronic Transactions Act (UETA) or the
Electronic Signatures in Global and National Commerce Act (E-Sign)
unless a specific statement to the contrary is included in this message.

While this communication may be used to promote or market a transaction
or an idea that is discussed in the publication, it is intended to provide
general information about the subject matter covered and is provided with
the understanding that The Principal is not rendering legal, accounting,
or tax advice. It is not a marketed opinion and may not be used to avoid
penalties under the Internal Revenue Code. You should consult with
appropriate counsel or other advisors on all matters pertaining to legal,
tax, or accounting obligations and requirements.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch today. 
Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.



Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a copy at http://rtbook.bestpractical.com




___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

SAVE THOUSANDS OF DOLLARS ON RT SUPPORT:

If you sign up for a new RT support contract before December 31, we'll take
up to 20 percent off the price. This sale won't last long, so get in touch today. 
   Email us at [EMAIL PROTECTED] or call us at +1 617 812 0745.



Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
Buy a