[rt-users] No Bounce message with a permission denied error

2007-08-28 Thread Dave Wells
Hi,

We recently began experiencing a strange issue, if an external user
replies to a ticket and he is not the requester, a watcher or associated
with the ticket in anyway he should get a permission denied bounce
message because we only allow replyToTicket from the Requester.

However recently the user is not getting this bounce message the content
is not added to the the ticket and the users does not know it has
bounced so it is like the email simply disappears.

I have included the rt debug output from when this mail arrives

[Thu Aug 23 10:02:14 2007] [debug]: Converting 'WINDOWS-1252' to 'utf-8'
for text/plain - RE: [foreshore.net #85556] [Comment] Test - do not
delete (/usr/local/rt3/lib/RT/I18N.pm:221)
[Thu Aug 23 10:02:14 2007] [debug]: Found a ticket ID. It's 85556
(/usr/local/rt3/lib/RT/Interface/Email.pm:477)
[Thu Aug 23 10:02:14 2007] [debug]: RT::User::CanonicalizeEmailAddress :
called with [EMAIL PROTECTED] by RT::CurrentUser
/usr/local/rt3/lib/RT/CurrentUser.pm 218
(/usr/local/rt3/local/lib/RT/User_Local.pm:326)
[Thu Aug 23 10:02:14 2007] [debug]: RT::User::LookupExternalUserInfo
called with baseDN dc=is,dc=foreshore,dc=net and filter
[EMAIL PROTECTED] by RT::User
/usr/local/rt3/local/lib/RT/User_Local.pm 332
(/usr/local/rt3/local/lib/RT/User_Local.pm:508)
[Thu Aug 23 10:02:14 2007] [info]: RT::User::LookupExternalUserInfo :
dc=is,dc=foreshore,dc=net [EMAIL PROTECTED] =
EmailAddress: , Name: , RealName:
(/usr/local/rt3/local/lib/RT/User_Local.pm:563)
[Thu Aug 23 10:02:14 2007] [debug]: RT::User::LookupExternalUserInfo
called with baseDN dc=is,dc=foreshore,dc=net and filter
[EMAIL PROTECTED] by RT::User
/usr/local/rt3/local/lib/RT/User_Local.pm 332
(/usr/local/rt3/local/lib/RT/User_Local.pm:508)
[Thu Aug 23 10:02:14 2007] [info]: RT::User::LookupExternalUserInfo :
dc=is,dc=foreshore,dc=net [EMAIL PROTECTED]
=  EmailAddress: , Name: , RealName:
(/usr/local/rt3/local/lib/RT/User_Local.pm:563)
[Thu Aug 23 10:02:14 2007] [debug]: RT::User::LookupExternalUserInfo
called with baseDN dc=is,dc=foreshore,dc=net and filter
[EMAIL PROTECTED] by RT::User
/usr/local/rt3/local/lib/RT/User_Local.pm 332
(/usr/local/rt3/local/lib/RT/User_Local.pm:508)
[Thu Aug 23 10:02:14 2007] [info]: RT::User::LookupExternalUserInfo :
dc=is,dc=foreshore,dc=net
[EMAIL PROTECTED] =  EmailAddress: ,
Name: , RealName:  (/usr/local/rt3/local/lib/RT/User_Local.pm:563)
[Thu Aug 23 10:02:14 2007] [debug]: RT::User::LookupExternalUserInfo
called with baseDN dc=is,dc=foreshore,dc=net and filter
mail=smtp:[EMAIL PROTECTED] by RT::User
/usr/local/rt3/local/lib/RT/User_Local.pm 332
(/usr/local/rt3/local/lib/RT/User_Local.pm:508)
[Thu Aug 23 10:02:14 2007] [info]: RT::User::LookupExternalUserInfo :
dc=is,dc=foreshore,dc=net mail=smtp:[EMAIL PROTECTED] =
EmailAddress: , Name: , RealName:
(/usr/local/rt3/local/lib/RT/User_Local.pm:563)
[Thu Aug 23 10:02:14 2007] [debug]: RT::User::LookupExternalUserInfo
called with baseDN dc=is,dc=foreshore,dc=net and filter
mailRoutingAddress=smtp:[EMAIL PROTECTED] by RT::User
/usr/local/rt3/local/lib/RT/User_Local.pm 332
(/usr/local/rt3/local/lib/RT/User_Local.pm:508)
[Thu Aug 23 10:02:14 2007] [info]: RT::User::LookupExternalUserInfo :
dc=is,dc=foreshore,dc=net
mailRoutingAddress=smtp:[EMAIL PROTECTED] =  EmailAddress: ,
Name: , RealName:  (/usr/local/rt3/local/lib/RT/User_Local.pm:563)
[Thu Aug 23 10:02:14 2007] [debug]: RT::User::LookupExternalUserInfo
called with baseDN dc=is,dc=foreshore,dc=net and filter
mailAlternateAddress=smtp:[EMAIL PROTECTED] by RT::User
/usr/local/rt3/local/lib/RT/User_Local.pm 332
(/usr/local/rt3/local/lib/RT/User_Local.pm:508)
[Thu Aug 23 10:02:14 2007] [info]: RT::User::LookupExternalUserInfo :
dc=is,dc=foreshore,dc=net
mailAlternateAddress=smtp:[EMAIL PROTECTED] =  EmailAddress:
, Name: , RealName:  (/usr/local/rt3/local/lib/RT/User_Local.pm:563)
[Thu Aug 23 10:02:14 2007] [debug]: RT::User::LookupExternalUserInfo
called with baseDN dc=is,dc=foreshore,dc=net and filter
mail=SMTP:[EMAIL PROTECTED] by RT::User
/usr/local/rt3/local/lib/RT/User_Local.pm 332
(/usr/local/rt3/local/lib/RT/User_Local.pm:508)
[Thu Aug 23 10:02:14 2007] [info]: RT::User::LookupExternalUserInfo :
dc=is,dc=foreshore,dc=net mail=SMTP:[EMAIL PROTECTED] =
EmailAddress: , Name: , RealName:
(/usr/local/rt3/local/lib/RT/User_Local.pm:563)
[Thu Aug 23 10:02:14 2007] [debug]: RT::User::LookupExternalUserInfo
called with baseDN dc=is,dc=foreshore,dc=net and filter
mailRoutingAddress=SMTP:[EMAIL PROTECTED] by RT::User
/usr/local/rt3/local/lib/RT/User_Local.pm 332
(/usr/local/rt3/local/lib/RT/User_Local.pm:508)
[Thu Aug 23 10:02:14 2007] [info]: RT::User::LookupExternalUserInfo :
dc=is,dc=foreshore,dc=net
mailRoutingAddress=SMTP:[EMAIL PROTECTED] =  EmailAddress: ,
Name: , RealName:  (/usr/local/rt3/local/lib/RT/User_Local.pm:563)
[Thu Aug 23 10:02:14 2007] [debug]: RT::User::LookupExternalUserInfo
called with baseDN dc=is,dc=foreshore,dc=net and filter
mailAlternateAddress=SMTP:[EMAIL PROTECTED] by RT::User

RE: [rt-users] Accessing requestors' names

2007-08-28 Thread Schincke, Keith D. (JSC-IT)[MEI]
Hey Tim,

The inspiration for this answer came from the RT code
(html/Ticket/Elements/ShowRequestor).
It should march through all of the requestors of the ticket and add
their RealName or email address to user list array. This array will then
be joined into a scaler. You could either work with each user as they
are looked up at line 6, do something with the array after the while at
line 9 or the list as a string on line 10.

1: my @names ;
2: my $people = $Ticket-Requestors-UserMembersObj;
3: while (my $requestor=$people-Next) 
4: {
5:   next if $requestor-Privileged;
6:   my $name=$requestor-RealName || $requestor-EmailAddress;
7:   push( @names, name ) ;
8: }
9: 
10: $name_list = join( ',' @names ) ;


I have not tested this yet this morning but it looks like Perl to me.

Good luck,

Keith

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tim
Wilson
Sent: Monday, August 27, 2007 10:43 PM
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Accessing requestors' names

Hey all,

Is it possible to print the full name of a ticket's requestor in a
template? Bonus points for gracefully handling multiple requestors. :-)

