[rt-users] Problems with Scrip #5 - On Correspond Notify AdminCcs

2012-09-05 Thread Jennifer Koermer
All,

We've just upgrade to 4.0.6 and are experiencing some issues with 
notifications.  The current issue is with Scrip #5.  When a priviliged user 
responds to the ticket via email, Scrip #5 runs and notifications are sent to 
AdminCCs.  When a unpriviliged user (i.e. the requestor) responds to the ticket 
via email, the correspondence is added to the ticket history, but notifications 
are not actually sent out to AdminCCs.  I upped the logs and did a side by side 
comparison of responses via email from a priviliged user and unprivliged user.  
I've highlighted the main difference that I see in red.

[Thu Sep  6 00:50:23 2012] [debug]: Found 4 scrips for TransactionBatch stage 
with applicable type(s) Correspond for txn #1421196 on ticket #162291 
(/opt/rt4/sbin/../lib/RT/Scrips.pm:425)
[Thu Sep  6 00:50:23 2012] [debug]: Scrip #5: Checking Transaction Type: 
Correspond ((eval 1554):10)
[Thu Sep  6 00:50:23 2012] [debug]: Scrip #5: Owner = 
RT::Ticket=HASH(0x7f8a8704f708)->Owner ((eval 1554):11)
[Thu Sep  6 00:50:23 2012] [debug]: Scrip #5: Requestor = 
unprivile...@domain.com ((eval 1554):12)
[Thu Sep  6 00:50:23 2012] [debug]: Scrip #5: Actor = 
privili...@domain.com ((eval 1554):13)
[Thu Sep  6 00:50:23 2012] [debug]: Scrip #5: Ticket ID = 
RT::Ticket=HASH(0x7f8a8704f708)->ID ((eval 1554):14)
[Thu Sep  6 00:50:23 2012] [debug]: Scrip #5: Correspondence.  Checking 
content. ((eval 1554):16)
[Thu Sep  6 00:50:23 2012] [debug]: Scrip #5: Content does not begin with --.  
Returning 1. ((eval 1554):18)
[Thu Sep  6 00:50:23 2012] [info]: >  Scrip #57 - Check Exception On Create 
Notify ((eval 1580):10)
[Thu Sep  6 00:50:23 2012] [debug]: Skipping Scrip #57 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:247)
[Thu Sep  6 00:50:23 2012] [debug]: Skipping Scrip #2 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:247)
[Thu Sep  6 00:50:23 2012] [debug]: Skipping Scrip #10 because it isn't 
applicable (/opt/rt4/sbin/../lib/RT/Scrips.pm:247)
[Thu Sep  6 00:50:23 2012] [debug]: Committing scrip #5 on txn #1421196 of 
ticket #162291 (/opt/rt4/sbin/../lib/RT/Scrips.pm:192)
[Thu Sep  6 00:50:23 2012] [debug]: Calling SetRecipientDigests for transaction 
RT::Transaction=HASH(0x7f8a940f7d00), id 1421196 
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:651)
[Thu Sep  6 00:50:23 2012] [debug]: Working on mailfield Cc; recipients are  
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:667)
[Thu Sep  6 00:50:23 2012] [debug]: Subject: RE: [DevOps #162291] Resolved: 
Test Ticket - Correspondence
From: "Privileged User" mailto:r...@rt.domain.com>>>
Reply-To: RT mailto:r...@rt.domain.com>>
In-Reply-To: 
mailto:randomt...@emailserver.domain.com>>
References: rt-ticket-162...@domain.com 
,mailto:randomt...@emailserver.domain.com>,>
 mailto:randomt...@emailserver.domain.com>>
Message-ID: 
mailto:rt-4.0.6-753-1346892623-1068.162291-...@prg.com>x...@domain.com>
Precedence: bulk
X-RT-Loop-Prevention: domain.com
RT-Ticket: domain.com #162291
Managed-by: RT 4.0.6 (http://www.bestpractical.com/rt/)
RT-Originator: priviligedu...@domain.com
Bcc: List of AdminCcs

To: "AdminCc of domain.com Ticket No. 162291":;
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8 (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:674)
[Thu Sep  6 00:50:23 2012] [debug]: Removing deferred recipients from Cc: line 
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:697)
[Thu Sep  6 00:50:23 2012] [debug]: Setting deferred recipients for attribute 
creation (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:706)

When the priviliged user responds to a ticket via email, Bcc: and To: are 
listed as part of the email.  When a non-priviliged user responds, these lines 
are just missing.  Eventually, I see the following line when I'l looking at the 
output from an unpriviliged user:

[Thu Sep  6 00:50:01 2012] [debug]: Setting deferred recipients for attribute 
creation (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:706)
[Thu Sep  6 00:50:01 2012] [debug]: No recipients found for deferred delivery 
on transaction #1421195 (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:719)
[Thu Sep  6 00:50:01 2012] [info]: 
mailto:rt-4.0.6-784-randomt...@domain.com>> 
#162291/1421195 - Scrip 5 On Correspond Notify AdminCcs 
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:308)
[Thu Sep  6 00:50:01 2012] [info]: 
mailto:rt-4.0.6-784-randomt...@domain.com>> 
No recipients found. Not sending. 
(/opt/rt4/sbin/../lib/RT/Interface/Email.pm:353)

I've customized the actions in Scrip #5 so that email that are empty and begin 
with --(the signature bit in rt) are not sent.  However, I've updated it back 
to just condition: Correspondence, and saw the exact same results.

