Re: [rt-users] RT WYSIWYG issue

2010-04-05 Thread Potla, Ashish Bassaliel
Jesse - Thanks for the reply - 

I did some debug logging but I do not see anything that is not too obvious - 
But I did find out something. 
My findings : 

Say I want to update the ticket with I am going to be late today. It has as 
many as 6 spaces.

You navigate to the WYSIWYG window by pressing tab repeatedly. Now your cursor 
is ready and blinking and you THINK you are ready to type in the WYSIWYG (on MS 
Explorer-7 on XP) . But the problem is you pressed tab one time too many and 
the actual focus is on Update button.

The focus goes to the Update Ticket button BUT the cursor is still blinking n 
the WYSIWYG editor giving user the impression that the focus is on the message 
input window.

At this point if I type in my message which has 6 spaces, quickly enough.. Each 
space-bar hit is actually a click on the Update Button and the update 
functionality is carried out. Because my typing is faster than the time it 
takes to reload the page the 6 space bar hits makes those many updations to the 
ticket. The updations are as follows :

I
I am 
I am going
I am going to 
I am going to be
I am going to be late
I am going to be late today. (This is when I consciously click the Update 
button)

So all in all I see 7 modifications to the ticket :( 

Your thoughts.
-Ashish


From: Jesse Vincent [je...@bestpractical.com]
Sent: Monday, April 05, 2010 11:49 PM
To: Potla, Ashish Bassaliel
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RT WYSIWYG issue

On Sun, Apr 04, 2010 at 08:26:16PM -0700, Potla, Ashish Bassaliel wrote:
 Hi
 We are seeing some issue when commenting for a ticket in RT system.
 If we use 'tab' key, it send multiple emails (in this case we got almost 30 
 emails) for the ticket's response to all the members.
 (We are glad, the user didn't used more than 30 words to close this ticket:))

That seems...somewhat impossible. Can you set RT's log level to debug and 
capture the log while you do this?
(Also, please don't CC rt-users at two different domains. you'll end up 
creating duplicate messages)




 Is there a fix for this from anyone?



 Thanks in Advance,

 -Ashish



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


--

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


Re: [rt-users] RT WYSIWYG issue

2010-04-05 Thread Potla, Ashish Bassaliel
Notice that the focus at that point is both on the WYSIWYG editor and the 
update button. 


From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Potla, Ashish Bassaliel 
[c_apo...@qualcomm.com]
Sent: Tuesday, April 06, 2010 12:29 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RT WYSIWYG issue

Jesse - Thanks for the reply -

I did some debug logging but I do not see anything that is not too obvious - 
But I did find out something.
My findings :

Say I want to update the ticket with I am going to be late today. It has as 
many as 6 spaces.

You navigate to the WYSIWYG window by pressing tab repeatedly. Now your cursor 
is ready and blinking and you THINK you are ready to type in the WYSIWYG (on MS 
Explorer-7 on XP) . But the problem is you pressed tab one time too many and 
the actual focus is on Update button.

The focus goes to the Update Ticket button BUT the cursor is still blinking n 
the WYSIWYG editor giving user the impression that the focus is on the message 
input window.

At this point if I type in my message which has 6 spaces, quickly enough.. Each 
space-bar hit is actually a click on the Update Button and the update 
functionality is carried out. Because my typing is faster than the time it 
takes to reload the page the 6 space bar hits makes those many updations to the 
ticket. The updations are as follows :

I
I am
I am going
I am going to
I am going to be
I am going to be late
I am going to be late today. (This is when I consciously click the Update 
button)

So all in all I see 7 modifications to the ticket :(

Your thoughts.
-Ashish


From: Jesse Vincent [je...@bestpractical.com]
Sent: Monday, April 05, 2010 11:49 PM
To: Potla, Ashish Bassaliel
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] RT WYSIWYG issue

On Sun, Apr 04, 2010 at 08:26:16PM -0700, Potla, Ashish Bassaliel wrote:
 Hi
 We are seeing some issue when commenting for a ticket in RT system.
 If we use 'tab' key, it send multiple emails (in this case we got almost 30 
 emails) for the ticket's response to all the members.
 (We are glad, the user didn't used more than 30 words to close this ticket:))

That seems...somewhat impossible. Can you set RT's log level to debug and 
capture the log while you do this?
(Also, please don't CC rt-users at two different domains. you'll end up 
creating duplicate messages)




 Is there a fix for this from anyone?



 Thanks in Advance,

 -Ashish



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


--

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

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


[rt-users] RT WYSIWYG issue

2010-04-04 Thread Potla, Ashish Bassaliel
Hi
We are seeing some issue when commenting for a ticket in RT system.
If we use 'tab' key, it send multiple emails (in this case we got almost 30 
emails) for the ticket's response to all the members.
(We are glad, the user didn't used more than 30 words to close this ticket:))



Is there a fix for this from anyone?



Thanks in Advance,

-Ashish


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

[rt-users] FW: Delete User accounts through a perl script

2010-02-23 Thread Potla, Ashish Bassaliel
Hi, Even on CLI : ./rt-shredder --plugin 'Objects=User,39236'
Is taking forever. It has been running for quite sometime till now.

-Ashish

From: Potla, Ashish Bassaliel
Sent: Tuesday, February 23, 2010 6:30 PM
To: rt-users@lists.bestpractical.com
Subject: Delete User accounts through a perl script

Hello I consistently keep getting this error : Couldn't wipeout object:  at 
/opt/prj/rt/rt3/local/lib/RTx/Shredder.pm line 427.

At the end of this mail is my subroutine -
If I change the Wipeout to WipeoutAll , it just takes on forever at that 
statement.

Let me know if you have any other logic to delete user accounts from a perl 
script.

Please Help,
Thanks
-Ashish

sub delete_user {
# Grab the user id
my $id = shift;

# Form an RT::User object string for the user
my $object_string = 'RT::User-' . $id;
# Create a single item array with the object string
my @users_to_delete = ($object_string);

# Create a shredder object and pass it the array
my $shredder = new RTx::Shredder( force = 1 );
$shredder-PutObjects( Objects = \...@users_to_delete );

# Shred the user
eval {
$shredder-Wipeout
};

if ( $@ ) {
return (-1, Failed to delete user with id '$id': $@);
}
return (1, User with id '$id' deleted successfully.\n);
}
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

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

[rt-users] Delete User accounts through a perl script

2010-02-23 Thread Potla, Ashish Bassaliel
Hello I consistently keep getting this error : Couldn't wipeout object:  at 
/opt/prj/rt/rt3/local/lib/RTx/Shredder.pm line 427.

At the end of this mail is my subroutine -
If I change the Wipeout to WipeoutAll , it just takes on forever at that 
statement.

Let me know if you have any other logic to delete user accounts from a perl 
script.

Please Help,
Thanks
-Ashish

sub delete_user {
# Grab the user id
my $id = shift;

# Form an RT::User object string for the user
my $object_string = 'RT::User-' . $id;
# Create a single item array with the object string
my @users_to_delete = ($object_string);

# Create a shredder object and pass it the array
my $shredder = new RTx::Shredder( force = 1 );
$shredder-PutObjects( Objects = \...@users_to_delete );

# Shred the user
eval {
$shredder-Wipeout
};

if ( $@ ) {
return (-1, Failed to delete user with id '$id': $@);
}
return (1, User with id '$id' deleted successfully.\n);
}
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com

2010 RT Training Sessions!
San Francisco, CA, USA - Feb 22  23
Dublin, Ireland - Mar 15  16
Boston, MA, USA - April 5  6
Washington DC, USA - Oct 25  26

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

Re: [rt-users] Spell Checker

2009-11-29 Thread Potla, Ashish Bassaliel
Hello!

Thank you for your comments. I will try this out asap.

Regards,
-Ashish


From: Praveen Velu [praveen.v...@hotmail.com]
Sent: Saturday, November 28, 2009 12:38 PM
To: Potla, Ashish Bassaliel; rt-us...@bestpractical.com
Subject: RE: [rt-users] Spell Checker

Dear Ashish

I have enabled spell checker in my server. you can follow the same steps

1. covert spellchecker.pl file to unix compatible then copy the file to Apache 
CGI directory
2. Configure fckconfig.js file to use spellerpages as spell checker in FCK 
Editor

FCKConfig.SpellChecker  = 'SpellerPages';
FCKConfig.SpellerPagesServerScript = '/cgi-bin/spellchecker.pl' ;   // 
Available extension: .php .cfm .pl
FCKConfig.FirefoxSpellChecker   = true ;

3. Update spellchecker.pl as below

my $spellercss = 
'/rt/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/spellerStyle.css';my
 $wordWindowSrc = 
'/rt/NoAuth/RichText/FCKeditor/editor/dialog/fck_spellerpages/spellerpages/wordWindow.js';my
 $aspell_cmd = '/usr/bin/aspell';

Please try this now...

-Praveen-


From: c_apo...@qualcomm.com
To: rt-us...@bestpractical.com
Date: Wed, 25 Nov 2009 02:34:13 -0800
Subject: [rt-users] Spell Checker


Hello,

How does one enable RT Spell checker in RT 3.8.2?



Thank you in advance,

-Ashish


Windows 7: Find the right PC for you. Learn 
more.http://windows.microsoft.com/shop
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

[rt-users] Spell Checker

2009-11-25 Thread Potla, Ashish Bassaliel
Hello,
How does one enable RT Spell checker in RT 3.8.2?

Thank you in advance,
-Ashish
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

[rt-users] Long Lines on ticket display page

2009-11-25 Thread Potla, Ashish Bassaliel
Hello,
Some bizarre things have been happening and would like to know if anyone has 
seen similar cases.


1.   When a long line is in the message body, it runs off the screen.

2.   Sometimes, long words, like path names are unnecessarily truncated and 
wrapped to the next line even though the end is not reached.

3.   Inconsistent new lines get added to the message body(especially to 
indented previous messages) and keeps making the email longer and longer each 
time correspondence is added to it.

Please help me out!

Thank you,
-Ashish
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

[rt-users] FW: Problem with Ticket display page

2009-11-25 Thread Potla, Ashish Bassaliel
I tried to send a screen shot but it was too big..

I will try to explain my problem: Inside the message body I keep seeing 
horizontal /vertical scroll bars. Why is this happening?

Thank you,
-Ashish

From: Potla, Ashish Bassaliel
Sent: Wednesday, November 25, 2009 2:57 AM
To: 'rt-us...@bestpractical.com'
Subject: Problem with Ticket display page

Hello again,
Please have a look at this below display page for a ticket. Notice the 
horizontal scroll bar appearing inside the ticket display? This happens for 
Firefox on Unix and Firefox and Safari on MacOS.
Why is it displaying so?


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

[rt-users] FW: FW: Problem with Ticket display page

2009-11-25 Thread Potla, Ashish Bassaliel
I didnt edit that. Where do you actually set it?

Thanks for your response.
-Ashish

From: Ken Crocker [kfcroc...@lbl.gov]
Sent: Wednesday, November 25, 2009 10:30 PM
To: Potla, Ashish Bassaliel
Cc: rt-us...@bestpractical.com
Subject: Re: [rt-users] FW: Problem with Ticket display page

Ashish,

What did you set your wrap configuration to?

Kenn
LBNL

On 11/25/2009 3:07 AM, Potla, Ashish Bassaliel wrote:
I tried to send a screen shot but it was too big..

I will try to explain my problem: Inside the message body I keep seeing 
horizontal /vertical scroll bars. Why is this happening?

Thank you,
-Ashish

From: Potla, Ashish Bassaliel
Sent: Wednesday, November 25, 2009 2:57 AM
To: 'rt-us...@bestpractical.commailto:rt-us...@bestpractical.com'
Subject: Problem with Ticket display page

Hello again,
Please have a look at this below display page for a ticket. Notice the 
horizontal scroll bar appearing inside the ticket display? This happens for 
Firefox on Unix and Firefox and Safari on MacOS.
Why is it displaying so?





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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.commailto:sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

[rt-users] FW: Long Lines on ticket display page

2009-11-25 Thread Potla, Ashish Bassaliel
Sorry about that . It is 3.8.2 (mod_perl2) on a sun solaris machine with an 
Oracle Db.

Let me know if you need any other info.

Regards,
-Ashish


From: Jesse Vincent [je...@bestpractical.com]
Sent: Wednesday, November 25, 2009 10:31 PM
To: Potla, Ashish Bassaliel
Cc: rt-us...@bestpractical.com
Subject: Re: [rt-users] Long Lines on ticket display page

On Wed 25.Nov'09 at  3:03:05 -0800, Potla, Ashish Bassaliel wrote:
 Hello,

 Some bizarre things have been happening and would like to know if anyone has 
 seen similar cases.

What version of RT are you folks running?

-Jesse


 1.   When a long line is in the message body, it runs off the screen.

 2.   Sometimes, long words, like path names are unnecessarily truncated 
 and wrapped to the next line even though the end
 is not reached.

 3.   Inconsistent new lines get added to the message body(especially to 
 indented previous messages) and keeps making the
 email longer and longer each time correspondence is added to it.



 Please help me out!



 Thank you,

 -Ashish


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

 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com


 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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] text attachment get mixed up

2009-11-11 Thread Potla, Ashish Bassaliel
I see this too. Is there any fix out there for this?

-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Mathieu Longtin 
[math...@closetwork.org]
Sent: Wednesday, November 11, 2009 7:43 PM
To: RT Users Mailing List (E-mail)
Subject: [rt-users] text attachment get mixed up

When a text attachment is added to a ticket, the emails RT sends put the 
attachment as body, and the actual message as an attachment.

It does that both when creating a ticket using the web interface, and when 
sending an email with an attachment.

It's probably that the code doesn't pick the right plain/text attachment.

This is RT 3.8.5.

--
Mathieu Longtin
1-514-803-8977
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Re: [rt-users] Send email from script

2009-07-22 Thread Potla, Ashish Bassaliel
Here is a sample :

Description : On Correspond
Condition: On Correspond
Action: User Defined
Template:Global Template : QCT Transaction
Stage: Transaction Batch

Custom Action Prep Code:



require RT::Action::SendEmail;
use strict;
use vars qw/@ISA/;
@ISA = qw(RT::Action::SendEmail);
$self-SetRecipients();
$self-SUPER::Prepare();
$self-SUPER::Commit();

sub SetRecipients {
my $self = shift;
my $ticket = $self-TicketObj;
my ( @To, @PseudoTo, @Cc, @Bcc );
my $arg ='Owner,Requestor,AdminCc,Cc';

  
   ##Requestor
push @To, $ticket-Requestors-MemberEmailAddresses;

##CC
push ( @Cc, $ticket-Cc-MemberEmailAddresses );
push ( @Cc, $ticket-QueueObj-Cc-MemberEmailAddresses  );

##Admin CC
push ( @Bcc, $ticket-AdminCc-MemberEmailAddresses  );
push ( @Bcc, $ticket-QueueObj-AdminCc-MemberEmailAddresses  );

##Owner
push ( @Bcc, $ticket-OwnerObj-EmailAddress );

##Other Recipients
if ( my $attachment = $self-TransactionObj-Attachments-First ) {
push @Cc, map { $_-address } 
Email::Address-parse($attachment-GetHeader('RT-Send-Cc'));
push @Bcc, map { $_-address } 
Email::Address-parse($attachment-GetHeader('RT-Send-Bcc'));
}

##FriendlyToLineFormat
if ( RT-Config-Get('UseFriendlyToLine') ) {
unless (@To) {
push @PseudoTo,
sprintf RT-Config-Get('FriendlyToLineFormat'), $arg, 
$ticket-id;
}
}


my $creator = $self-TransactionObj-CreatorObj-EmailAddress();
#Strip the sender out of the To, Cc and AdminCc and set the 
# recipients fields used to build the message by the superclass.
# unless a flag is set 
if (RT-Config-Get('NotifyActor')) {
@{ $self-{'To'} }  = @To;
@{ $self-{'Cc'} }  = @Cc;
@{ $self-{'Bcc'} } = @Bcc;
}
else {
@{ $self-{'To'} }  = grep ( lc $_ ne lc $creator, @To );
@{ $self-{'Cc'} }  = grep ( lc $_ ne lc $creator, @Cc );
@{ $self-{'Bcc'} } = grep ( lc $_ ne lc $creator, @Bcc );
}
}
1;


Custom Action Cleanup Code:

return 1;


This is how I send emails from scrips when I donot want to touch the database 
ie create new scripactions on the database.
Needless to say the above scrip is equivalent to On correspond , Notify 
Requestor, Owner, AdminCC, CC, Other Recepients. 

hope this helps.
-Ashish


From: Tariq Doukkali [tariq.doukk...@autoform.de]
Sent: Wednesday, July 22, 2009 11:27 AM
To: Potla, Ashish Bassaliel
Cc: rt-users@lists.bestpractical.com
Subject: AW: [rt-users] Send email from script

Hi Ashish,

many Thanks for your answer 

I want sent an email from a user defined action, but I don't know how can I do 
that ;-((

Tariq

-Ursprüngliche Nachricht-
Von: Potla, Ashish Bassaliel [mailto:c_apo...@qualcomm.com]
Gesendet: Dienstag, 21. Juli 2009 20:35
An: Gene LeDuc; Tariq Doukkali
Cc: rt-users@lists.bestpractical.com
Betreff: RE: [rt-users] Send email from script

You can actually send out emails via scrips with user defined scrip-Action.

The action is but a bit longwinded, but I use it for some of  my queues to 
tweak the outgoing emails (Like add/remove an email id from the outgoing email 
for all email transactions -- for instance).

Let me know if you want the user defined action.

-Ashish


From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Gene LeDuc 
[gle...@mail.sdsu.edu]
Sent: Tuesday, July 21, 2009 11:32 PM
To: Tariq Doukkali
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Send email from script

Hi Tariq,

The obvious answer: You select one of the Notify actions that generate
e-mail and use a template to design the e-mail.

But you probably would've figured that out for yourself.

If you are asking how to send an e-mail from a scrip with a user-defined
action, I don't think you can.  I get around this shortcoming by
generating some other transaction in the script code and then use that
transaction to trigger a scrip that does the Notify action.  Convoluted,
but it works.

We don't use the Priority field in our tickets, so I use it to trigger
stuff like that.

Have fun!
Gene

Tariq Doukkali wrote:
 Hello,

 how can I send an email from a script ???

 Many thanks

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Re: [rt-users] Send email from script

2009-07-22 Thread Potla, Ashish Bassaliel
That should be easy, Inside Set recepients subroutine place something like :

$ticket-SetSubject('New Subject');

This is all present in the api.

-Ashish


From: Tariq Doukkali [tariq.doukk...@autoform.de]
Sent: Wednesday, July 22, 2009 1:37 PM
To: Potla, Ashish Bassaliel
Cc: rt-users@lists.bestpractical.com
Subject: AW: [rt-users] Send email from script

Hi Ashish,

The script is working fine !!! Now I can send messages from a script directly. 
But I don't know how to modify the subject of the message (email) ??

Many thanks for your help

Best regards from Germany,
Tariq

-Ursprüngliche Nachricht-
Von: Potla, Ashish Bassaliel [mailto:c_apo...@qualcomm.com]
Gesendet: Mittwoch, 22. Juli 2009 09:11
An: Tariq Doukkali
Cc: rt-users@lists.bestpractical.com
Betreff: RE: [rt-users] Send email from script

Here is a sample :

Description : On Correspond
Condition: On Correspond
Action: User Defined
Template:Global Template : QCT Transaction
Stage: Transaction Batch

Custom Action Prep Code:



require RT::Action::SendEmail;
use strict;
use vars qw/@ISA/;
@ISA = qw(RT::Action::SendEmail);
$self-SetRecipients();
$self-SUPER::Prepare();
$self-SUPER::Commit();

sub SetRecipients {
my $self = shift;
my $ticket = $self-TicketObj;
my ( @To, @PseudoTo, @Cc, @Bcc );
my $arg ='Owner,Requestor,AdminCc,Cc';


   ##Requestor
push @To, $ticket-Requestors-MemberEmailAddresses;

##CC
push ( @Cc, $ticket-Cc-MemberEmailAddresses );
push ( @Cc, $ticket-QueueObj-Cc-MemberEmailAddresses  );

##Admin CC
push ( @Bcc, $ticket-AdminCc-MemberEmailAddresses  );
push ( @Bcc, $ticket-QueueObj-AdminCc-MemberEmailAddresses  );

##Owner
push ( @Bcc, $ticket-OwnerObj-EmailAddress );

##Other Recipients
if ( my $attachment = $self-TransactionObj-Attachments-First ) {
push @Cc, map { $_-address } 
Email::Address-parse($attachment-GetHeader('RT-Send-Cc'));
push @Bcc, map { $_-address } 
Email::Address-parse($attachment-GetHeader('RT-Send-Bcc'));
}

##FriendlyToLineFormat
if ( RT-Config-Get('UseFriendlyToLine') ) {
unless (@To) {
push @PseudoTo,
sprintf RT-Config-Get('FriendlyToLineFormat'), $arg, 
$ticket-id;
}
}


my $creator = $self-TransactionObj-CreatorObj-EmailAddress();
#Strip the sender out of the To, Cc and AdminCc and set the
# recipients fields used to build the message by the superclass.
# unless a flag is set
if (RT-Config-Get('NotifyActor')) {
@{ $self-{'To'} }  = @To;
@{ $self-{'Cc'} }  = @Cc;
@{ $self-{'Bcc'} } = @Bcc;
}
else {
@{ $self-{'To'} }  = grep ( lc $_ ne lc $creator, @To );
@{ $self-{'Cc'} }  = grep ( lc $_ ne lc $creator, @Cc );
@{ $self-{'Bcc'} } = grep ( lc $_ ne lc $creator, @Bcc );
}
}
1;


Custom Action Cleanup Code:

return 1;


This is how I send emails from scrips when I donot want to touch the database 
ie create new scripactions on the database.
Needless to say the above scrip is equivalent to On correspond , Notify 
Requestor, Owner, AdminCC, CC, Other Recepients.

hope this helps.
-Ashish


From: Tariq Doukkali [tariq.doukk...@autoform.de]
Sent: Wednesday, July 22, 2009 11:27 AM
To: Potla, Ashish Bassaliel
Cc: rt-users@lists.bestpractical.com
Subject: AW: [rt-users] Send email from script

Hi Ashish,

many Thanks for your answer 

I want sent an email from a user defined action, but I don't know how can I do 
that ;-((

Tariq

-Ursprüngliche Nachricht-
Von: Potla, Ashish Bassaliel [mailto:c_apo...@qualcomm.com]
Gesendet: Dienstag, 21. Juli 2009 20:35
An: Gene LeDuc; Tariq Doukkali
Cc: rt-users@lists.bestpractical.com
Betreff: RE: [rt-users] Send email from script

You can actually send out emails via scrips with user defined scrip-Action.

The action is but a bit longwinded, but I use it for some of  my queues to 
tweak the outgoing emails (Like add/remove an email id from the outgoing email 
for all email transactions -- for instance).

Let me know if you want the user defined action.

-Ashish


From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Gene LeDuc 
[gle...@mail.sdsu.edu]
Sent: Tuesday, July 21, 2009 11:32 PM
To: Tariq Doukkali
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Send email from script

Hi Tariq,

The obvious answer: You select one of the Notify actions that generate
e-mail and use a template to design the e-mail.

But you probably would've figured that out for yourself.

If you are asking how to send an e-mail from a scrip with a user-defined
action, I don't think you can.  I get around this shortcoming by
generating some other transaction in the script code and then use that
transaction to trigger a scrip that does the Notify

Re: [rt-users] Send email from script

2009-07-21 Thread Potla, Ashish Bassaliel
You can actually send out emails via scrips with user defined scrip-Action.

The action is but a bit longwinded, but I use it for some of  my queues to 
tweak the outgoing emails (Like add/remove an email id from the outgoing email 
for all email transactions -- for instance).

Let me know if you want the user defined action.

-Ashish


From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Gene LeDuc 
[gle...@mail.sdsu.edu]
Sent: Tuesday, July 21, 2009 11:32 PM
To: Tariq Doukkali
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Send email from script

Hi Tariq,

The obvious answer: You select one of the Notify actions that generate
e-mail and use a template to design the e-mail.

But you probably would've figured that out for yourself.

If you are asking how to send an e-mail from a scrip with a user-defined
action, I don't think you can.  I get around this shortcoming by
generating some other transaction in the script code and then use that
transaction to trigger a scrip that does the Notify action.  Convoluted,
but it works.

We don't use the Priority field in our tickets, so I use it to trigger
stuff like that.

Have fun!
Gene

Tariq Doukkali wrote:
 Hello,

 how can I send an email from a script ???

 Many thanks

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


[rt-users] DashBoard create rights

2009-07-02 Thread Potla, Ashish Bassaliel
Hi,
I am trying to configure Dashboards to all the users in my system.

How do I assign the global right : CreateDashboard to all?

I have a LOT of users in my system and it is hard to open 
Configuration/Global/UserRights.html and assign each one of them this right. 
Sometimes the system crashes just trying to list out all the users in this page.

Is there a simpler way?

Thank you,
-Ashish
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

[rt-users] Text Attachments in RT Emails mucked up

2009-04-21 Thread Potla, Ashish Bassaliel
Hi,
I send an email to RT with a text attachment (ie a notepad file with some text 
in it.) and some content say 'TEST' in the body of the email.

The reply template consists of self-TransactionObj-Content to list out the 
content.

But when I recieve the email, the text attachment is now in the body of the 
email and the message that was supposed to be in the body of the email is shown 
as an attachment!!

Has anyone faced this ?? I am using RT 3.8.2 and the email I send is of HTML 
type.

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Re: [rt-users] Help regarding TimeZone setting in RT 3.8.2

2009-04-01 Thread Potla, Ashish Bassaliel
I am sorry for the typo!!! 
After setting it to US/Eastern, the dates DO NOT adjust to show the time in the 
new time zone.

Thanks
-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Potla, Ashish Bassaliel 
[c_apo...@qualcomm.com]
Sent: Wednesday, April 01, 2009 5:11 PM
To: rt-us...@bestpractical.com
Subject: [rt-users] Help regarding TimeZone setting in RT 3.8.2

Hi,
In the Preferences  About Me page, there is a setting for Timezone.

Initially it was empty. I set it to US/Eastern .

Before setting the value to US/Eastern the dates in the ticket display , say 
the created date is Mon Jul 02 09:51:37 2007. After setting timezone to 
US/Eastern, it adjust for the time difference.

Has anyone used this setting and made it work?

Thanks
-Ashish

PS: In RT_SiteConfig the $Timezone is set to US/Pacific the timezone my server 
is on.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


[rt-users] Help regarding TimeZone setting in RT 3.8.2

2009-04-01 Thread Potla, Ashish Bassaliel
Hello Everyone,
Is there a particular format for setting the parameter of the Timezone field in 
Preferences page(About me tab)?

Thanks
-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Potla, Ashish Bassaliel 
[c_apo...@qualcomm.com]
Sent: Wednesday, April 01, 2009 5:14 PM
To: rt-us...@bestpractical.com
Subject: Re: [rt-users] Help regarding TimeZone setting in RT 3.8.2

I am sorry for the typo!!!
After setting it to US/Eastern, the dates DO NOT adjust to show the time in the 
new time zone.

Thanks
-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Potla, Ashish Bassaliel 
[c_apo...@qualcomm.com]
Sent: Wednesday, April 01, 2009 5:11 PM
To: rt-us...@bestpractical.com
Subject: [rt-users] Help regarding TimeZone setting in RT 3.8.2

Hi,
In the Preferences  About Me page, there is a setting for Timezone.

Initially it was empty. I set it to US/Eastern .

Before setting the value to US/Eastern the dates in the ticket display , say 
the created date is Mon Jul 02 09:51:37 2007. After setting timezone to 
US/Eastern, it adjust for the time difference.

Has anyone used this setting and made it work?

Thanks
-Ashish

PS: In RT_SiteConfig the $Timezone is set to US/Pacific the timezone my server 
is on.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Help regarding TimeZone setting in RT 3.8.2

2009-04-01 Thread Potla, Ashish Bassaliel
Hello Guys,
Can anyone please help me with this?

-Ashish

From: Potla, Ashish Bassaliel
Sent: Wednesday, April 01, 2009 8:27 PM
To: rt-us...@bestpractical.com
Subject: Help regarding TimeZone setting in RT 3.8.2

Hello Everyone,
Is there a particular format for setting the parameter of the Timezone field in 
Preferences page(About me tab)?

Thanks
-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Potla, Ashish Bassaliel 
[c_apo...@qualcomm.com]
Sent: Wednesday, April 01, 2009 5:14 PM
To: rt-us...@bestpractical.com
Subject: Re: [rt-users] Help regarding TimeZone setting in RT 3.8.2

I am sorry for the typo!!!
After setting it to US/Eastern, the dates DO NOT adjust to show the time in the 
new time zone.

Thanks
-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Potla, Ashish Bassaliel 
[c_apo...@qualcomm.com]
Sent: Wednesday, April 01, 2009 5:11 PM
To: rt-us...@bestpractical.com
Subject: [rt-users] Help regarding TimeZone setting in RT 3.8.2

Hi,
In the Preferences  About Me page, there is a setting for Timezone.

Initially it was empty. I set it to US/Eastern .

Before setting the value to US/Eastern the dates in the ticket display , say 
the created date is Mon Jul 02 09:51:37 2007. After setting timezone to 
US/Eastern, it adjust for the time difference.

Has anyone used this setting and made it work?

Thanks
-Ashish

PS: In RT_SiteConfig the $Timezone is set to US/Pacific the timezone my server 
is on.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Allow only a specific user to see a Callback

2009-03-24 Thread Potla, Ashish Bassaliel
I think you can also get the current user`s obj and get his name like : 
$session{'CurrentUser'}-UserObj-Name and put in a condition to see if its 
John or not. Based on this condition you should call the callback.

But going into the future if you want to add more users this functionality, it 
makes sense to create a new group. 
Then you should put in a condition to see iif the current user is a part of 
this new group.

-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Tom Lahti 
[t...@bitstatement.net]
Sent: Tuesday, March 24, 2009 4:54 AM
To: holland holland
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Allow only a specific user to see a Callback

I'm no RT API expert, but I think from a best practices standpoint you
really ought to create a new group for the purpose, make 'John' a member of
that group, and then have the scrip allow the callback based on membership
in that group.

holland holland wrote:
 Dear all,

 I would like only a specific user, e.g 'John' to see a callback.

 Currently I only see methods based on user rights, like:

 %INIT
 if ($session{'CurrentUser'}-UserObj-HasRight(
Right = 'AdminUsers',
Object = $RT::System,
 )) {
$toptabs-{'My Callback'} = { title =loc(My Callback),
  path  = MyCallbacks/1/index.html };
 }
 /%init
 %args
 $toptabs =undef
 /%args


 I want only 'John' to see this callback, not everybody that has
 'AdminUsers' right.


 Your help is much appreciated!

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

 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com


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


--
-- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
-- 
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Allow only a specific user to see a Callback

2009-03-24 Thread Potla, Ashish Bassaliel
Try this in your condition and let me know :

if ($group-HasMemberRecursively($session{'CurrentUser'}-PrincipalObj)) {

-Ashish

From: holland holland [laholla...@gmail.com]
Sent: Tuesday, March 24, 2009 3:55 PM
To: Potla, Ashish Bassaliel
Subject: Re: [rt-users] Allow only a specific user to see a Callback

Thanks Ashish -

I tried Tom suggestion but it does not seem to work either, the code:

my $group = new RT::Group($session{'CurrentUser'});
$group-LoadUserDefinedGroup('my_group');
if ($group-HasMemberRecursively($session{'CurrentUser'})) {
 $toptabs-{'My Callback'} = { title =loc(My Callback),
 path  = MyCallbacks/1/index.html };
 }


User 'john' belong to 'my_group', but unfortunately he cannot see 'My
Callback', I 'm doing something wrong?

Thanks for the answers so far.

p.s: i always clean mason cache and restart apache process when testing.
I use RT 3.6.4

Cheers,
merou




On Tue, Mar 24, 2009 at 11:11 AM, Potla, Ashish Bassaliel
c_apo...@qualcomm.com wrote:
 I think you can also get the current user`s obj and get his name like : 
 $session{'CurrentUser'}-UserObj-Name and put in a condition to see if its 
 John or not. Based on this condition you should call the callback.

 But going into the future if you want to add more users this functionality, 
 it makes sense to create a new group.
 Then you should put in a condition to see iif the current user is a part of 
 this new group.

 -Ashish
 
 From: rt-users-boun...@lists.bestpractical.com 
 [rt-users-boun...@lists.bestpractical.com] On Behalf Of Tom Lahti 
 [t...@bitstatement.net]
 Sent: Tuesday, March 24, 2009 4:54 AM
 To: holland holland
 Cc: rt-users@lists.bestpractical.com
 Subject: Re: [rt-users] Allow only a specific user to see a Callback

 I'm no RT API expert, but I think from a best practices standpoint you
 really ought to create a new group for the purpose, make 'John' a member of
 that group, and then have the scrip allow the callback based on membership
 in that group.

 holland holland wrote:
 Dear all,

 I would like only a specific user, e.g 'John' to see a callback.

 Currently I only see methods based on user rights, like:

 %INIT
 if ($session{'CurrentUser'}-UserObj-HasRight(
Right = 'AdminUsers',
Object = $RT::System,
 )) {
$toptabs-{'My Callback'} = { title =loc(My Callback),
  path  = MyCallbacks/1/index.html };
 }
 /%init
 %args
 $toptabs =undef
 /%args


 I want only 'John' to see this callback, not everybody that has
 'AdminUsers' right.


 Your help is much appreciated!

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

 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com


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


 --
 -- 
   Tom Lahti
   BIT Statement LLC

   (425)251-0833 x 117
   http://www.bitstatement.net/
 -- 
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com


 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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Send Mail Scrip problems

2009-03-18 Thread Potla, Ashish Bassaliel
Maybe the $user that you use to initialize the Group Object variable is not 
initialized properly.
I always use $RT::SystemUser instead of the CurrentUser to initialize such 
variables, but until now I havent really thought about it being 'bad'.

Any thoughts about this?

-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Andy Smith 
[a.sm...@ukgrid.net]
Sent: Tuesday, March 17, 2009 11:01 PM
To: Ken Crocker
Cc: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Send Mail Scrip problems

Hi Ken,

   thanks for replying. Actually I seem to have found a way to get it
working but without really understanding what I have done :P. Please
see my second post with the issue described slightly more clearly (I
think).

http://lists.bestpractical.com/pipermail/rt-users/2009-March/058001.html

If you have any ideas what I have done any why it works with the later
config it would be great to know!

Thanks Andy.

Quoting Ken Crocker kfcroc...@lbl.gov:

 Andy,


Did you remember to insert a blank line after the to: line.
 When you replace Subject:, From:, or to: (header replacement
 line) you MUST insert a blank line between them and the body of your
 template.
Hope this helps.

 Kenn
 LBNL

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Help with displaying Error message

2009-03-18 Thread Potla, Ashish Bassaliel
Hi,
I have this set up : 

On local/html/Ticket/Modify.html 

In the INIT Block :

my %queues_custom = ('name of your queue' = '1');
if ($queues_custom{$Ticket-QueueObj-Name}) {
my @custom_results = ProcessCustomRequiredUpdates(TicketObj = $Ticket);
push @results,@custom_results;
}

On local/lib/RT/Interface/Web.pm I have added :

sub ProcessCustomRequiredUpdates {
my %args = @_;
my $TicketObj = $args{'TicketObj'};
my @results;
$RT::Logger-debug(Queue name is .$Ticket-QueueObj-Name. Status is 
.$Ticket-Status);
if ( $TicketObj  $TicketObj-QueueObj-Name =~ m/^(REGULAR EXPR OF YOUR 
QUEUENAME)$/  $TicketObj-Status =~ m/^(resolved)$/) {

my $ObjectCFs = RT::ObjectCustomFields-new($RT::SystemUser);
$ObjectCFs-LimitToObjectId($TicketObj-QueueObj-Id);
$ObjectCFs-LimitToLookupType('RT::Queue-RT::Ticket');

my @CustomFields = $ObjectCFs-CustomFields;
foreach my $CustomField (@CustomFields) {
next unless ($CustomField-Name =~ m/^(REGULAR EXPR OF YOUR CF)$/);
my $Values = $TicketObj-CustomFieldValues( $CustomField-Id );
unless ($Values-Count) {
push @results, Error: Custom Field .$CustomField-Name. is 
required. Changing Status of ticket to new;
$TicketObj-SetStatus('new');
last;
}
}
}
return @results;
}

Note: The put the code in modify.html just after pushing the rest of the 
various results into @results. I put it after this block of code :
push @results, @wresults;
push @results, @dresults;
push @results, @lresults;
push @results, @cf_results;

When inserting the new function into Web.pm, make sure to update the correct 
values(ie case as well) of REGULAR EXPR OF YOUR QUEUENAME and REGULAR EXPR OF 
YOUR CF

I know that I have to put in the new function into Web_Local.pm but if I do it 
doesnt seem to work. May be you can test it out and let me know.

Thanks
-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Ken Crocker 
[kfcroc...@lbl.gov]
Sent: Thursday, March 19, 2009 12:42 AM
To: rt Users
Subject: [rt-users] Help with displaying Error message

To all,

I have a scrip thar re-sets the Ticket Status to open when a
ticket  is resolved and a certain CF has no value. Making the CF
Mandatory is not an option as the users do NOT know what to put in it
when the ticket is created and we don't want the mandatory setting to
stop ticket creation.
What I want to do is display a message on the Modify Ticket screen
when they resolve the ticket and the CF has NOT been set. Everything
else is working fine. Any help there? Thanks.


Kenn
LBNL

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Advice for New Machine

2009-03-13 Thread Potla, Ashish Bassaliel
I am in the process of upgrading RT 3.6.5 to RT 3.8.2 . In fact I have it set 
up in Dev arena and waiting for user testing before I move it to production by 
the end of the month probably.. hopefully

I use Solaris , Apache2 with mod_perl2 and DB on Oracle. 
Doesnt seem too bad  :)

-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Sean [s...@ttys0.net]
Sent: Saturday, March 14, 2009 1:56 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Advice for New Machine

On Fri, 2009-03-13 at 15:16 -0500, John Arends wrote:
 Gary Greene wrote:
  I would go CentOS for the machine if you're a RH person, since it is
  practically the same thing, and there are more than a few of us CentOS
  users running RT with our own RPMs.
 
 What version of RT are you running on top of CentOS? With 3.8.2 there
 are so many dependencies it seems to be a near impossible task to build
 RPMs for all the required perl modules. I've been playing with the
 script included with RT and it does a pretty good job of pulling
 everything down from CPAN and installing it.

We recently updated from 3.6 to 3.8. I tried to get 3.8.2 going in an
OpenSolaris (snv_101) zone and Ubuntu 8.10 (also tried Jaunty alpha)
server installation. Neither was anywhere close to a clean install, and
neither worked to my level of satisfaction. I ended up using a Gentoo
server. In my opinion, Gentoo and RT 3.8 is a pretty good match. Being a
source based distribution helps, I think.

Just my 2c.

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Scrip and custom field Help

2009-03-09 Thread Potla, Ashish Bassaliel
Hi,
Try this in the prep code and test it out :

my $trans = $self-TransactionObj;
my $ticket = $self-TicketObj;

my $cf_obj = RT::CustomField-new($RT::SystemUser);
my $queue = RT::Queue-new($RT::SystemUser);
my $OCFvs = new RT::ObjectCustomFieldValues($RT::SystemUser);
my $createrObj = RT::User-new($RT::SystemUser);

$createrObj = $self-TransactionObj-CreatorObj;

my $cf_name = ticketstatus;
my $cf_value = Closed [Orbit];

$queue-Load($self-TicketObj-QueueObj-Name);
$OCFvs-LimitToObject($self-TicketObj);

while (my $OCFv = $OCFvs-Next()) {
$cf_obj = $OCFv-CustomFieldObj;
if (lc $cf_obj-Name eq $cf_name) {
if ($self-TicketObj-Status eq 'resolved' and $queue-HasRight(Right 
= 'ModifyTicket',Principal = $createrObj)) {
$ticket-AddCustomFieldValue(Field=$cf_obj, Value=$cf_value, 
RecordTransaction=0) if ($OCFv-Content eq 'Created [Orbit]' or $OCFv-Content 
eq 'Updated [Orbit]') ;
}
}
}
return 1;

-Ashish

From: Chris Newcomb [ch...@eaglehawkonline.com]
Sent: Monday, March 09, 2009 10:21 PM
To: Potla, Ashish Bassaliel
Subject: Re: [rt-users] Scrip and custom field Help

Correct,

On resolving

if TicketStatus == Created[orbit] or Updated[Orbit] change set TicketStatus = 
Closed [Orbit]


--
Regards
Chris Newcomb

Potla, Ashish Bassaliel wrote:
 So the jist is On resolving ,
 if TicketStatus == Created[orbit] or Updated[Orbit] , the value of 
 TicketStatus should be set to Closed [Orbit]

 For anyother value of TicketStatus the value should be unchanged.

 Am I getting this right?

 -Ashish
 
 From: Chris Newcomb [ch...@eaglehawkonline.com]
 Sent: Monday, March 09, 2009 9:22 PM
 To: Potla, Ashish Bassaliel
 Subject: Re: [rt-users] Scrip and custom field Help

 In this CF there are the following values:

 Created [Orbit] - if this status when resolved needs to be Closed [Orbit].
 Updated [Orbit] - if this status when resolved needs it needs to be
 Closed [Orbit].
 Closed [Orbit]
 Non-Compliance [email] - never touches Created [Orbit] and never needs
 to be Closed [Orbit]
 Retraction [email] - never touches Created [Orbit] and never needs to be
 Closed [Orbit]
 non-network [email] - never touches Created [Orbit] and never needs to
 be Closed [Orbit]

 (I didn't setup this installation of rt)
 --
 Regards,
 Chris Newcomb


 Potla, Ashish Bassaliel wrote:

 I am a bit confused here. Let me see if I got this correct :

 On resolve, you want to set the custom field 'TicketStatus' to 
 'Closed[Orbit]' .. correct? In that case the scrip I gave should be 
 sufficient. Why do the other states of the CF come into picture?

 -Ashish
 
 From: Chris Newcomb [ch...@eaglehawkonline.com]
 Sent: Friday, March 06, 2009 1:59 AM
 To: Potla, Ashish Bassaliel
 Subject: Re: [rt-users] Scrip and custom field Help

 Thanks for your help.  I didn't think about the condition needing to
 check if it was on resolve and the ticket status is either Created
 [Orbit] or Updated [Orbit].  Any suggestions on what to try here?

 --
 Regards
 Chris

 Potla, Ashish Bassaliel wrote:


 Hi Chris,
 Try this:

 Condition : On resolve

 Custom Action Preparation Code :

 # set the CF Work-Completed Date

 my $trans = $self-TransactionObj;
 my $ticket = $self-TicketObj;
 my $cf_obj = RT::CustomField-new($RT::SystemUser);
 my $cf_name = TicketStatus;
 my $cf_value = Closed [Orbit];

 $cf_obj-LoadByName(Name=$cf_name);
 $RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n);
 $ticket-AddCustomFieldValue(Field=$cf_obj, Value=$cf_value,
 RecordTransaction=0);
 return 1;

 Custom cleanup code :
 return 1;

 -Ashish
 
 From: rt-users-boun...@lists.bestpractical.com 
 [rt-users-boun...@lists.bestpractical.com] On Behalf Of Chris Newcomb 
 [ch...@eaglehawkonline.com]
 Sent: Thursday, March 05, 2009 9:42 PM
 To: rt-users@lists.bestpractical.com
 Subject: [rt-users] Scrip and custom field Help

 I've googled and either my google fu is not working or I'm not finding
 the correct answer, and I barely know perl.

 Using RT 3.8.1 on freebsd using mysql

 Condition: On Resolve

 Action: is where I need help.

 I have a custom field named TicketStatus.  I want to on resolve set the
 custom field to be Closed [Orbit], usually the ticket status is either
 Created [Orbit] or Updated [Orbit].

 any pointers that you can give me would be great, either by telling me
 what to search for or giving me an idea of what to use to get the action
 done.

 --
 Thanks in advance
 Chris Newcomb

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

 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com


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











___
http

Re: [rt-users] Little help with template

2009-03-05 Thread Potla, Ashish Bassaliel
Is the ticket owner supposed to be the approver?

In that case use {eva{$self-OwnerObj-Name}}

-Ashishl

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Jim Tambling 
[jim.tambl...@datatote.co.uk]
Sent: Thursday, March 05, 2009 6:13 PM
To: rt-us...@bestpractical.com
Subject: [rt-users] Little help with template

Hi,

I should state I have no knowledge of Perl beforehand. I have a scrip that 
notifies the requestor when an approval ticket has been approved. This is the 
template;

Subject: Ticket Approved: {$Ticket-Subject}

Greetings,

Your ticket has been approved by { eval { $Approval-OwnerObj-Name } }.
Other approvals may be pending.


The requestor receives the email as shown below;


Greetings,

Your ticket has been approved by .
Other approvals may be pending.


Notice the distinct lack of the approver's name.


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Scrip and custom field Help

2009-03-05 Thread Potla, Ashish Bassaliel
Hi Chris,
Try this:

Condition : On resolve

Custom Action Preparation Code :

# set the CF Work-Completed Date

my $trans = $self-TransactionObj;
my $ticket = $self-TicketObj;
my $cf_obj = RT::CustomField-new($RT::SystemUser);
my $cf_name = TicketStatus;
my $cf_value = Closed [Orbit];

$cf_obj-LoadByName(Name=$cf_name);
$RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n);
$ticket-AddCustomFieldValue(Field=$cf_obj, Value=$cf_value, 
RecordTransaction=0);
return 1;

Custom cleanup code :
return 1;

-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Chris Newcomb 
[ch...@eaglehawkonline.com]
Sent: Thursday, March 05, 2009 9:42 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Scrip and custom field Help

I've googled and either my google fu is not working or I'm not finding
the correct answer, and I barely know perl.

Using RT 3.8.1 on freebsd using mysql

Condition: On Resolve

Action: is where I need help.

I have a custom field named TicketStatus.  I want to on resolve set the
custom field to be Closed [Orbit], usually the ticket status is either
Created [Orbit] or Updated [Orbit].

any pointers that you can give me would be great, either by telling me
what to search for or giving me an idea of what to use to get the action
done.

--
Thanks in advance
Chris Newcomb

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


[rt-users] Errors in apache logs after db migration.

2009-03-03 Thread Potla, Ashish Bassaliel
Hi All,
Over the weekend I have migrated the data on my db to another instance with the 
NLS_CHARSET to be AL32UTF8.

This I have done because, a new group of users from china has decided to use RT 
and they send emails with chinese characters in them. The db migration went 
well, I am able to see chinese characters getting stored in the db.

But when RT sends an email I see some problems crop up.

Scenario: 
On create
1. I have two scrips, one to notify admincc and one to send auto reply to 
requestor.
The auto replies are sent without any distortion but when it comes to the 
admincc email, the subject line is gibberish ie; its not chinese but some weird 
characters.

In the error_logs on apache I see a stack error as follows:

[Tue Mar  3 09:00:15 2009] [warning]: Use of uninitialized value in string eq 
at /opt/prj/rt/rt3/lib/RT/Record.pm line 1701. 
(/opt/prj/rt/rt3/lib/RT/Record.pm:1701)
[Tue Mar  3 09:00:22 2009] [error]: Could not convert attachment from assumed 
utf8 to 'gb2312' :Cannot decode string with wide characters at 
/opt/prj/rt/perl-5.8.8/lib/5.8.8/sun4-solaris-thread-multi/Encode.pm line 186.

Stack:
  [/opt/prj/rt/perl-5.8.8/lib/5.8.8/sun4-solaris-thread-multi/Encode.pm:186]
  [/opt/prj/rt/rt3/lib/RT/Attachment_Overlay.pm:300]
  [/opt/prj/rt/rt3/local/lib/RT/Action/SendEmail.pm:399]
  [/opt/prj/rt/rt3/local/lib/RT/Action/SendEmail.pm:140]
  [/opt/prj/rt/rt3/lib/RT/Action/Notify.pm:67]
  [/opt/prj/rt/rt3/lib/RT/ScripAction_Overlay.pm:234]
  [/opt/prj/rt/rt3/lib/RT/Scrip_Overlay.pm:478]
  [/opt/prj/rt/rt3/lib/RT/Scrips_Overlay.pm:239]
  [/opt/prj/rt/rt3/lib/RT/Transaction_Overlay.pm:173]
  [/opt/prj/rt/perl-5.8.8/lib/site_perl/5.8.8/Hook/LexWrap.pm:41]
  [/opt/prj/rt/rt3/lib/RT/Record.pm:1461]
  [/opt/prj/rt/rt3/lib/RT/Ticket_Overlay.pm:746]
  [/opt/prj/rt/rt3/lib/RT/Interface/Email.pm:730]
  [/opt/prj/rt/rt3/share/html/REST/1.0/NoAuth/mail-gateway:61] 
(/opt/prj/rt/rt3/lib/RT/Attachment_Overlay.pm:302)

This didnt happen when I was testing in development arena..  but is happening 
on production.
I have upgraded the Encode module to v2.26, the same I have on dev server.

I use: RT 3.6.5 on Oracle.
Any help or suggestions or thoughts wouldl be great!!

Best Regards,
-Ashish
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Scrip help needed on date formatting

2009-03-03 Thread Potla, Ashish Bassaliel
Hi,
Can you give some info about the CF you are using?
What is the type and validation settings on it?

-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Kenneth Crocker 
[kfcroc...@lbl.gov]
Sent: Wednesday, March 04, 2009 12:37 AM
To: rt Users
Subject: [rt-users] Scrip help needed on date formatting

To all,


I'm a newbie to perl. I've written a few simple scrips and they are
working just fine. My problem lies in my lack of understanding as to why
some code will work in a perl program, but not in a scrip. We have some
good perl programmers here and they gave me some code to use to format a
date I needed.
Scenario: when a ticket has it's status changed to 'stalled', I want to
update a Custom Field with the /mm/dd format for today's date. The
code I was given for this is as follows:

Custom Action Prep Code:
# set the CF Work-Completed Date

my $trans = $self-TransactionObj;
my $ticket = $self-TicketObj;
my $cf_obj = RT::CustomField-new($RT::SystemUser);
my $cf_name = Stalled Date;
( undef, undef, undef, $day, $mon, $year ) = localtime( time );
$cf_value = sprintf( '%d/%02d/%02d', $year + 1900, $mon, $day );

$cf_obj-LoadByName(Name=$cf_name);
$RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n);
$ticket-AddCustomFieldValue(Field=$cf_obj, Value=$cf_value,
RecordTransaction=0);

return 1;

I get nothing. If I change the value of $cf_value to simply
(localtime), I get the full-fledged format of Thu Feb 26 14:54:33 2009.
So, I know the condition works and the function of update the Custom
Field works. I just cannot get the code I was given to format the date
to work as a scrip.
Anyone have some experience with this and willing to help?


Kenn
LBNL

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Scrip help needed on date formatting

2009-03-03 Thread Potla, Ashish Bassaliel
Hey Ken,
localize the variables as follows and try it out :

my ( undef, undef, undef, $day, $mon, $year ) = localtime( time );
my $cf_value = sprintf( '%d/%02d/%02d', $year + 1900, $mon, $day );

-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Kenneth Crocker 
[kfcroc...@lbl.gov]
Sent: Wednesday, March 04, 2009 12:37 AM
To: rt Users
Subject: [rt-users] Scrip help needed on date formatting

To all,


I'm a newbie to perl. I've written a few simple scrips and they are
working just fine. My problem lies in my lack of understanding as to why
some code will work in a perl program, but not in a scrip. We have some
good perl programmers here and they gave me some code to use to format a
date I needed.
Scenario: when a ticket has it's status changed to 'stalled', I want to
update a Custom Field with the /mm/dd format for today's date. The
code I was given for this is as follows:

Custom Action Prep Code:
# set the CF Work-Completed Date

my $trans = $self-TransactionObj;
my $ticket = $self-TicketObj;
my $cf_obj = RT::CustomField-new($RT::SystemUser);
my $cf_name = Stalled Date;
( undef, undef, undef, $day, $mon, $year ) = localtime( time );
$cf_value = sprintf( '%d/%02d/%02d', $year + 1900, $mon, $day );

$cf_obj-LoadByName(Name=$cf_name);
$RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n);
$ticket-AddCustomFieldValue(Field=$cf_obj, Value=$cf_value,
RecordTransaction=0);

return 1;

I get nothing. If I change the value of $cf_value to simply
(localtime), I get the full-fledged format of Thu Feb 26 14:54:33 2009.
So, I know the condition works and the function of update the Custom
Field works. I just cannot get the code I was given to format the date
to work as a scrip.
Anyone have some experience with this and willing to help?


Kenn
LBNL

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Scrip help needed on date formatting

2009-03-03 Thread Potla, Ashish Bassaliel
Well, it worked for me!
Sorry.. keep tweaking it.

hope you have return 1; in the cleanup code as well.
-Ashish


From: Kenneth Crocker [kfcroc...@lbl.gov]
Sent: Wednesday, March 04, 2009 1:50 AM
To: Potla, Ashish Bassaliel
Cc: rt Users
Subject: Re: [rt-users] Scrip help needed on date formatting

Ashish,


Tried that. No joy.


Kenn
LBNL

On 3/3/2009 11:40 AM, Potla, Ashish Bassaliel wrote:
 Hey Ken,
 localize the variables as follows and try it out :

 my ( undef, undef, undef, $day, $mon, $year ) = localtime( time );
 my $cf_value = sprintf( '%d/%02d/%02d', $year + 1900, $mon, $day );

 -Ashish
 
 From: rt-users-boun...@lists.bestpractical.com 
 [rt-users-boun...@lists.bestpractical.com] On Behalf Of Kenneth Crocker 
 [kfcroc...@lbl.gov]
 Sent: Wednesday, March 04, 2009 12:37 AM
 To: rt Users
 Subject: [rt-users] Scrip help needed on date formatting

 To all,


 I'm a newbie to perl. I've written a few simple scrips and they are
 working just fine. My problem lies in my lack of understanding as to why
 some code will work in a perl program, but not in a scrip. We have some
 good perl programmers here and they gave me some code to use to format a
 date I needed.
 Scenario: when a ticket has it's status changed to 'stalled', I want 
 to
 update a Custom Field with the /mm/dd format for today's date. The
 code I was given for this is as follows:

 Custom Action Prep Code:
 # set the CF Work-Completed Date

 my $trans = $self-TransactionObj;
 my $ticket = $self-TicketObj;
 my $cf_obj = RT::CustomField-new($RT::SystemUser);
 my $cf_name = Stalled Date;
 ( undef, undef, undef, $day, $mon, $year ) = localtime( time );
 $cf_value = sprintf( '%d/%02d/%02d', $year + 1900, $mon, $day );

 $cf_obj-LoadByName(Name=$cf_name);
 $RT::Logger-debug(Loaded\$cf_obj-Name = . $cf_obj-Name() .\n);
 $ticket-AddCustomFieldValue(Field=$cf_obj, Value=$cf_value,
 RecordTransaction=0);

 return 1;

 I get nothing. If I change the value of $cf_value to simply
 (localtime), I get the full-fledged format of Thu Feb 26 14:54:33 2009.
 So, I know the condition works and the function of update the Custom
 Field works. I just cannot get the code I was given to format the date
 to work as a scrip.
 Anyone have some experience with this and willing to help?


 Kenn
 LBNL

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

 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com


 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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Fwd: A little Scrip help

2009-03-02 Thread Potla, Ashish Bassaliel
Hey Aaron,
You got it right, just a typo in your 'if' condition : Its ObjectId not 
ObjectID.

You can substitue this if condition with others as well like : 
$self-TicketObj-Id == $txn-ObjectId

But I feel yours should work once you correct your typo.

Cheers!
-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Aaron Guise 
[aa...@guise.net.nz]
Sent: Monday, March 02, 2009 5:28 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Fwd: A little Scrip help

This is the information I found in the database to support my thinking of the 
below solution.

id  ObjectType  ObjectIdTimeTaken   TypeField   
OldValueNewValueReferenceType   OldReferenceNewReference
DataCreator Created
341302  RT::Ticket  20263   0   AddLink MergedInto

fsck.com-rt://ham.sitel.co.nz/ticket/20219http://ham.sitel.co.nz/ticket/20219



52232   2009-02-26 23:19:46
341303  RT::Ticket  20219   0   AddLink MergedInto

fsck.com-rt://ham.sitel.co.nz/ticket/20219http://ham.sitel.co.nz/ticket/20219



52232   2009-02-26 23:19:46


On Mon, Mar 2, 2009 at 12:27 PM, Aaron Guise 
aa...@guise.net.nzmailto:aa...@guise.net.nz wrote:
Hi All,

I have investigated the possiblility of having the trigger rule out one of 
these transactions.  I have now come up with the below ammendment which I feel 
should work but we now get a total of 0 emails sent so I feel it is flawed. Any 
ideas?

CODE:
my $txn = $self-TransactionObj;
return 0 unless $txn-Type =~ /^AddLink$/i;
return 0 unless $txn-Field =~ /^MergedInto$/i;
if ($txn-NewValue =~ $txn-ObjectID)
{
return 1;
}
else
{
return 0;
}
return 1;

Regards,

Aaron Guise
[http://www.guise.net.nz/images/signatures/mob.gif]027 212 6638
[http://www.guise.net.nz/images/signatures/email.gif]aa...@guise.net.nzmailto:aa...@guise.net.nz



On Sat, Feb 28, 2009 at 6:25 AM, Potla, Ashish Bassaliel 
c_apo...@qualcomm.commailto:c_apo...@qualcomm.com wrote:
Hi,
When you merge two tickets , I think the condition you have defined is 
evaluating to a true condition for both the tickets individually.
When the action that is 'notify owner' takes place, in both cases the ticket 
that is retrieved by ID will be the same as the tickets are now merged(Merged 
tickets have same ID numbers,the one into which you merged a ticket into).

Anyways, try tweaking the condition a bit so that when two tickets are merged, 
the condition evaluates true only to one of them, preferably the one into which 
a ticket is merged.

-Ashish

From: 
rt-users-boun...@lists.bestpractical.commailto:rt-users-boun...@lists.bestpractical.com
 
[rt-users-boun...@lists.bestpractical.commailto:rt-users-boun...@lists.bestpractical.com]
 On Behalf Of Kenneth Crocker [kfcroc...@lbl.govmailto:kfcroc...@lbl.gov]
Sent: Friday, February 27, 2009 10:50 PM
To: Aaron Guise
Cc: rt-users@lists.bestpractical.commailto:rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Fwd: A little Scrip help

Aaron,


   Well, I'm at a loss as well. Sorry.


Kenn
LBNL

On 2/26/2009 4:58 PM, Aaron Guise wrote:
  I thought of this scenario already,  but I created the ticket from
 another external email address which is separate from my work one which
 RT Responds to. I am the owner of the ticket data is merged with and
 hence I get one email but I have a feeling it may be emailing twice as
 there is two tickets which become one and effectively I become the owner
 of both.

 But it reports the ID# of the only remaining ticket in both emails.

 On Fri, Feb 27, 2009 at 12:57 PM, Kenneth Crocker 
 kfcroc...@lbl.govmailto:kfcroc...@lbl.gov
 mailto:kfcroc...@lbl.govmailto:kfcroc...@lbl.gov wrote:

 Aaron,


Are the persons getting the Email in more than 1 role? FOr
 example; If I am the Requestor  the Owner and someone merges a
 ticket into mine am I getting 1 email as requestor and 1 as owner?
 Just a thought.

 Kenn
 LBNL


 On 2/26/2009 3:17 PM, Aaron Guise wrote:



 -- Forwarded message --
 From: *Aaron Guise* aa...@guise.net.nzmailto:aa...@guise.net.nz
 mailto:aa...@guise.net.nzmailto:aa...@guise.net.nz 
 mailto:aa...@guise.net.nzmailto:aa...@guise.net.nz
 mailto:aa...@guise.net.nzmailto:aa...@guise.net.nz
 Date: Fri, Feb 27, 2009 at 12:17 PM
 Subject: Re: [rt-users] A little Scrip help
 To: Kenneth Crocker kfcroc...@lbl.govmailto:kfcroc...@lbl.gov
 mailto:kfcroc...@lbl.govmailto:kfcroc...@lbl.gov 
 mailto:kfcroc...@lbl.govmailto:kfcroc...@lbl.gov
 mailto:kfcroc...@lbl.govmailto:kfcroc...@lbl.gov


 Yeah, Have double checked all of those scrips/templates again.
  The only one that nets an output matching that is the
 MergeNotifier Template.  Looking in the RT

Re: [rt-users] Requestors being sent comments when updated via email

2009-02-28 Thread Potla, Ashish Bassaliel
what is the  comment address set a queue level? is it the correct one?

secondly how do you filter incoming emails and forward to RT? I use procmail. I 
have two filters configured for each queue in .procmailrc .
So for one queue, I have :
1. If To is correspond address of the queue call rt mailgate with the email 
and action as --correspond
2. If To is comment address of the queue call rt mailgate with the email and 
action as --comment

Check this filtering to see if an incoming email from comment address is 
addressed by your filtering application properly.

-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Brandon Rogge 
[brand...@bandcon.com]
Sent: Saturday, February 28, 2009 9:15 AM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Requestors being sent comments when updated via email

The problem I am having is that when someone sends a comment via email, the 
comment is being sent to the requestor.
I can see that the script ‘on correspond notify requestors and CCs with global 
template correspondence’ is causing this even though the comment is being sent 
to RT using the comment email address.  If this script is removed then replying 
to a ticket via the web interface doesn’t work as the requestors email address 
is not used automatically.  CorrespondAddress  and CommentAddress  are both set 
in RT_SiteConfig.pm we are using version 3.8.2.

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Fwd: A little Scrip help

2009-02-27 Thread Potla, Ashish Bassaliel
:

   If set to transaction batch which is marked
 Transaction
   Batch(Disabled) it seems the script is just
 disabled as
no email
   is sent.

   On Fri, Feb 27, 2009 at 1:32 AM, Potla, Ashish
 Bassaliel
   c_apo...@qualcomm.com
 mailto:c_apo...@qualcomm.com mailto:c_apo...@qualcomm.com
 mailto:c_apo...@qualcomm.com
mailto:c_apo...@qualcomm.com
 mailto:c_apo...@qualcomm.com mailto:c_apo...@qualcomm.com
 mailto:c_apo...@qualcomm.com
   mailto:c_apo...@qualcomm.com
 mailto:c_apo...@qualcomm.com
mailto:c_apo...@qualcomm.com
 mailto:c_apo...@qualcomm.com mailto:c_apo...@qualcomm.com
 mailto:c_apo...@qualcomm.com
mailto:c_apo...@qualcomm.com
 mailto:c_apo...@qualcomm.com

   wrote:


  
  From: Potla, Ashish Bassaliel
  Sent: Thursday, February 26, 2009 5:59 PM
  To: Aaron Guise
  Subject: RE: [rt-users] A little Scrip help

  Is the scrip set to 'Transaction Batch' or
'Transaction Create'?
  Set it to Transaction Batch.

  -Ashish
  
  From: rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
   mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com

  mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
   mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com

  [rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
   mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com

  mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
   mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com
mailto:rt-users-boun...@lists.bestpractical.com
 mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of
  Aaron Guise [aa...@guise.net.nz
 mailto:aa...@guise.net.nz
mailto:aa...@guise.net.nz mailto:aa...@guise.net.nz
 mailto:aa...@guise.net.nz mailto:aa...@guise.net.nz
mailto:aa...@guise.net.nz mailto:aa...@guise.net.nz
   mailto:aa...@guise.net.nz
 mailto:aa...@guise.net.nz mailto:aa...@guise.net.nz
 mailto:aa...@guise.net.nz
mailto:aa...@guise.net.nz mailto:aa...@guise.net.nz
 mailto:aa...@guise.net.nz mailto:aa...@guise.net.nz]


  Sent: Thursday, February 26, 2009 4:02 PM
  To: rt-users@lists.bestpractical.com
 mailto:rt-users@lists.bestpractical.com
mailto:rt-users@lists.bestpractical.com
 mailto:rt-users@lists.bestpractical.com
   mailto:rt-users@lists.bestpractical.com
 mailto:rt-users@lists.bestpractical.com
mailto:rt-users@lists.bestpractical.com
 mailto:rt-users@lists.bestpractical.com
  mailto:rt-users@lists.bestpractical.com
 mailto:rt-users@lists.bestpractical.com
mailto:rt-users@lists.bestpractical.com
 mailto:rt-users@lists.bestpractical.com
   mailto:rt-users@lists.bestpractical.com
 mailto:rt-users@lists.bestpractical.com
mailto:rt-users@lists.bestpractical.com
 mailto:rt

Re: [rt-users] A little Scrip help

2009-02-26 Thread Potla, Ashish Bassaliel


From: Potla, Ashish Bassaliel
Sent: Thursday, February 26, 2009 5:59 PM
To: Aaron Guise
Subject: RE: [rt-users] A little Scrip help

Is the scrip set to 'Transaction Batch' or 'Transaction Create'?
Set it to Transaction Batch.

-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Aaron Guise 
[aa...@guise.net.nz]
Sent: Thursday, February 26, 2009 4:02 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] A little Scrip help

Hi,

I have implemented a scrip to notify the owner in the event someone else merges 
data into one of their tickets.  All works well but alas it actually sends the 
notification twice.  There is probably a real simple answer but it is baffling 
me.  Have just ignored it the last few months but now I am a little beyond that.

The scrip used is noted below;

my $txn = $self-TransactionObj;
return undef unless $txn-Type =~ /^AddLink$/i;
return undef unless $txn-Field =~ /^MergedInto$/i;
return 1;

Any assistance in stopping this will be greatly appreciated.

--
Regards

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


[rt-users] Long queue name coming out of frame on homepage

2009-02-24 Thread Potla, Ashish Bassaliel
Hi,
I am using RT 3.8.2, and I have a problem on the homepage.

The length of the name of many of my queues are quite long(they follow a naming 
convention which tends to add a '.help' to the queue name) that it juts out of 
the the left frame, where we see tabs like homepage,configuration etc..

Earlier in 3.6, I didnt have this problem because the layout was different. I 
tried a lot to wrap the text, but in firefox which is the browser many ppl here 
use, I am unable to do so.

Can anyone help me out here?

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Global CustomField not displaying

2009-02-17 Thread Potla, Ashish Bassaliel
Hi
Did you apply the group-rights and the user-rights with ShowCustomField and 
ModifyCustomField rights?
Might be worth a look.

-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Jim Tambling 
[jim.tambl...@datatote.co.uk]
Sent: Tuesday, February 17, 2009 5:42 PM
To: rt-us...@bestpractical.com
Subject: [rt-users] Global CustomField not displaying

Hello

I have created a custom field to appear in all tickets. I have enabled it 
globally for all queues but it does not appear in any new ticket. Where am I 
going wrong?

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] User defined Condition: Autoclose

2009-02-12 Thread Potla, Ashish Bassaliel
Try this in the custom condition:

if ( $self-TicketObj-RequestorAddresses eq 'vad...@gmail.com') {
return 1;
} esle {
return 0;
}

-Ashish

From: rt-users-boun...@lists.bestpractical.com 
[rt-users-boun...@lists.bestpractical.com] On Behalf Of Asif Iqbal 
[vad...@gmail.com]
Sent: Friday, February 13, 2009 12:32 AM
To: rt-users Users; rt-de...@lists.bestpractical.com
Subject: Re: [rt-users] User defined Condition: Autoclose

On Thu, Feb 12, 2009 at 1:17 PM, Asif Iqbal vad...@gmail.com wrote:
 How do I define a condition where requestor address is 'u...@example'
 com? I will use this condition to close a ticket

 In chapter 6.1.3 Conditions of RT Essentials by Oreilly I see
 something like this

 $self-TicketObj-status eq 'deleted';

 and

 my $email = $self-TicketObj-RequestorAddresses[0]

 So can I have a user defined condition like this?

 $self-TicketObj-RequestorAddresses eq 'u...@example.com' ?

 Is that a valid syntax ?

I tried to setup like this thru web but it does not resolve the
ticket. What am I doing wrong?

Description: AutoClose
Condition: User Defined
Action: User Defined
Template: Global template: Autoreply
Stage: TransactionCreate

Custom condition:
$self-TicketObj-RequestorAddresses eq 'vad...@gmail.com';

Custom action preparation code:
return 1;

Custom action cleanup code:
$self-TicketObj-SetStatus resolved;

I see it create a ticket but it does not autoclose it




 --
 Asif Iqbal
 PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
 A: Because it messes up the order in which people normally read text.
 Q: Why is top-posting such a bad thing?




--
Asif Iqbal
PGP Key: 0xE62693C5 KeyServer: pgp.mit.edu
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


[rt-users] Using RT with non-English (foreign characters) Emails

2009-01-20 Thread Potla, Ashish Bassaliel
Hello Everyone,

Has anybody here used RT with non-English Emails? I am trying to set up a queue 
for incoming Chinese Emails as requests.

But all I see in the content of the mail sent to AdminCCs by RT is '?' marks.

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Using RT with non-English (foreign characters) Emails

2009-01-20 Thread Potla, Ashish Bassaliel
For the plaintext email: I see '?' marks where ever I expect to see the foreign 
characters.
For the HTML Email : I have two Download buttons one for text/plain and another 
for text/html.
The text/plain is similar to the previous test; '?' marks instead of foreign 
characters, But the text/html clearly displays the foreign characters.

Is this the extent of RT`s support for foreign characters?
The Subject in any case contains '?' marks where foreign characters are 
expected.
-Ashish


From: Jerrad Pierce [jpie...@cambridgeenergyalliance.org]
Sent: Wednesday, January 21, 2009 1:32 AM
To: Potla, Ashish Bassaliel
Cc: Emmanuel Lacour; rt-us...@bestpractical.com
Subject: Re: [rt-users] Using RT with non-English (foreign characters) Emails

What do you see when you use the link to download/view the raw transaction?

--
Cambridge Energy Alliance: Save money. Save the planet.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


[rt-users] Foreign Language Emails Support

2009-01-16 Thread Potla, Ashish Bassaliel
Hello All,

I am setting up a queue thats primarily going to be used by users in China. 
Therefore the incoming emails contain foreign characters.

But when RT forwards the email messages, the chinese characters are transformed 
to a bunch of '?' characters.

My question is :
1. Do I need to tweak the RT code in order to support foreign characters in 
emails?
2. Is it a database issue?

I am not good at the database admin stuff but I got one here who can understand 
what you guys might probably have to say.
Currently the Oracle 10 database parameters that I use is as:
CHARSET -- AL32UTF8
NCHARSET --AL16UTF16

NOTE: The language of the web interface is English and unchanged.
Thanks in advance.

-Ashish
IT Consultant
Qualcomm
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


[rt-users] Problem viewing metrics.html

2008-11-04 Thread Potla, Ashish Bassaliel
Hello List,
I have just isolated an issue that I faced in IE 6 but not FF.

When I view the /rt/Tools/Reports/metrics.html on IE-6 it(the browser) crashes 
but the same works on FireFox.

This I noticed with version 3.6.5 and 3.8.1 as well.

Can someone who has some idea about this help out? (I have a feeling it has 
something to do with calendar)

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

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] Information regarding Mason Components and CSS in StyleGuide.pod

2008-09-03 Thread Potla, Ashish Bassaliel
Hi Jesse,
I was going through StyleGuide and I see that the info for the Mason component 
style and CSS is not yet given. I am trying to understand the flow of the Mason 
compnents , CSS for RT and would appreciate it if you (or anyone for that 
matter) can give me some guidance or resources that you might have for 
understanding it.

I have just started with this project and I have decent knowledge of OO Perl 
and just started with MASON.

Thanks in advance.

-Ashish
IT Consultant
Qualcomm
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

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] Enable Clickable Hyperlinks in Email

2008-07-11 Thread Potla, Ashish Bassaliel
Hi,

We are having an issue when using HTML-enabled tickets. In particular,if a 
ticket is e-mailed containing HTML, the global QCTTransaction template (which 
adds the footer information about the ticket with a linkto the ticket) is not 
applied.

If we disable HTML for the queue, it works just fine.
If we send an e-mail in plain text with HTML-enabled on the queue, it works 
just fine.

But, if we send an HTML e-mail with HTML-enabled on the queue, then the 
QCTTransaction footer is not added to (or maybe not visible in) the outgoing 
e-mail (this is anytime, both on create and on later transactions).

Is this something that can be fixed? Thanks for the help!

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

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