-Tim

--
Tim Wilson, Director of Technology
Buffalo-Hanover-Montrose Schools
214 1st Ave NE   Buffalo, MN  55313
ph: 763.682.8740  fax: 763.682.8743  http://www.buffalo.k12.mn.us




___
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
___
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


Re: [rt-users] rt-mailgate config problems while on virtual dedicated server

2007-08-28 Thread Phil Lawrence
On 8/27/07, Phil Lawrence [EMAIL PROTECTED] wrote:
 On 8/26/07, Patrick Morris [EMAIL PROTECTED] wrote:
  Phil Lawrence wrote:
   I also tried /etc/postfix/turbopanel/virtual_alias:
   [EMAIL PROTECTED] [EMAIL PROTECTED]
  
   and that failed:
   Aug 25 12:40:36 ip-999-999-999-999 postfix/qmgr[28422]: 9AEA715E35F6:
   to=[EMAIL PROTECTED], relay=none, delay=0, status=bounced (bad address
   syntax: [EMAIL PROTECTED])
  The error's right on that last one; it's bad address syntax. You should
  be able to get around it using [EMAIL PROTECTED].

 I made the change (thank you) and now get:
   verify_user([127.0.0.1]!user.test) failed: Mailbox does not exist

Fixed!  I had to:
# postconf -e alias_maps = hash:/etc/aliases
# postconf -e alias_database = hash:/etc/aliases
# newaliases