I've updated permssions, as I originally thought this was a permissions issue.  
The queue that I've been tested allows "Ev

Re: [rt-users] Question about REST interface and status

2012-06-21 Thread Jennifer Koermer
I’m using a C# web site and request to create tickets as well.
I’m using the AppendLine function of a stringbuilder object in C#.  I ended up 
adding doing a find and replace on my comment and removing \n before I send the 
request.
Msg.ToString().Replace("\n", "")

This might not be the most elegant solution, but it is working for me.
-Jennifer

From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Jeff Konnen
Sent: Thursday, June 21, 2012 1:25 PM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Question about REST interface and status

does anybody use REST to create tickets in RT
am I the onlyone having this carriagereturn issue?

--
Jeff Konnen


On Monday 18 June 2012 at 07:51, Jeff Konnen wrote:
Hi,
this is the way we are creating the ticket, by using a HTML form:


http://xxx/REST/1.0/ticket/new/";>
  User: 
  Pass: 
  Content: id: new
Text: This is the ticket text
Subject: This is my ticket
Status: resolved
Queue: 6
  



Thanks
Jeff
On Sat, Jun 16, 2012 at 2:19 AM, Kevin Falcone 
mailto:falc...@bestpractical.com>> wrote:

On Fri, Jun 15, 2012 at 11:23:27PM +0200, Jeff Konnen wrote:
># Could not create ticket.
># Status 'resolved
>' isn't a valid status for tickets in this queue.
>
>Is this error due to the carriage return and how can I avoid it?
There's a good chance that it dislikes the carriage return.
However, we'd need to know how you're creating the ticket and what
you're sending across the wire to make suggestions.

-kevin



--
Jeff Konnen



Re: [rt-users] mail AdminCC when moving ticket from queue to queue

2012-06-21 Thread Jennifer Koermer
You can create a global scrip with the following:
[cid:image001.png@01CD4FAF.B7D19810]

I created a customized template that also includes the first content on the 
ticket, this makes it a little easier to keep track of what the ticket is 
actually about without needing to log into the system.  Here is my template 
content:

RT-Attach-Message: yes


{$Transaction->CreatedAsString}: Request {$Ticket->id} was acted upon.
Transaction: {$Transaction->Description}
   Queue: {$Ticket->QueueObj->Name}
 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject 
given)"}
   Owner: {$Ticket->OwnerObj->Name}
  Requestors: {$Ticket->RequestorAddresses}
  Status: {$Ticket->Status}
Ticket Config->Get('WebURL')}Ticket/Display.html?id={$Ticket->id} >


Transaction Content:
--
{$Transaction->Content()}

Original Ticket Content:
------
{$Ticket->Transactions->First->Content()}

Jennifer Koermer
System Administrator IV


Production Resource Group, LLC
915 Secaucus Road, Secaucus, NJ 07094
201-758-4349 phone
201-758-4350 fax
201-232-7691 cell
jkoer...@prg.com<mailto:jkoer...@prg.com>
www.prg.com<http://www.prg.com/>

From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Asanka Gunasekera
Sent: Thursday, June 21, 2012 1:08 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] mail AdminCC when moving ticket from queue to queue

Hi, how do I get the RT to send a mail to AdminCC when moving a ticket from one 
queue to another

Thanks and Regards
<>

Re: [rt-users] Too Many Notifications for Approvals

2012-06-07 Thread Jennifer Koermer
We have a list of approvers and require approval from only one. we set that 
approver as the owner automatically when the ticket is approved. This makes it 
easier to track in the parent ticket. thanks.
i updated the file and commented out the comment ...but think i will switch 
over to this method instead.

Kevin Falcone  wrote:


On Thu, May 31, 2012 at 05:24:32PM +, Jennifer Koermer wrote:
>We are using RT 3.8.4.  We've implemented approvals, and in general think 
> it is working.  We
>have the following issue however:
>
>Approval has been approved and the ticket is set to resolved.
>
>Another approver sends an email comment which opens the approval.
>
>The owner is sent an email using the template "New Pending Approval".  The 
> approve again,
>tickets resolves, ticket reopens, and a new email using "New Pending 
> Approval" gets
>sent...needless to say we have some frustrated users.
>
>Is there a way to just block the "New Pending Approval"?  When the ticket 
> is created, an email
>is automatically sent.  We are not using multiple approvals and cannot see 
> where the
>NewPending.pm approval would be used in our situation.
>
>It looks like NewPending.pm is what is creating the email using that 
> approval.  Can I just
>delete lib/RT/ Approval/Rule/NewPending.pm?

If you do that, approvals will break catastrophically.

Just make the New Pending Approval blank, RT doesn't send emails if
the template in use is blank.

It is interesting that you're using Owners of approval tickets (who
are typically the Approvers) AND have multiple approvers (which
generally means you're using AdminCcs).

-kevin



[rt-users] Too Many Notifications for Approvals

2012-05-31 Thread Jennifer Koermer
Hello,

We are using RT 3.8.4.  We've implemented approvals, and in general think it is 
working.  We have the following issue however:

Approval has been approved and the ticket is set to resolved.
Another approver sends an email comment which opens the approval.
The owner is sent an email using the template "New Pending Approval".  The 
approve again, tickets resolves, ticket reopens, and a new email using "New 
Pending Approval" gets sent...needless to say we have some frustrated users.

Is there a way to just block the "New Pending Approval"?  When the ticket is 
created, an email is automatically sent.  We are not using multiple approvals 
and cannot see where the NewPending.pm approval would be used in our situation.
It looks like NewPending.pm is what is creating the email using that approval.  
Can I just delete lib/RT/ Approval/Rule/NewPending.pm?

Best Regards,

Jennifer Koermer


[rt-users] Errors with exim Mail

2012-05-08 Thread Jennifer Koermer
We have a scrip that we have custom configured on a queue that creates AdminCC 
and CC.  We've disabled the global scrip for the queue using the following 
custom code (including this code because someone else might find it a very 
helpful way to disable global scrips on a queue by queue basis):
my @exceptionQueue = ('___Approvals');
my $transactionType = $self->TransactionObj->Type;
my $queue = $self->TicketObj->QueueObj->Name;
if ($transactionType eq 'Create') {
  return if grep { $queue eq ($_) } @exceptionQueue;
  return 1;
}
return;

This all appears to be working great, but sometimes we receive the following 
error:
[Tue May  8 12:24:41 2012] [crit]: 
:  Could not send mail 
with command `/usr/sbin/exim -oi -t`: program unexpectedly closed pipe at 
/usr/lib/rt/RT/Interface/Email.pm line 408,  line 33.

I've done some testing, and I have created the same exact ticket in RT multiple 
times that should send out the same exact notifications.  Sometimes the 
notifications are sent and sometimes I get the error above.  Anyone have any 
ideas as to why this might work sometimes but not others?

We are using:
RT 3.8.4

The process that I am seeing this issue in is a little complex:

1) Create a Master Work Ticket in a request queue.

2) On creation, custom fields are checked and up to 5 different approval 
tickets are created based on the supplied information.  AdminCC and CC are sent 
out (using scrips & templates in the ___Approval queue) on creation of the 
approval ticket.

I'm working on implementing a number of changes on my production box.  All of 
my testing is currently on my dev box.  I'm not actually sending/receiving any 
emails at this point in time, only looking in the ticket history to see if the 
correct email was generated.  I'm not seeing the same issues on my production 
box.  Any ideas?