Thanks,
Phil Lawrence
___
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] Wiki question

2007-08-28 Thread Gene LeDuc
How do I access my wiki profile/account?  I set a password when I first 
registered, but it's never worked.  The only way I can login to the wiki is 
with the confirmation e-mail that I got when I registered.  I'd like to try 
setting my password again so I don't have to keep using the link in the 
confirmation e-mail to login, but I can't find any links to my profile.


Thanks,
Gene



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University 


___
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


Re: [rt-users] RT Ticket Counts and why they differ

2007-08-28 Thread Shawn Scantland
Hi Jesse,

RT stores ALL dates as UTC in the database. My first guess would be
ACLs (are you root? Are there deleted tickets?)
Have you compared the missing tickets to see if there are commonalities?


Thanks for getting back to me so soon.  I have connected as both root and
myself when querying this queue and the results were the same for the
queries.  Now I have modified my mysql query to:

select count(*) from Tickets where Created = '2007-08-23 04:00' and Created
= '2007-08-24 03:59:59' and Queue = 1 and Status != 'deleted' and !(Status
= 'resolved' and Resolved = '1970-01-01 00:00:00');

where a queue of 1 is the support queue.  This query gives me the same list
of tickets as the RT Ticket Query results.  The results also match the calls
from the RT CLI.

I have noticed that there are several tickets that have a status of resolved
but not have a Resolved datetime other than the default.  Oddly doing either
a status update via The Basics options or selecting the Resolve link at
the top of the ticket page both show me a datetime for Resolved in the
database (and UI).  So it is interesting how we can have tickets with that
situation.  The version of RT at work and my local copy are both 3.4.4.  The
data in question is recent but I have not been able to replicate the
situation.

Now I can get the RT Ticket Query and mysql to agree on the results but
RTx::Statistics is returning different values.  Does RTx::Statistics gather
the data differently?  In specific looking at the 'Time to Resolve' I get
values that are nothing like what the 3 other options above will show me for
the count of Created tickets.

Thanks,
Shawn
___
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

RE: [rt-users] RT Ticket Counts and why they differ

2007-08-28 Thread Kelly F. Hickel
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Shawn Scantland
Sent: Tuesday, August 28, 2007 2:32 PM

 Now I can get the RT Ticket Query and mysql to agree on the results but 
 RTx::Statistics is returning different 
 values.  Does RTx::Statistics gather the data differently?  In specific 
 looking at the 'Time to Resolve' I get 
 values  that are nothing like what the 3 other options above will show me for 
 the count of Created tickets.  

 Thanks,
 Shawn

Unfortunately, RTx::Statistics hasn't been updated in quite awhile.  I simply 
haven't had any time this year to work on it, and it doesn't really appear that 
anyone else has either.  I have several patches sitting in my inbox because I 
haven't had time to evaluate them, but even those are close to a year old.

-Kelly
___
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] Behavior of ticket's AdminCC vs. queue's AdminCC

2007-08-28 Thread Fran Fabrizio

I want each member of the sysadmin group to be emailed when a ticket
comes into the 'helpdesk' with no owner (i.e. from the mail gateway, or
from the web gateway with no owner set).  To accomplish this, I added a
scrip to 'helpdesk' called NotifyOfNewTicketIfUnowned that has the
custom condition:

if (($self-TransactionObj-Type eq Create) and
($self-TicketObj-OwnerObj-Id == $RT::Nobody-Id)) {
return(1);
} else {
return(undef);
}

and if true, the action is set to Notify AdminCCs.  All of that works well.

However, if I have a ticket, and I am the owner, and I want to add a
comment to myself, I choose Comment, but that comment goes to the entire
staff.  Or, related to this, if I want to add one other team member as
an AdminCC to this particular ticket because I need his input, I add him
to that ticket's AdminCC field, and then I Comment on the ticket.  And
this Comment goes to the entire sysadmin group.  It seems the queue's
AdminCC trumps the ticket's AdminCC in all cases.

How do I accomplish both of my goals?  I want both the initial broadcast
to all sysadmins when an unowned ticket comes in, AND the ability to
have an individual AdminCC list per ticket (or no AdminCCs at all for
that particular ticket, so that I can Comment to just myself). 

-- 
Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham
http://www.cis.uab.edu/
205.934.0653 

___
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] Approvals in next release

2007-08-28 Thread Chris Nelson
When is the next release slated for? We're anxious to see what changes 
to the approvals feature have been made.


--
Chris Nelson
CDA Unix Administrator
NightHawk Radiology Services
250 Northwest Blvd. #206
Coeur D'Alene, ID 83814

208.415.0588 (Office)
509.294.1835 (Cell)
208.664.2720 (Fax)
[EMAIL PROTECTED] (email)
http://www.nighthawkrad.net (Web)

CONFIDENTIALITY NOTICE:   This email, including any attachments, contains 
information from NightHawk Radiology Services, which may be confidential or 
privileged. The information is intended to be for the use of the individual or 
entity named above. If you are not the intended recipient, be aware that any 
disclosure, copying, distribution or use of the contents of this information is 
prohibited. If you have received this email in error, please notify NightHawk 
Radiology Services immediately by forwarding message to [EMAIL PROTECTED] and 
destroy all electronic and hard copies of the communication, including 
attachments.




___
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


Re: [rt-users] Behavior of ticket's AdminCC vs. queue's AdminCC

2007-08-28 Thread Gene LeDuc

Hi Fran,

Your scrip doesn't have anything to do with your issue.

It seems to me that you want the queue AdminCc list to be disregarded if 
someone is added to the ticket's AdminCc list.  I don't think that's the 
way RT works.  I'm pretty sure that RT combines any ticket AdminCcs with 
the queue AdminCcs when it sends e-mail.  I don't think you can override 
the queue AdminCc list with a ticket AdminCc.  But I might be wrong.