-Jennifer
[Tue May  8 12:24:41 2012] [debug]: Committing scrip #149 on txn #718706 of 
ticket #135333 (/usr/lib/rt/RT/Scrips_Overlay.pm:190)
[Tue May  8 12:24:41 2012] [debug]: Calling SetRecipientDigests for transaction 
RT::Transaction=HASH(0x2afbdd30fec0), id 718706 
(/usr/lib/rt/RT/Action/SendEmail.pm:635)
[Tue May  8 12:24:41 2012] [debug]: Working on mailfield Cc; recipients are 
em...@domain.com,em...@domain.com (/usr/lib/rt/RT/Action/SendEmail.pm:651)
[Tue May  8 12:24:41 2012] [debug]: Subject: [domain.com #135333] Travel 
Approval for Test TestEU3 (Parent #135329)
From: "The RT System itself" 
Reply-To: r...@rt.domain.com
In-Reply-To:
References: 
Message-ID: 
Precedence: bulk
X-RT-Loop-Prevention: domain.com
RT-Ticket: domain.com #135333
Managed-by: RT 3.8.4 (http://www.bestpractical.com/rt/)
Cc: em...@domain.com, em...@domain.com
To: "Cc of domain.com Ticket #135333"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8 (/usr/lib/rt/RT/Action/SendEmail.pm:658)
[Tue May  8 12:24:41 2012] [debug]: Got user mail preference 'Individual 
messages' for user em...@domain.com (/usr/lib/rt/RT/Action/SendEmail.pm:672)
[Tue May  8 12:24:41 2012] [debug]: Got user mail preference 'Individual 
messages' for user em...@domain.com (/usr/lib/rt/RT/Action/SendEmail.pm:672)
[Tue May  8 12:24:41 2012] [debug]: Removing deferred recipients from Cc: line 
(/usr/lib/rt/RT/Action/SendEmail.pm:681)
[Tue May  8 12:24:41 2012] [debug]: Setting deferred recipients for attribute 
creation (/usr/lib/rt/RT/Action/SendEmail.pm:690)
[Tue May  8 12:24:41 2012] [debug]: Working on mailfield Bcc; recipients are  
(/usr/lib/rt/RT/Action/SendEmail.pm:651)
[Tue May  8 12:24:41 2012] [debug]: Subject: [domain.com #135333] Travel 
Approval for Test TestEU3 (Parent #135329)
From: "The RT System itself" 
Reply-To: r...@rt.domain.com
In-Reply-To:
References: 
Message-ID: 
Precedence: bulk
X-RT-Loop-Prevention: domain.com
RT-Ticket: domain.com #135333
Managed-by: RT 3.8.4 (http://www.bestpractical.com/rt/)
Cc: em...@domain.com, em...@domain.com
To: "Cc of domain.com Ticket #135333"
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset="utf-8"
X-RT-Original-Encoding: utf-8 (/usr/lib/rt/RT/Action/SendEmail.pm:658)
[Tue May  8 12:24:41 2012] [debug]: Removing deferred recipients from Bcc: line 
(/usr/lib/rt/RT/Action/SendEmail.pm:681)
[Tue May  8 12:24:41 2012] [debug]: Setting deferred recipients for attribute 
creation (/usr/lib/rt/RT/Action/SendEmail.pm:690)
[Tue May  8 12:24:41 2012] [debug]: No recipients found for deferred delivery 
on transaction #718706 (/usr/lib/rt/RT/Action/SendEmail.pm:703)
[Tue May  8 12:24:41 2012] [info]: 
 #135333/718706 - Scrip 
149 On Create Notify CC's (/usr/lib/rt/RT/Action/SendEmail.pm:302)
[Tue May  8 12:24:41 2012] [crit]: 
: Could not send mail 
with command `/usr/sbin/exim -oi -t`: program unexpectedly closed pipe at 
/usr/lib/rt/RT/Interface/Email.pm line 408,  line 33.

Stack:
  [/usr/lib/rt/RT/Interface/Email.pm:408]
  [/usr/lib64/perl5/5.8.8/x86_64-linux-thread-multi/IO/Handle.pm:403]
  [/us

[rt-users] RT-Extension-QueueDeactivatedScrips

2011-09-01 Thread Jennifer Koermer
I attempted to install this extension and did not notice any errors. Downloaded 
today from Github.
RT Version: 3.8.4
Database is Postrges 8.1

I cleared the mason cache and restarted apache and I receive the following 
errors when I attempt to actually disable a scrip on a queue.

[Thu Sep  1 19:14:25 2011] [warning]: DBD::Pg::st execute failed: ERROR:  
relation "queuedeactivatedscrips" does not exist 
(/usr/lib/perl5/site_perl/5.8.8/DBIx/SearchBuilder/Handle.pm:509)

[Thu Sep  1 19:14:25 2011] [warning]: RT::Handle=HASH(0x2b8ee9e625b0) couldn't 
execute the query 'SELECT  * FROM QueueDeactivatedScrips WHERE ScripId = ? AND 
QueueId = ?' at /usr/lib/perl5/site_perl/5.8.8/DBIx/SearchBuilder/Handle.pm 
line 522

I'm also thinking about upgrading to RT 4, has anyone tried this patch on RT4 
yet?

-Jennifer Koermer


RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA — September 26 & 27, 2011
*  San Francisco, CA, USA — October 18 & 19, 2011
*  Washington DC, USA — October 31 & November 1, 2011
*  Melbourne VIC, Australia — November 28 & 29, 2011
*  Barcelona, Spain — November 28 & 29, 2011

[rt-users] Questions about ColumnMap, Sorting & Excel

2011-08-25 Thread Jennifer Koermer
All,

We are looking to try to customize RT to get a little additional information 
out of it easily.  We are most interested in SLAs.  I've created a custom 
ColumnMap that adds the following:
Response Time - Time between when the ticket was created and 
the when the ticket was "Started".  Started gets set via script on first 
responseif it is not already set.
Resolve Time - Time between when the ticket was created and 
when the ticket was "Resolved"
Shift - We rotate coverage, this tracks who should initially 
have been responsible for the ticket based on time of day.

I've also add the custom searches to the BuildFormatString.  This helps tell us 
a great deal about the ticket, but I would like to do more with this 
information.

Can I add the ability to Sort or Add Criteria using custom values?

When I click on the field to sort by the customized column, the tickets all 
disappear.  Is it possible to sort tickets based on a custom ColumnMap 
(calculated from the ticket values)?  Is it possible to create customized 
searches base on customized fields (calculated from the ticket values)?  Is it 
possible to export these values to Excel?

I know I could make this all work with Custom Fields, but I do not want to give 
our users the ability to change this informationbut that just seems a 
little messy.

-Jennifer

RT Training Sessions (http://bestpractical.com/services/training.html)
*  Chicago, IL, USA — September 26 & 27, 2011
*  San Francisco, CA, USA — October 18 & 19, 2011
*  Washington DC, USA — October 31 & November 1, 2011
*  Melbourne VIC, Australia — November 28 & 29, 2011
*  Barcelona, Spain — November 28 & 29, 2011

Re: [rt-users] Template Help

2011-01-20 Thread Jennifer Koermer
I just tried that, still didn't work.  I was able to include it into the 
AdminCCTransaction template and it works.  But it just doesn't seem to work for 
me when I tried it as part of a template to create a child ticket.  I've gotten 
around it by modifying the template that is used in the scrip On Create Notify 
AdminCcs.  This works, it just means that the formatting is not completely 
ideal.

From: adam brown [mailto:ajax...@yahoo.com]
Sent: Thursday, January 20, 2011 1:26 PM
To: rt-users@lists.bestpractical.com; Jennifer Koermer
Subject: Re: [rt-users] Template Help

Did you try just {$Ticket->id}? Works for me.

 
   Request {$Ticket->id} 
was been created on {$Transaction->CreatedAsString}


--- On Thu, 1/20/11, Jennifer Koermer 
mailto:jkoer...@prg.com>> wrote:

From: Jennifer Koermer mailto:jkoer...@prg.com>>
Subject: Re: [rt-users] Template Help
To: "rt-users@lists.bestpractical.com<mailto:rt-users@lists.bestpractical.com>" 
mailto:rt-users@lists.bestpractical.com>>
Date: Thursday, January 20, 2011, 1:06 PM
I'd still be interested in using this if there was an easy way to deal with 
this.  I ended up creating a custom scrip and template in the __Approvals 
queue.  I've added the line below to the template and it now allows people to 
just click on the link to send a pre-formatted email.


-Original Message-
From: Jennifer Koermer
Sent: Wednesday, January 19, 2011 7:03 PM
To: 
rt-users@lists.bestpractical.com<http://us.mc345.mail.yahoo.com/mc/compose?to=rt-users@lists.bestpractical.com>
Subject: Template Help

I'm using the following template to create an approval ticket.  I would like to 
include the following lines into the ticket:

Click on the link below to send an approval email:
mailto:r...@domain.com<http://us.mc345.mail.yahoo.com/mc/compose?to=r...@domain.com>?subject=%5B{$rtname}%20#{$Ticket->id()}%5D&body=%20Status:%20resolved

Click on the link below to send a rejection email:
mailto:r...@domain.com<http://us.mc345.mail.yahoo.com/mc/compose?to=r...@domain.com>?subject=%5B{$rtname}%20#{$Ticket->id()}%5D&body=%20Status:%20rejected

I am getting the following error:
Click on the link below to send an approval email:
mailto:r...@domain.com<http://us.mc345.mail.yahoo.com/mc/compose?to=r...@domain.com>?subject=%5B%20#Can't
 call method "id" on an undefined value at template line 29.

Stack:
  [template:29]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:667]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:366]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:303]
  [/usr/lib/rt/RT/ScripAction_Overlay.pm:238]
  [/usr/lib/rt/RT/Scrip_Overlay.pm:464]
  [/usr/lib/rt/RT/Scrips_Overlay.pm:196]
  [/usr/lib/rt/RT/Scrips_Overlay.pm:175]
  [/usr/lib/rt/RT/Ticket_Overlay.pm:3186]
  [/var/rt/html/Ticket/Create.html:392]
  [/var/rt/html/autohandler:311]
%5D&body=%20Status:%20resolved

Is there a way to get the id of the ticket that will be created with the 
template?  Please help, the ability to just be able to click on the link 
instead of worrying about formatting would be a great addition to the approval 
queue.  It works with correspondence and comments.


Here is my Template:


===Create-Ticket: approval
Queue: ___Approvals
Type: approval
AdminCc: {$Tickets{'TOP'}->FirstCustomFieldValue('OracleApprovers')};
Cc: 
usern...@domain.com<http://us.mc345.mail.yahoo.com/mc/compose?to=usern...@domain.com>
Depended-On-By: TOP
Refers-To: TOP
CF-ApprovalType: Oracle
Due: {time + 86400}
Subject: Oracle Approval for ticket: {$Tickets{"TOP"}->Id} - 
{$Tickets{"TOP"}->Subject}
Content: Your approval is required to grant access to Oracle for 
{$Tickets{'TOP'}->FirstCustomFieldValue('UserDisplayName')}

To respond to this request, please click the following link to access your 
pending approvals:

http://rt.domain.com/Approvals

OR

You may submit your response via e-mail.  To do so, reply to this message with 
one of the following responses in the body of the message:

To approve:
Status: Resolved

To reject:
Status: Rejected

To view the original request, follow this link:  
{RT->Config->Get('WebURL')}Ticket/Display.html?id={$Tickets{'TOP'}->Id}


The actual approval request is below:
{$Tickets{'TOP'}->Transactions->First->Content()}


ENDOFCONTENT




Re: [rt-users] Template Help

2011-01-20 Thread Jennifer Koermer
I'd still be interested in using this if there was an easy way to deal with 
this.  I ended up creating a custom scrip and template in the __Approvals 
queue.  I've added the line below to the template and it now allows people to 
just click on the link to send a pre-formatted email.


-Original Message-----
From: Jennifer Koermer 
Sent: Wednesday, January 19, 2011 7:03 PM
To: rt-users@lists.bestpractical.com
Subject: Template Help

I'm using the following template to create an approval ticket.  I would like to 
include the following lines into the ticket:

Click on the link below to send an approval email:
mailto:r...@domain.com?subject=%5B{$rtname}%20#{$Ticket->id()}%5D&body=%20Status:%20resolved

Click on the link below to send a rejection email:
mailto:r...@domain.com?subject=%5B{$rtname}%20#{$Ticket->id()}%5D&body=%20Status:%20rejected

I am getting the following error:
Click on the link below to send an approval email:
mailto:r...@domain.com?subject=%5B%20#Can't call method "id" on an undefined 
value at template line 29.

Stack:
  [template:29]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:667]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:366]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:303]
  [/usr/lib/rt/RT/ScripAction_Overlay.pm:238]
  [/usr/lib/rt/RT/Scrip_Overlay.pm:464]
  [/usr/lib/rt/RT/Scrips_Overlay.pm:196]
  [/usr/lib/rt/RT/Scrips_Overlay.pm:175]
  [/usr/lib/rt/RT/Ticket_Overlay.pm:3186]
  [/var/rt/html/Ticket/Create.html:392]
  [/var/rt/html/autohandler:311]
%5D&body=%20Status:%20resolved

Is there a way to get the id of the ticket that will be created with the 
template?  Please help, the ability to just be able to click on the link 
instead of worrying about formatting would be a great addition to the approval 
queue.  It works with correspondence and comments.


Here is my Template:


===Create-Ticket: approval
Queue: ___Approvals
Type: approval
AdminCc: {$Tickets{'TOP'}->FirstCustomFieldValue('OracleApprovers')};
Cc: usern...@domain.com
Depended-On-By: TOP
Refers-To: TOP
CF-ApprovalType: Oracle
Due: {time + 86400}
Subject: Oracle Approval for ticket: {$Tickets{"TOP"}->Id} - 
{$Tickets{"TOP"}->Subject}
Content: Your approval is required to grant access to Oracle for 
{$Tickets{'TOP'}->FirstCustomFieldValue('UserDisplayName')}

To respond to this request, please click the following link to access your 
pending approvals:

 http://rt.domain.com/Approvals 

OR

You may submit your response via e-mail.  To do so, reply to this message with 
one of the following responses in the body of the message:

To approve:
Status: Resolved

To reject:
Status: Rejected

To view the original request, follow this link:  
{RT->Config->Get('WebURL')}Ticket/Display.html?id={$Tickets{'TOP'}->Id}


The actual approval request is below:
{$Tickets{'TOP'}->Transactions->First->Content()} 


ENDOFCONTENT


[rt-users] Template Help

2011-01-19 Thread Jennifer Koermer
I'm using the following template to create an approval ticket.  I would like to 
include the following lines into the ticket:

Click on the link below to send an approval email:
mailto:r...@domain.com?subject=%5B{$rtname}%20#{$Ticket->id()}%5D&body=%20Status:%20resolved

Click on the link below to send a rejection email:
mailto:r...@domain.com?subject=%5B{$rtname}%20#{$Ticket->id()}%5D&body=%20Status:%20rejected

I am getting the following error:
Click on the link below to send an approval email:
mailto:r...@domain.com?subject=%5B%20#Can't call method "id" on an undefined 
value at template line 29.

Stack:
  [template:29]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:667]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:366]
  [/usr/lib/rt/RT/Action/CreateTickets.pm:303]
  [/usr/lib/rt/RT/ScripAction_Overlay.pm:238]
  [/usr/lib/rt/RT/Scrip_Overlay.pm:464]
  [/usr/lib/rt/RT/Scrips_Overlay.pm:196]
  [/usr/lib/rt/RT/Scrips_Overlay.pm:175]
  [/usr/lib/rt/RT/Ticket_Overlay.pm:3186]
  [/var/rt/html/Ticket/Create.html:392]
  [/var/rt/html/autohandler:311]