It should be pretty easy to do this, however, using Notify Other Recipients 
with a custom template.


Regards,
Gene

At 12:49 PM 8/28/2007, Fran Fabrizio wrote:


I want each member of the sysadmin group to be emailed when a ticket
comes into the 'helpdesk' with no owner (i.e. from the mail gateway, or
from the web gateway with no owner set).  To accomplish this, I added a
scrip to 'helpdesk' called NotifyOfNewTicketIfUnowned that has the
custom condition:

if (($self-TransactionObj-Type eq Create) and
($self-TicketObj-OwnerObj-Id == $RT::Nobody-Id)) {
return(1);
} else {
return(undef);
}

and if true, the action is set to Notify AdminCCs.  All of that works well.

However, if I have a ticket, and I am the owner, and I want to add a
comment to myself, I choose Comment, but that comment goes to the entire
staff.  Or, related to this, if I want to add one other team member as
an AdminCC to this particular ticket because I need his input, I add him
to that ticket's AdminCC field, and then I Comment on the ticket.  And
this Comment goes to the entire sysadmin group.  It seems the queue's
AdminCC trumps the ticket's AdminCC in all cases.

How do I accomplish both of my goals?  I want both the initial broadcast
to all sysadmins when an unowned ticket comes in, AND the ability to
have an individual AdminCC list per ticket (or no AdminCCs at all for
that particular ticket, so that I can Comment to just myself).

--
Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham
http://www.cis.uab.edu/
205.934.0653

___
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



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University 


___
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


Re: [rt-users] Behavior of ticket's AdminCC vs. queue's AdminCC

2007-08-28 Thread Fran Fabrizio

 It seems to me that you want the queue AdminCc list to be disregarded
 if someone is added to the ticket's AdminCc list.  I don't think
 that's the way RT works.  I'm pretty sure that RT combines any ticket
 AdminCcs with the queue AdminCcs when it sends e-mail.  I don't think
 you can override the queue AdminCc list with a ticket AdminCc.  But I
 might be wrong.
I believe that you are correct, and that is indeed the cause of my
problem.  I just am a little unclear how to solve it. :-)
 It should be pretty easy to do this, however, using Notify Other
 Recipients with a custom template.
My real problem is this...

Goal: Have every member of the sysadmin group get a copy of an email
when a ticket comes in with no owner.
Overkill Solution: Add sysadmin as an AdminCC for the queue and do a On
Create Notify AdminCCs as Comment.

While that works it has the unpleasant side effects I previously
described.  What I think I really wanted was:

Lighter Solution:  Define an On Create scrip called NotifySysadmins
whose action is a user defined one that notifies everyone in the
sysadmin group with the existing Admin Comment template.

So I guess (sorry for thinking out loud here) what I need to know is how
to define an On Create scrip which calls a custom action that notifies
sysadmin.   I couldn't quite figure that out, so my hack was to make
sysadmin an AdminCC, since we already have a Notify AdminCCs as Comment
action. 

I'm off to RTFM and figure out how to define a Notify sysadmin group as
Comment action, but if anyone knows this off the top of their head, I'd
be very thankful. :-)

-- 
Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham
http://www.cis.uab.edu/
205.934.0653 

___
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] Problem after system crash

2007-08-28 Thread Lois Bennett

Hi,

We had a problem with our UPS which resulted in almost all our servers 
going down.  I now have a problem with RT. It is working fine as far as 
comments and replies to existing tickets.


It won't create new tickets.  I believe it it because it was in the 
middle of creating one when the system crashed.


I have these error messages:

[Tue Aug 28 21:07:34 2007] [crit]: Couldn't create a ticket: Internal 
Error: Couldn't execute the query 'INSERT INTO Tickets (Status, Queue, 
Started, Type, InitialPriority, Starts, LastUpdated, Subject, 
FinalPriority, Creator, Owner, LastUpdatedBy, Resolved, Created, 
Priority, Due) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?)'Duplicate entry '8276' for key 1 (/opt/rt3/lib/RT/Ticket_Overlay.pm:591)


[Tue Aug 28 21:07:34 2007] [error]: WebRT: Ticket could not be created 
due to an internal error () (/opt/rt3/share/html/Elements/Error:76)


In mysql
mysql select * from Tickets where id = 8276;
Empty set (0.00 sec)
mysql select * from Transactions where ObjectId = 8276;
++--+---+-+---+--+--++-+-++---+--+--+
| id | ObjectId | TimeTaken | Type| Field | OldValue | 
NewValue | Data 
  | Creator | Created | ObjectType | ReferenceType | 
OldReference | NewReference |

++--+---+-+---+--+--++-+-++---+--+--+
| 142759 | 8276 | 0 | Create  | NULL  | NULL | NULL 
| NULL   | 
  20791 | 2007-08-28 18:20:47 | RT::Ticket | NULL  | 
NULL | NULL |
| 142760 | 8276 | 0 | EmailRecord | NULL  | NULL | NULL 
| [EMAIL PROTECTED] | 
  1 | 2007-08-28 18:20:48 | RT::Ticket | NULL  | 
NULL | NULL |
| 142761 | 8276 | 0 | EmailRecord | NULL  | NULL | NULL 
| [EMAIL PROTECTED]  | 
  1 | 2007-08-28 18:20:54 | RT::Ticket | NULL  | 
NULL | NULL |

++--+---+-+---+--+--++-+-++---+--+--+
3 rows in set (0.00 sec)

So it was creating ticket 8276 when it crashed but how can I tell it to 
clear out 8276 and move on?


I suspect this is in the docs somewhere and I am looking but I thought I 
would ask too since it might take me a while to search and read.


Thanks,
Lois

___
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


Re: [rt-users] Behavior of ticket's AdminCC vs. queue's AdminCC

2007-08-28 Thread Robert Long
Fran Fabrizio wrote:
 My real problem is this...

 Goal: Have every member of the sysadmin group get a copy of an email
 when a ticket comes in with no owner.
 Overkill Solution: Add sysadmin as an AdminCC for the queue and do a On
 Create Notify AdminCCs as Comment.
   

Just create a script:

Condition:  On create
Action: Notify Other Recipients
Template: make up something creative

And for the aforementioned template:
### begin 
To: [EMAIL PROTECTED]
Subject:  {$Ticket-QueueObj-Name}: {$Ticket-Subject}

anything you type here will end up in the email before the ticket
{$Transaction-Content()}

### end ###


If you want to manage the group of sysadmins in RT and not as an email
list/alias, last week there was a thread - 'Seeking notification method
advice' - that I think will have what you want in there.  As for the 'no
owner' part, you could create a custom action that checks if there is an
owner or not (and that the transaction type is create...), though you
might have to run it in the transactionBatch mode...

.r'

___
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


Re: [rt-users] Behavior of ticket's AdminCC vs. queue's AdminCC

2007-08-28 Thread Gene LeDuc

Hi Fran,

Here's how I'd attack your problem.

1.  Change your On Create scrip to Notify Other Recipients and then create 
a custom template (NotifySysadmins for instance).


2.  Create an RT group called SysAdmins.

3.  Have your NotifySysadmins template send the notification e-mail to the 
RT SysAdmins group.  Something like this:

To: {
  my $group = RT::Group-new( $RT::SystemUser );
  $group-LoadUserDefinedGroup(SysAdmins);
  $OUT = $group-MemberEmailAddressesAsString; }

{ $Transaction-Content() }

This way your SysAdmins only get unowned new-ticket notifications, not all 
the other noise.


Regards,
Gene


At 02:18 PM 8/28/2007, Fran Fabrizio wrote:


 It seems to me that you want the queue AdminCc list to be disregarded
 if someone is added to the ticket's AdminCc list.  I don't think
 that's the way RT works.  I'm pretty sure that RT combines any ticket
 AdminCcs with the queue AdminCcs when it sends e-mail.  I don't think
 you can override the queue AdminCc list with a ticket AdminCc.  But I
 might be wrong.
I believe that you are correct, and that is indeed the cause of my
problem.  I just am a little unclear how to solve it. :-)
 It should be pretty easy to do this, however, using Notify Other
 Recipients with a custom template.
My real problem is this...

Goal: Have every member of the sysadmin group get a copy of an email
when a ticket comes in with no owner.
Overkill Solution: Add sysadmin as an AdminCC for the queue and do a On
Create Notify AdminCCs as Comment.

While that works it has the unpleasant side effects I previously
described.  What I think I really wanted was:

Lighter Solution:  Define an On Create scrip called NotifySysadmins
whose action is a user defined one that notifies everyone in the
sysadmin group with the existing Admin Comment template.

So I guess (sorry for thinking out loud here) what I need to know is how
to define an On Create scrip which calls a custom action that notifies
sysadmin.   I couldn't quite figure that out, so my hack was to make
sysadmin an AdminCC, since we already have a Notify AdminCCs as Comment
action.

I'm off to RTFM and figure out how to define a Notify sysadmin group as
Comment action, but if anyone knows this off the top of their head, I'd
be very thankful. :-)

--
Fran Fabrizio
Senior Systems Analyst
Department of Computer and Information Sciences
University of Alabama at Birmingham
http://www.cis.uab.edu/
205.934.0653



--
Gene LeDuc, GSEC
Security Analyst
San Diego State University 


___
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


Re: [rt-users] Problem after system crash

2007-08-28 Thread Lois Bennett
Solved.  Running mysqlcheck -r rt3  cleared the inconsistencies in the 
database and all was fixed.


Peace,
Lois

Lois Bennett wrote:

Hi,

We had a problem with our UPS which resulted in almost all our servers 
going down.  I now have a problem with RT. It is working fine as far as 
comments and replies to existing tickets.


It won't create new tickets.  I believe it it because it was in the 
middle of creating one when the system crashed.


I have these error messages:

[Tue Aug 28 21:07:34 2007] [crit]: Couldn't create a ticket: Internal 
Error: Couldn't execute the query 'INSERT INTO Tickets (Status, Queue, 
Started, Type, InitialPriority, Starts, LastUpdated, Subject, 
FinalPriority, Creator, Owner, LastUpdatedBy, Resolved, Created, 
Priority, Due) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, 
?)'Duplicate entry '8276' for key 1 (/opt/rt3/lib/RT/Ticket_Overlay.pm:591)


[Tue Aug 28 21:07:34 2007] [error]: WebRT: Ticket could not be created 
due to an internal error () (/opt/rt3/share/html/Elements/Error:76)


In mysql
mysql select * from Tickets where id = 8276;
Empty set (0.00 sec)
mysql select * from Transactions where ObjectId = 8276;
++--+---+-+---+--+--++-+-++---+--+--+ 

| id | ObjectId | TimeTaken | Type| Field | OldValue | 
NewValue | Data   | Creator | Created | ObjectType | 
ReferenceType | OldReference | NewReference |
++--+---+-+---+--+--++-+-++---+--+--+ 

| 142759 | 8276 | 0 | Create  | NULL  | NULL | NULL 
| NULL   |   
20791 | 2007-08-28 18:20:47 | RT::Ticket | NULL  | NULL 
| NULL |
| 142760 | 8276 | 0 | EmailRecord | NULL  | NULL | NULL 
| [EMAIL PROTECTED] | 
  1 | 2007-08-28 18:20:48 | RT::Ticket | NULL  | NULL 