%5D&body=%20Status:%20resolved

Is there a way to get the id of the ticket that will be created with the 
template?  Please help, the ability to just be able to click on the link 
instead of worrying about formatting would be a great addition to the approval 
queue.  It works with correspondence and comments.


Here is my Template:


===Create-Ticket: approval
Queue: ___Approvals
Type: approval
AdminCc: {$Tickets{'TOP'}->FirstCustomFieldValue('OracleApprovers')};
Cc: usern...@domain.com
Depended-On-By: TOP
Refers-To: TOP
CF-ApprovalType: Oracle
Due: {time + 86400}
Subject: Oracle Approval for ticket: {$Tickets{"TOP"}->Id} - 
{$Tickets{"TOP"}->Subject}
Content: Your approval is required to grant access to Oracle for 
{$Tickets{'TOP'}->FirstCustomFieldValue('UserDisplayName')}

To respond to this request, please click the following link to access your 
pending approvals:

 http://rt.domain.com/Approvals 

OR

You may submit your response via e-mail.  To do so, reply to this message with 
one of the following responses in the 
body of the message:

To approve:
Status: Resolved

To reject:
Status: Rejected

To view the original request, follow this link:  
{RT->Config->Get('WebURL')}Ticket/Display.html?id={$Tickets{'TOP'}->Id}