| NULL |
| 142761 | 8276 | 0 | EmailRecord | NULL  | NULL | NULL 
| [EMAIL PROTECTED]  | 
  1 | 2007-08-28 18:20:54 | RT::Ticket | NULL  | NULL 
| NULL |
++--+---+-+---+--+--++-+-++---+--+--+ 


3 rows in set (0.00 sec)

So it was creating ticket 8276 when it crashed but how can I tell it to 
clear out 8276 and move on?


I suspect this is in the docs somewhere and I am looking but I thought I 
would ask too since it might take me a while to search and read.


Thanks,
Lois

___
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


___
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] Fulltext search executes expensive query twice/ three times

2007-08-28 Thread sk
Hi all,

we have about 18000 Tickets in our RT and the fulltext search is nearly 
unusable. One search takes about 210 Seconds.
We use rt3.6.4 with postgresql.

At the postgres logfile I saw that this query is called twice for the ticket 
count and (nearly the same) for the output (it takes every time 60 Seconds):

2007-08-29 02:24:52 CEST LOG:  Anweisung: SELECT COUNT(DISTINCT main.id) FROM 
Tickets main JOIN Transactions Transactions_1  ON ( Transactions_1.ObjectId = 
main.id ) JOIN Attachments Attachments_2  ON ( Attachments_2.TransactionId = 
Transactions_1.id )  WHERE (Transactions_1.ObjectType = 'RT::Ticket') AND 
(main.Status != 'deleted') AND ( (  ( Attachments_2.Content 
ILIKE '%test%' )  ) ) AND (main.Type = 'ticket') AND (main.EffectiveId = 
main.id)
2007-08-29 02:26:09 CEST LOG:  Dauer: 76995.042 ms
2007-08-29 02:26:09 CEST LOG:  Anweisung: SELECT COUNT(DISTINCT main.id) FROM 
Tickets main JOIN Transactions Transactions_1  ON ( Transactions_1.ObjectId = 
main.id ) JOIN Attachments Attachments_2  ON ( Attachments_2.TransactionId = 
Transactions_1.id )  WHERE (Transactions_1.ObjectType = 'RT::Ticket') AND 
(main.Status != 'deleted') AND ( (  ( Attachments_2.Content 
ILIKE '%test%' )  ) ) AND (main.Type = 'ticket') AND (main.EffectiveId = 
main.id)
2007-08-29 02:27:15 CEST LOG:  Dauer: 65809.656 ms
2007-08-29 02:27:15 CEST LOG:  Anweisung: SELECT DISTINCT main.* FROM Tickets 
main JOIN Transactions Transactions_1  ON ( Transactions_1.ObjectId = 
main.id ) JOIN Attachments Attachments_2  ON ( Attachments_2.TransactionId = 
Transactions_1.id )  WHERE (Transactions_1.ObjectType = 'RT::Ticket') AND 
(main.Status != 'deleted') AND (
(  ( Attachments_2.Content ILIKE '%test%' )  ) ) AND (main.Type = 'ticket') 
AND (main.EffectiveId = main.id)  ORDER BY main.id ASC  LIMIT 50
2007-08-29 02:28:18 CEST LOG:  Dauer: 62832.487 ms

Is it possible to merge these 3 queries into one?
This should speed up the fulltext search about 60%

Exists there any patch for this behaviour?

regards 
Sven



___
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


Re: [rt-users] Behavior of ticket's AdminCC vs. queue's AdminCC

2007-08-28 Thread Fran Fabrizio




3.  Have your NotifySysadmins template send the notification e-mail  
to the RT SysAdmins group.  Something like this:

To: {
  my $group = RT::Group-new( $RT::SystemUser );
  $group-LoadUserDefinedGroup(SysAdmins);
  $OUT = $group-MemberEmailAddressesAsString; }



Ah, this was the key piece of the RT API I hadn't grokked yet.   
Perfect.  Thanks!!




___
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