The actual approval request is below:
{$Tickets{'TOP'}->Transactions->First->Content()} 


ENDOFCONTENT


Re: [rt-users] Re being removed from Subject in Email

2010-06-04 Thread Jennifer Koermer
I think you might be correctI did not notice that it appeared to be
happening on comments.

This is was the first line from the template Admin Comment:
Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s
=~ s/\[Comment\]//g; $s =~ s/^Re//i; $s;}

I changed it to the following:
Subject: [Comment] {my $s=($Transaction->Subject||$Ticket->Subject); $s
=~ s/\[Comment\]//g; $s =~ s/^Re\://i; $s;}

Appears to be working great now.  Thanks!
-Jennifer


-Original Message-
From: rt-users-boun...@lists.bestpractical.com
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kevin
Falcone
Sent: Friday, June 04, 2010 11:50 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Re being removed from Subject in Email

On Fri, Jun 04, 2010 at 10:28:47AM -0400, Jennifer Koermer wrote:
>I did a quick search, and couldn't find anything on the list.
> 
>We are seeing the following bug, and I'm wondering if anyone knows
the fix:
>If the subject begins with Re the Re is removed from the email
subject.
> 
>So in RT the subject reads: Receiving - xx
>But the email with the update reads:  [domain.com #XX]eiving - 
> xxx

Looks like this is on Comment notifying AdminCcs ?
If you're seeing it on other mails, you should provide the Message-ID so
we can work out what scrip/template is causing it.

-kevin

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


[rt-users] Re being removed from Subject in Email

2010-06-04 Thread Jennifer Koermer
I did a quick search, and couldn't find anything on the list. 

 

We are seeing the following bug, and I'm wondering if anyone knows the
fix:

If the subject begins with Re the Re is removed from the email subject.

 

So in RT the subject reads: Receiving - xx

But the email with the update reads:  [domain.com #XX]eiving -
xxx

 

Any ideas?  Thanks!

 

-Jennifer


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

Re: [rt-users] Scrip to create multiple child tickets

2010-03-09 Thread Jennifer Koermer
Jonathan,
I'm playing with a similar problem.  Somewhere on this list I found the
code that allows you to create the child tickets as a custom scrip
action.

I'm using the following to create my approval tickets. The custom file
Approvers is a comma-delmited list of email addresses.  A ticket is
create for each e-mail address in the list.   Should be able to modify
this to work for your situation. I haven't figured out how to add the
date, a custom field, or content with this method

Alterntively, you could create a separate scrip with a different custom
condition for each client custom field value.

Here is what I did:

Scrip Configuration:
Condition:  User Defined or As Required
Action: User Defined
Template: Global template: Blank
Stage: Transaction Create

my $queue_name = '___Approvals'; 
my $cf_Approver = 'Approvers';
my $override_approver = 'emailaddr...@domain.com';
my $ticket = $self->TicketObj; 
my $req_addr = $self->TicketObj->RequestorAddresses; 
my $approvers_list = $ticket->FirstCustomFieldValue($cf_Approver);
my @approvers_array = split(',',$approvers_list);
my $child_ticket = RT::Ticket->new ( $RT::SystemUser );
$RT::Logger->info( ">  Scrip #74 - Number of approvers: @approvers_array
\n" );  
foreach my $approver (@approvers_array) {
  my $required = @required_array[$int];
  $RT::Logger->info( ">  Scrip #74 - Ticket for Approver $approver\n" );
  $RT::Logger->info( ">  Scrip #74 - Required Status $required\n" );  
  my ($child_id, $child_transobj, $errormsg ) = 
$child_ticket->Create( 
  Queue => $queue_name , 
  Subject => "Approval for ticket: " . $ticket->id . " - " .
$ticket->Subject, 
  Cc => $override_approver,
  RefersTo => $ticket->id , 
  DependedOnBy => $ticket->id , 
  Type => "approval" , 
  Reqestor => $req_addr, 
  Owner => $approver,
  AdminCc => $approver,
); 
  unless ( $child_id ) { 
  $RT::Logger->debug(">>Error : ". $errormsg); 
  return undef ; 
  }
} 
return 1;

Hi everyone,

I have a Select Multiple custom field called 'Client'.  I want my scrip
to
create a child ticket for each client selected.  So far, my scrip works,
but
only creates 1 child ticket, no matter how many clients are selected.
Here
is my current scrip:

RT 3.6.5

Description: Create multiple child tix
Condition:  User Defined
Action: Create Tickets
Template:   Custom Template: Create multiple child tickets
Stage: Transaction Create

Custom condition:
if ($self->TransactionObj->Type ne 'Create' &&
$self->TicketObj->FirstCustomFieldValue('Client') eq 'client1) {
 return 1;
}

if ($self->TransactionObj->Type ne 'Create' &&
$self->TicketObj->FirstCustomFieldValue('Client') eq 'client2') {
 return 1;
}

return 0;

Here is the Template code:
===Create-Ticket: client
Subject: {$Tickets{'TOP'}->Subject}
({$Tickets{'TOP'}->FirstCustomFieldValue('Client')})
Depended-On-By: {$Tickets{'TOP'}->Id()}
Owner: testuser
Queue: Client Issues
Content: This ticket has been auto-created.
ENDOFCONTENT

Is there anyone that can help me identify why only 1 child ticket is
being
created, and not multiple?  I obviously have limited skills here, so any
help would be greatly appreciated!  Please please help!

Thanks so much!
Jonathan
___
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] Approval - Custom Action Scrip to create Approval Tickets

2010-03-09 Thread Jennifer Koermer
I need to create multiple approval tickets based on content in custom
fields of the parent ticket.  Tickets are being created based on the
custom field content, approvers are being specified from another custom
field.  If multiple approvers are specified, multiple tickets are
created. 

 

I've managed to get almost everything to work using the following in a
custom action scrip:

  my ($child_id, $child_transobj, $errormsg ) = 

  $child_ticket->Create( 

  Queue => $queue_name , 

  Subject => "Approval for ticket: " . $ticket->id . " - " .
$ticket->Subject, 

  Cc => $override_approver,

  RefersTo => $ticket->id , 

  DependedOnBy => $ticket->id , 

  Type => "approval" , 

  Reqestor => $req_addr, 

  Owner => $approver,

  AdminCc => $approver,

);

 

I still haven't figured out how to add content, set a due date 2 days
from now, or set a custom field.

 

Content:

I would like the initial content of the ticket to be the following:

 

Approval for $ticket->FirstCustomFieldValue('UserDisplayName')

To submit your response via e-mail.  To do so, reply to this message
with one of the following responses in the 

body of the message:

To approve:

 Status: Resolved

 

To reject:

 Status: Rejected

 

To view the original request, follow this link:
RT->Config->Get('WebURL')}Ticket/Display.html?id=$ticket->id



 

Additional information is below:

 $ticket->Transactions->First->Content()

 

I have tried adding both of the following lines into the ticket
creation, but the content is not added.  That being said, there are also
no errors reported:

  Text => "The Text Field",

  Content => "The Content Field",

 

 

Custom Field:

My custom field is ApprovalType.  I have tried the following (based on
what is used in templates):

CF-ApprovalType => "User"

I get the following error

[Tue Mar  9 16:22:27 2010] [error]: Scrip 74 Prepare failed: Bareword
"CF" not allowed while "strict subs" in use at (eval 3132) line 19.
(/usr/lib/rt/RT/Action/UserDefined.pm:64)

 

 

Due Date:

The template that I'm basing this on uses the following line to set the
date:

Due: {time + 86400}

 

I'm not sure how to set that time within the custom action of a scrip.

I tried the following & it didn't work:

Due => time + 86400

The following error is returned:

[Tue Mar  9 16:30:10 2010] [error]: Scrip 74 Prepare failed: Day '68'
out of range 1..31 at /usr/lib/rt/RT/Date.pm line 966

 

Anyone have any words of wisdom?

 

Jennifer Koermer

Assistant Director of Information Technology




PRG

Production Resource Group
 West Side Avenue, North Bergen, NJ 07047
201-758-4349 phone
201-868-7195 fax

201-232-7691 cell
jkoer...@prg.com <mailto:jkoer...@prg.com> 
www.prg.com <http://www.prg.com/>  

 

___
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] Resolve Quiet / Transaction Custom Fields

2010-02-04 Thread Jennifer Koermer
We would like to implement a form of Resolve that allows the actor to
choose if they want to send a Resolve notification or not.  We are
running Version RT 3.8.4.

 

We are attempting to implement the following:

http://wiki.bestpractical.com/view/MuteResolve

 

I created the custom field and added the following to my On Resolve
Notify Requestors scrip for troubleshooting purposes:

my $AllTicketTransactions = $self->TicketObj->Transactions;

while (my $ATransaction= $AllTicketTransactions->Next) {

  my $ATransactionID = $ATransaction->Id;

  my $ATransactionCustomFields = $ATransaction->CustomFields;

  while (my $ACustomField = $ATransactionCustomFields->Next()) {

my $ACustomFieldName = $ACustomField->Name;

my $ACustomFieldValue =
$ATransaction->FirstCustomFieldValue($ACustomFieldName);

$RT::Logger->info( ">  Scrip #10 - Transaction $ATransactionID \n"
);

$RT::Logger->info( ">  CFName  $ACustomFieldName \n"
);

$RT::Logger->info( ">  CFValue $ACustomFieldValue
\n" );

  }

}

 

We implemented this with ResolveQuiet being the custom field.  A section
of the log output can be found here:

[Thu Feb  4 15:42:25 2010] [info]: >  Scrip #10 - Transaction 51907
((eval 8421):31)

[Thu Feb  4 15:42:25 2010] [info]: >  CFName
ResolveQuiet  ((eval 8421):32)

[Thu Feb  4 15:42:25 2010] [info]: >  CFValue   ((eval
8421):33)

[Thu Feb  4 15:42:25 2010] [info]: >  Scrip #10 - Transaction 51908
((eval 8421):31)

[Thu Feb  4 15:42:25 2010] [info]: >  CFName
ResolveQuiet  ((eval 8421):32)

[Thu Feb  4 15:42:25 2010] [info]: >  CFValue   ((eval
8421):33)

[Thu Feb  4 15:42:25 2010] [info]: >  Scrip #10 - Transaction 51909
((eval 8421):31)

[Thu Feb  4 15:42:25 2010] [info]: >  CFName
ResolveQuiet  ((eval 8421):32)

[Thu Feb  4 15:42:25 2010] [info]: >  CFValue   ((eval
8421):33)

[Thu Feb  4 15:42:25 2010] [info]: >  Scrip #10 - Transaction 51910
((eval 8421):31)

[Thu Feb  4 15:42:25 2010] [info]: >  CFName
ResolveQuiet  ((eval 8421):32)

[Thu Feb  4 15:42:25 2010] [info]: >  CFValue   ((eval
8421):33)

 

>From this, it looks like the transactional custom field never actually
gets set.

 

I saw the following on the list:

http://www.gossamer-threads.com/lists/rt/users/57445?search_string=trans
action%20custom%20fields;#57445

 

My questions are:

Am I doing something wrong when I try to obtain the value of the
transaction custom field or are their still issues with transaction
custom fields?

Is there a better way to implement a method for Resolve Quiet?

Is there a better way around this then just changing the transaction
custom field to a ticket custom field?

Is the patch listed above for transaction custom fields still valid?  Is
there a better patch?

Any advice?

 

 

Jennifer Koermer

Assistant Director of Information Technology




PRG

Production Resource Group
 West Side Avenue, North Bergen, NJ 07047
201-758-4349 phone
201-868-7195 fax

201-232-7691 cell
jkoer...@prg.com <mailto:jkoer...@prg.com> 
www.prg.com <http://www.prg.com/>  

 

___
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] REST and attachments

2009-09-29 Thread Jennifer Koermer
I'm using RT 3.8.4.  I'm interfacing with RT using a website written in
C#.  After struggling a bit, I finally figured out how to retrieve
ticket information, edit tickets, and create new tickets.  Now I'm just
trying to figure out how to incorporate attachments.

 

I'm creating a ticket with the following post in C#:

Content=id: ticket/new\nsubject: new ticket\nqueue:
Automation\nrequestor: u...@domain.com\ntext: This is the text of the
ticket\rA second line of text in the ticket

 

When I attempt to create a ticket with an attachment, I tried the
following:

Content=id: ticket/new\nsubject: new ticket\nqueue:
Automation\nrequestor: u...@domain.com\ntext: This is the text of the
ticket\rA second line of text in the ticket\nAttachment:
d:\\Inetpub\\RT-REST\\Files\\Penguins.jpg

 

I received the following response:

RT/3.8.4 409 Syntax Error

 

# Ticket 70 created.

# attachment: Unknown field.

 

id: ticket/new

subject: new ticket

requestor: u...@domain.com

 

Has anyone had any success creating a ticket with an attachment using
REST?

What about commenting on an existing ticket and adding an attachment
using REST?

I know I can get around this by sending an email with the attachment,
but that seems like a round-about way of doing things.

 

Retrieving the attachments seems fairly straight forward, but I didn't
really see anything with any specific details on creating an attachment
via REST.

 

Thanks.

Jennifer

___
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