[rt-users] Scrip to leverage RT-Extension-HistoryFilter?

2016-06-09 Thread k...@rice.edu
Hi,

I want to improve the signal to noise ratio from our system and due to
early decisions on the need for notifications, we send too many info
messages. Does anyone have a scrip that leverages the HistoryFilter
user preference setting to control the types of transactions for
which Email is sent, not just in the ticket display. Before I write
it myself, I wanted to see if there was existing code that could be
leveraged. Any pointers will be appreciated.

Regards,
Ken
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Los Angeles - September, 2016


Re: [rt-users] Content search: NOT LIKE

2016-05-12 Thread k...@rice.edu
On Thu, May 12, 2016 at 10:52:53AM +, raymond.teunis...@kpn.com wrote:
> Hi Ken,
> 
> Thanks, but i'm afraid this is not the case. I'm searching in tickets that do 
> not have replies (or comments) at all. The only correspondence is the 
> creation of the tickets (and it's contents). 
> 
> Regards,
> Raymond
> 

Hi Raymond,

I would turn on logging and see what query is actually being used and debug
from there. I have not looked at it lately, but the results were correct in
earlier versions but did not do what I wanted. Let me know what you find.

Regards,
Ken
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Content search: NOT LIKE

2016-05-11 Thread k...@rice.edu
On Wed, May 11, 2016 at 10:43:17AM +, raymond.teunis...@kpn.com wrote:
> Hi all,
> 
> There seems to be an issue with the contentsearch in RT, or at least, I'm 
> experiencing it :)
> 
> When doing a search like : Queue = 'Queuename' AND Status = 'new' AND Content 
> LIKE 'searchphrase'
> 
> It works.
> 
> When doing a search like: Queue = 'Queuename' AND Status = 'new' AND Content 
> NOT LIKE 'searchphrase'
> 
> It doesn't. It still gives those tickets which have the criteria I specified 
> in the search (and thus don't want to see in the results). Is this a bug 
> perhaps?
> 
> RT4.2.12
> RHEL 6
> 
> Regards,
> Raymond
> 
> KPN NL


Hi Raymond,

This search is not doing what you expect. It is finding all tickets that have
at least one reply without the searchphrase.

Regards,
Ken
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


[rt-users] LDAPImport format options?

2016-04-28 Thread k...@rice.edu
Hi RT users,

I am configuring the LDAPImport extension to replace an ancient local
script with similar functionality and I am running into a format problem.
I would like to have the RealName field as "surname, givenname". I can
easily do "givenname surname" by just using the appropriate LDAP
attributes. Is there any way to manage that change during the import
process?

Regards,
Ken
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] data replication RT server to RT server

2016-04-08 Thread k...@rice.edu
On Fri, Apr 08, 2016 at 03:02:19PM -0400, Boris Epstein wrote:
> Hello listmates,
> 
> Here is what I have in mind.
> 
> Let us say I have a production RT instance. Let us call it rt_prod. Let us
> also say I want to run a staging instance on which I would be testing new
> versions, extensions, etc. Let us call is rt_stag.
> 
> Is there a way to synchronize the to with regard to actual ticket data -
> i.e., make it so that once any modification is made on the production one
> (rt_prod), for instance, the same is reflected on staging (rt_stag). I may
> even want to do it both ways.
> 
> Any way to do something like this - or am I just dreaming?
> 
> Thanks.
> 
> Boris.

Hi Boris,

Read through the upgrade documentation and check out the changes introduced
in the schema during the process. Not having done so, if the changes are in
some sense one-to-one, you may be able to have your production data pushed
into your test system with judicious scripting, triggers, views, It may
be more useful to script the upgrade process completely for the DB and then
update it once a day with the latest information. Going both ways would be
EXTREMELY challenging. Let us know if you get something like this working,
I think it would be of interest to others.

Regards,
Ken
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Automated time tracking

2016-03-29 Thread k...@rice.edu
On Tue, Mar 29, 2016 at 02:14:01PM -0400, Barton Chittenden wrote:
> I was wondering if anyone knows of plugins that would allow for automatic
> tracking of time worked. There seem to be several plugins that create
> different interfaces for manually entering time (see
> https://metacpan.org/search?q=RT%3A%3AExtension+time_type=modules),
> but I'm looking for something more like https://toggl.com/ -- a wrapper
> around a javascript timer that will dump into the ticket's time worked.
> 
> Has anyone developed anything like that?
> 
> Thanks,
> 
> ---Barton


Hi Barton,

I believe that RT 4.4 includes that functionality.

Regards,
Ken
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] PostgreSQL full-text index default type: GiST or GIN

2016-03-20 Thread k...@rice.edu
On Fri, Mar 18, 2016 at 12:21:13AM -0700, Alex Vandiver wrote:
> On Thu, 17 Mar 2016 17:47:50 -0500
> Matt Zagrabelny  wrote:
> > > I am curious about the benchmarks you used to make this determination?
> > > In particular, the GIN fastscan option can dramatically improve search
> > > performance in versions 9.4 and above. Here is a nice discussion:
> > >
> > > http://blog.pgaddict.com/posts/performance-since-postgresql-7-4-to-9-4-fulltext
> > >
> > > In addition, GIN indexes are much smaller in PostgreSQL 9.4 and above.
> > > So I am curious about the data that motivated the change to GiST.
> 
> You are quite correct; GIN indexes are superior in virtually every
> way for our use case.  And the documentation is unfortunately in error;
> the default switched in the other direction, from GiST to GIN. See
> https://github.com/bestpractical/rt/commit/e103f6da for the actual
> behavior change.
> 
Hi Alex,

I am glad to find out it is only a documentation problem. I had not had a
chance to look at the actual code yet.

Regards,
Ken
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


[rt-users] PostgreSQL full-text index default type: GiST or GIN

2016-03-19 Thread k...@rice.edu
Hi,

I am working on an upgrade from 3.8.x to 4.4.x and I noticed the
following comment in the UPGRADING-4.2 file:

The full-text indexing defaults for PostgreSQL have changed; GiST is now
the suggested index, as well as storing data in a separate
AttachmentsIndex table.  Both changes improve lookup speed.  For
improved search performance, you may wish to drop existing C
and C indexes on C, and re-generate the index using
C.

I am curious about the benchmarks you used to make this determination?
In particular, the GIN fastscan option can dramatically improve search
performance in versions 9.4 and above. Here is a nice discussion:

http://blog.pgaddict.com/posts/performance-since-postgresql-7-4-to-9-4-fulltext

In addition, GIN indexes are much smaller in PostgreSQL 9.4 and above.
So I am curious about the data that motivated the change to GiST.

Regards,
Ken
-
RT 4.4 and RTIR Training Sessions https://bestpractical.com/training
* Washington DC - May 23 & 24, 2016


Re: [rt-users] Option to Emulate another RT user from SuperUser

2015-11-12 Thread k...@rice.edu
On Thu, Nov 12, 2015 at 01:23:53PM -0500, Joe Kirby wrote:
> At time some folks on campus report that RT is slow for them. 
> 
> I try to create a test user with the same access but this does not always 
> help me because they may have a lot of tickets or a dashboard item/report 
> that I cannot emulate.
> 
> Does RT have any built-in mechanism for SuperUser to do such a thing.
> 
> We use single sign on and thus I am unable to override that.
> 
> Thanks
> 
> Joe
> 
> Joe Kirby ,  Assistant Vice President, Business Systems
> Division of Information Technology (DoIT) 
> Support Response -   http://www.umbc.edu/doit 
> Administration 627
> Office - 410-455-3020 
> Email - ki...@umbc.edu
> 

Hi Joe,

You might be able to set up an alternate frontend configured to use
local authentication. Then you could test with that by setting a local
password for the account. What version are you running and are you do
you have Set($UseSQLForACLChecks, 1) in your RT_SiteConfig.pm? Superuser
skips all of the access checks that regular accounts pass through.

Regards,
Ken


Re: [rt-users] Help! I enabled Full Text search and now Simple search won't look at Subjects !!

2015-10-07 Thread k...@rice.edu
On Wed, Oct 07, 2015 at 02:51:16PM -0400, Al Joslin wrote:
> I am running 4.2.11
> 
> I have install mariadb 10.0 
> 
> I have enabled native mySQL full text search
> 
> It works fine - EXCEPT: it seems that I can have Full Text -or- Subject from 
> the Simple Search box, but not both?
> 
> If I disable the full text from the RT_Site_config then the simple search box 
> searches subjects but not attachments
> 
> If I enable the full text from the RT_Site_config then the simple search box 
> searches attachments but not subjects
> 
> I don’t know how to proceed, this is not going to go over well…
> 
> I also have a custom field my users insisted on that will carry text — can I 
> index and search more than one table (attachments) ?
> 
> thanks
> al;
> 

Hi Al,

It looks like you should be able to change the following function in
lib/RT/Search/Simple.pm:

# $_[0] is $self
# $_[1] is escaped value without surrounding single quotes
# $_[2] is a boolean of "was quoted by the user?"
#   ensure this is false before you do smart matching like $_[1] eq "me"
# $_[3] is escaped subkey, if any (see HandleCf)
sub HandleDefault   {
my $fts = RT->Config->Get('FullTextSearch');
if ($fts->{Enable} and $fts->{Indexed}) {
return default => "Content LIKE '$_[1]'";
} else {
return default => "Subject LIKE '$_[1]'";
}
}

to something like the following (untested):

sub HandleDefault   {
my $fts = RT->Config->Get('FullTextSearch');
if ($fts->{Enable} and $fts->{Indexed}) {
return default => "Subject LIKE '$_[1]' OR Content LIKE '$_[1]'";
} else {
return default => "Subject LIKE '$_[1]'";
}
}

Regards,
Ken


Re: [rt-users] Help! I enabled Full Text search and now Simple search won't look at Subjects !!

2015-10-07 Thread k...@rice.edu
On Wed, Oct 07, 2015 at 02:51:16PM -0400, Al Joslin wrote:
> I am running 4.2.11
> 
> I have install mariadb 10.0 
> 
> I have enabled native mySQL full text search
> 
> It works fine - EXCEPT: it seems that I can have Full Text -or- Subject from 
> the Simple Search box, but not both?
> 
> If I disable the full text from the RT_Site_config then the simple search box 
> searches subjects but not attachments
> 
> If I enable the full text from the RT_Site_config then the simple search box 
> searches attachments but not subjects
> 
> I don’t know how to proceed, this is not going to go over well…
> 
> I also have a custom field my users insisted on that will carry text — can I 
> index and search more than one table (attachments) ?
> 
> thanks
> al;
> 

Hi Al,

It definitely looks like a bug to me. Have you reported it? It also looks like
it will only handle a single table search so you will need to write code to add
support for your other custom field. I had something similar in my PostgreSQL
patch for older systems, but I have not looked recently.

Regards,
Ken


[rt-users] 'Started' not being set when ticket status changes from 'New' -> 'xxx'

2015-09-11 Thread k...@rice.edu
Hi,

I am debugging a problem where the 'Started' Date is not being
set when the ticket status changes from 'new' to 'open' or 'resolved'.
I found the code for when the 'Started' date is set using 'SetStarted()'
that changes the status from 'new' to 'open', but not the code setting
the 'Started' field when the status changes. Can someone give me a
pointer or an idea about where to look?

Regards,
Ken


Re: [rt-users] 'Started' not being set when ticket status changes from 'New' -> 'xxx'

2015-09-11 Thread k...@rice.edu
On Fri, Sep 11, 2015 at 10:48:12AM -0500, k...@rice.edu wrote:
> Hi,
> 
> I am debugging a problem where the 'Started' Date is not being
> set when the ticket status changes from 'new' to 'open' or 'resolved'.
> I found the code for when the 'Started' date is set using 'SetStarted()'
> that changes the status from 'new' to 'open', but not the code setting
> the 'Started' field when the status changes. Can someone give me a
> pointer or an idea about where to look?
> 
> Regards,
> Ken
> 

Just to follow-up. I made a global scrip to set the 'Started' date field
when it is un-set and the transaction is a status change from 'new' to
either 'open' or 'resolved'. I thought that this was handled by RT internally
when the status changed from 'new' but I could not find any place in the code
that handled it.

Regards,
Ken


Re: [rt-users] checking/changing default queue for a user

2015-07-21 Thread k...@rice.edu
On Tue, Jul 21, 2015 at 12:53:33PM -0400, Boris Epstein wrote:
 Hello again,
 
 And just to add to the confusion here:
 
 http://kb.mit.edu/confluence/display/istcontrib/Setting+your+Default+Queue+in+Request+Tracker
 
 Apparently, a setting is indeed supposed to exist to set this parameter.
 But I for the life of me can not find it! Where did it go? :)
 
 Any and all help appreciated as always.
 
 Cheers,
 
 Boris.
 

Hi Boris,

The option is a per-user configuration setting in their Preferences. It may be
scrip(t)able with the RT API.

Regards,
Ken
 
 On Tue, Jul 14, 2015 at 5:18 PM, Boris Epstein borepst...@gmail.com wrote:
 
  Hello listmates,
 
  If I as an admin need to set a certain queue for requests originating from
  a user - how do I do that? Let us say I have a user John Smith, with an
  email of jsm...@abc.com. How do I make it so that every ticket by email
  coming from jsm...@abc.com goes into a certain queue.
 
  Thanks.
 
  Boris.
 


Re: [rt-users] Custom Scripts to delete Emails by Subject line

2015-06-29 Thread k...@rice.edu
On Mon, Jun 29, 2015 at 10:02:39AM +, Lorraine Johnson wrote:
 Hello All,
 
 Is it possible to assign one ticket to more than one user as well as assign
 the same ticket to more than one queue? if it's possible how can I achieve
 that?
 
 Thank you
 
 
 Regards
 Lorraine
 

Hi Lorraine,

There is a single owner for a ticket and likewise a single queue. For additional
owners, you could add them as an AdminCc on the ticket. But it sounds like
what you want could be better represented by creating two child tickets of the
original ticket, one in each queue with that queue's appropriate owner.

Regards,
Ken


Re: [rt-users] spawn-fcgi crashing, is uWSGI an option?

2015-05-30 Thread k...@rice.edu
On Sat, May 30, 2015 at 04:49:00PM -0700, Aaron C. de Bruyn wrote:
 I have a demo of RT set up for my company.
 
 During testing, we found the spawn-fcgi process is slow and crashes often.
 
 If more than a few users are on the site, and/or more than few
 messages coming in through rt-mailgate, the site loads extremely slow.
 We increased the number of child processes for spawn-fcgi, but it's
 doesn't seem adequate to handle the load.
 
 We can regularly make spawn-fcgi die by simply hitting escape while a
 page is loading.  Other times it crashes for no apparent reason.
 
 We use uWSGI everywhere for python projects we host, and I tried to
 see if I could get RT working under that.  I failed miserably because
 I don't know that much about PSGI, FCGI, etc...and their relationship
 to the webserver.  I know Nginx can speak the uwsgi protocol to talk
 to uWSGI, but uWSGI seems to bomb on trying to serve RT.
 
 I tried the following config to no avail:
 
 [uwsgi]
 plugins = psgi
 socket = 127.0.0.1:9001
 psgi = /opt/rt4/sbin/rt-server.fcgi
 fastcgi-socket = true
 processes = 2
 master = true
 stats = 127.0.0.1:1717
 chdir = /opt/rt4
 uid = uitrt
 gid = uitrt
 
 Has anyone else been able to run it using uWSGI?
 
 Are there other options for keeping the site running under nginx?
 
 Thanks in advance for any pointers or advice.
 
 -A
 
Hi Aaron,

We run RT with spawn-fcgi/nginx and either systemd/RHEL7 or
multiwatch/RHEL6 to make sure that the pool stays populated. No
problems at all. I would take uWSGI out of the mix, although there
is no reason it should not work, there may be some nuances involved.
The fact that the site loads slowly seems to indicate that you are
having a problem with your database backend. Check out your slow
queries and see what is wrong. It should be pretty zippy by default.

Regards,
Ken


Re: [rt-users] mail solutions

2015-05-26 Thread k...@rice.edu
On Tue, May 26, 2015 at 06:18:34PM +, Terry O'Leary wrote:
 We have 14 different queues so using fetchmail to manage the email accounts 
 is useful for us. But that is where the problem lies as well I think. 
 Fetchmail doesn’t seem to be deleting the email from the inbox consistently. 
 Sometimes it works and sometimes it doesn’t. I have gone the route of working 
 with the Network Engineering team to see if there were any configuration 
 changes or updates to exchange that may have done but came up with nothing. 
 The emails get to their respective inboxes, then fetchmail (I have running in 
 a crontab every minute) executes to pick up and send any emails to RT 
 mailgate.:
 
 Here is an example:
 
 poll imap.corp.test.com proto IMAP and port 143:
 
 # Team Queue
 username team  password 123456 mda 
 /opt/rt4/bin/rt-mailgate --url http://test --queue 'Team Requests' --action 
 correspond
 username team-comments password 123456 mda /opt/rt4/bin/rt-mailgate --url 
 http://test --queue 'Team Requests' --action comment
 
 I know this isn’t a fetchmail forum, but any input would be gladly taken.
 
 Thank You,
 Terry O'Leary
 

Hi Terry,

What kind of locking are you using to prevent simultaneous access to a folder
from multiple fetchmail instances? 1 minute granularity in your crontab may
allow that to happen, then the second instance would re-process the messages
already processed before they were deleted.

Regards,
Ken


Re: [rt-users] ticket content search maybe doesn't work as excepted

2015-05-12 Thread k...@rice.edu
On Tue, May 12, 2015 at 05:11:59PM +0200, Christian Loos wrote:
 Hi,
 
 playing around with the ticket content search I discovered many false
 positive results.
 
 The _TransContentLimit [1] fetches all transaction, notably also the
 EmailRecord and CommentEmailRecord transactions which let the content
 search also found matches for stings which are inserted by templates
 into outgoing emails.
 
 This isn't what I would expect. If I search for content I would expect
 matches for the content of Create, Comment, Correspond, Forward Ticket
 and Forward Transaction (the content of an incoming email or the content
 of an RT user input).
 
 Example (vanilla RT 4.2.11 with unindexed search [2] enabled):
 * create a ticket with subject foo and content bar
 * search for: Content LIKE 'Greetings'
 
 I wouldn't expect a result here. But the 'Greetings' matches the one
 from default 'HTML Autoresponse template' template [3].
 
 
 Chris
 
 [1]
 https://github.com/bestpractical/rt/blob/stable/lib/RT/Tickets.pm#L828-997
 [2]
 https://bestpractical.com/docs/rt/4.2/full_text_indexing.html#UNINDEXED-SEARCH
 [3] https://github.com/bestpractical/rt/blob/stable/etc/initialdata#L260-285
 

Hi Chris,

The fulltext search applies to all attachments in the DB, which is what I
would expect it to do. I do agree, that a method to choose which type 
attachments
should be searched like the HistoryFilter function would be a useful 
enhancement.
In general, a content search on a noise word like Greetings would not really
be expected to produce useful results. It might me useful to add such terms to
your stop word list in your fulltext system. That would provide more useful
results even in the absence of attachment type filtering.

Regards,
Ken


Re: [rt-users] Queues, surveys for agents, and forms

2015-05-06 Thread k...@rice.edu
On Wed, May 06, 2015 at 10:17:27AM +0530, Geico Caveman wrote:
 Thanks Loic!
 
 I am glad to hear that it is easy to do so. But precisely **how** is the
 question. Does it go into the config file as a new block?
 
 That said, is it possible to move tickets between queues (ensuring that the
 ticket number does not change)? That functionality is essential as very
 often as a request courses through the system, it has to go from one office
 to another (and the only person who can decide where it goes next is the
 agent in the office sending it).
 

Hi,

If you give the other groups that need to move tickets into other queues
the CreateTicket and SeeQueue rights for those queues, they will show up
in their dropdown box and they can pass tickets to those queues. They
will not see the tickets in those queues. We do this often. Make sure
you do this with groups and group permissions to keep it managable.

Regards,
Ken


Re: [rt-users] store data in flat files

2015-05-06 Thread k...@rice.edu
On Wed, May 06, 2015 at 09:30:19PM +, Aaron Guise wrote:
 Hi Marc,
 
 You can create actions and conditions in Flat files ( See
 http://requesttracker.wikia.com/wiki/WriteCustomAction#From_.22User_Defined.22_to_a_module
 )
 
 I don't believe you can do this with templates though.
 
 A sidenote too you still have to add relevant entries to the database in
 order to use Conditions and Actions in Scrips.
 
 
 On Thu, May 7, 2015 at 2:45 AM Marc Chantreux m...@unistra.fr wrote:
 
  hello people,
 
  i would like to store (or sync from) the scrips, conditions and
  templates into files instead of databases. is there a way to do that?
 
Hi Marc,

If you are using PostgreSQL, you can use a file foreign data wrapper to
map a file to a DB table. I do not know what other DBs support that as
well.

Regards,
Ken


[rt-users] SelectOwnerAutocomplete fails on mobile UI RT 4.2.10

2015-05-05 Thread k...@rice.edu
Hi RT users,

While testing RT 4.2.10, I noticed that the user dropdown is
replaced with a non-functional autocomplete box on both Android
and iOS phones. Is the only way to fix that is to bump the limit
up from 50?

Regards,
Ken


Re: [rt-users] Ticket history view: toggle all, comments / correspondence

2015-04-16 Thread k...@rice.edu
On Thu, Apr 16, 2015 at 09:06:13PM +, Karres, Dean wrote:
 Hi,
 
 We hope to replace an ancient, homegrown ticketing system with RT.  There is 
 a feature in the old system that my boss hopes is available in RT.  This is 
 the idea of a worklog.  Not every queue or ticket will require such a 
 thing.  It might be possible that the Comments in RT will suffice.  Is it 
 possible to look a ticket's History and see ONLY the comments?  It doesn't 
 look like it but I have missed other obvious stuff recently.
 
 I have seen the History Filter and Brief History extensions but I do not see 
 how they work really.  I am not sure they really apply here.  I looked at 
 creating a custom Search that would perhaps display the concatenated comment 
 thread for each ticked in a queue but how to do that was not obvious
 
 Basically is it possible to toggle the History view for a tickets and see all 
 the correspondence + comments; or only the correspondence; or only the 
 comments?
 
 

Hi Dean,

I would take a look at the code for:

 Show all quoted text — Show full headers 

for the ticket display page. Either add something similar as a local mod
or re-purpose an existing toggle for your use. We did this in an earlier
version to allow the ticket display to filter the meta-data changes out
of the history display to speed up rendering. That functionality was added
to the base system in more recent releases, but the changes were quite
simple.

Regards,
Ken


Re: [rt-users] profiling/monitoring on requesttracker

2015-04-15 Thread k...@rice.edu
On Wed, Apr 15, 2015 at 12:42:38PM +, Kotu, Srinath wrote:
 Hi All,
 
 I want to monitor the performance of my requesttracker and I wanted to ask 
 the folks here if there exists any tool which can help in 
 profiling/monitoring the performance of requesttracker. It would be very help 
 if someone could provide recommended tune-ups for improving the performance.
 
 Thanks and Regards
 Srinath Kotu

Hi,

Probably the most important thing to monitor in RT is the performance of the
database queries, since the performance of the user interface directly reflects
that. Based on your choice of backend, take advantage of its slow query 
logging
to analyze it performance. For PostgreSQL, pgbadger is useful for drilling down
and identifying performance issues.

Regards,
Ken


Re: [rt-users] Could not load a valid user

2015-04-09 Thread k...@rice.edu
On Thu, Apr 09, 2015 at 12:34:33PM +, Daniel Moore wrote:
 Hello,
 
 I have an issue where we keep getting emails for ONE particular email that 
 says Cannot load a valid user.
 
 I have already added this user into RT. I have even deleted and re-added 
 him (I deleted it from the SQL database and ensured no reference to it all 
 was in RT). He is back in the system.
 
 I have configured my RT_SiteConfig.pm three different ways with no avail.
 
 Set( $ValidateUserEmailAddress, 1); current setting
 
 #Set( $ValidateUserEmailAddress, 0); previous setting
 
 Set( $ValidateUserEmailAddress, 0); original setting
 
 I do not know why this is still happening even though I have tried to turn 
 this off. I originally set it up because this was new to our organization 
 (this version) and we had a lot of junk emails getting through. I thought I 
 had turned this off by commenting it out.
 
 This only effects ONE email address (that I know of) and it happens every day.
 
 Is there a way to permanently turn this off so that it doesn't validate users?
 
 Oh, and this user has administrator privileges in RT so user rights are not a 
 problem. This is our IT email address.
 

Hi Daniel,

When we have seen this error, it was the result of our CanonicalizeEmailAddress
function in User_Local.pm (in 3.8.x). Run through that functions logic to 
determine
where the problem is. In our case, the problem was caused by user primary Email
address changes. The permissions of the account do not matter since the cause is
the failure to determine the correct Email address. I hope this helps.

Regards,
Ken


Re: [rt-users] Could not load a valid user

2015-04-09 Thread k...@rice.edu
You can fix the CanonicalizeEmailAddress function to handle the fact that
their are case differences and select the correct address to use in those
cases.

Regards,
Ken

On Thu, Apr 09, 2015 at 02:32:52PM +, Bryon Baker wrote:
 We have this same issue.  I have track down the issue to the fact that the 
 email address has mixed case somewhere in the address.  To solve it, I have 
 to manually the user so the name is all lower case and the email address 
 matches the incoming email address.
 
 I did at one point have an open case about this issue with Best Practical.  I 
 do not know if this issue has been addressed.
 
 I am running version 4.2.3
 
 Thanks
 Bryon Baker
 Network Operations Manager
 Copesan - Specialists in Pest Solutions
 800-267-3726  .  262-783-6261 ext. 2296
 bba...@copesan.com
 www.copesan.com
 Servicing North America with Local Care
 
 -Original Message-
 From: rt-users [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of 
 k...@rice.edu
 Sent: Thursday, April 09, 2015 8:02 AM
 To: Daniel Moore
 Cc: 'rt-users@lists.bestpractical.com'
 Subject: Re: [rt-users] Could not load a valid user
 
 On Thu, Apr 09, 2015 at 12:34:33PM +, Daniel Moore wrote:
  Hello,
  
  I have an issue where we keep getting emails for ONE particular email that 
  says Cannot load a valid user.
  
  I have already added this user into RT. I have even deleted and re-added 
  him (I deleted it from the SQL database and ensured no reference to it all 
  was in RT). He is back in the system.
  
  I have configured my RT_SiteConfig.pm three different ways with no avail.
  
  Set( $ValidateUserEmailAddress, 1); current setting
  
  #Set( $ValidateUserEmailAddress, 0); previous setting
  
  Set( $ValidateUserEmailAddress, 0); original setting
  
  I do not know why this is still happening even though I have tried to turn 
  this off. I originally set it up because this was new to our organization 
  (this version) and we had a lot of junk emails getting through. I thought 
  I had turned this off by commenting it out.
  
  This only effects ONE email address (that I know of) and it happens every 
  day.
  
  Is there a way to permanently turn this off so that it doesn't validate 
  users?
  
  Oh, and this user has administrator privileges in RT so user rights are not 
  a problem. This is our IT email address.
  
 
 Hi Daniel,
 
 When we have seen this error, it was the result of our 
 CanonicalizeEmailAddress function in User_Local.pm (in 3.8.x). Run through 
 that functions logic to determine where the problem is. In our case, the 
 problem was caused by user primary Email address changes. The permissions of 
 the account do not matter since the cause is the failure to determine the 
 correct Email address. I hope this helps.
 
 Regards,
 Ken
 


[rt-users] RT 4.2 DB access through DB session pooler?

2015-04-02 Thread k...@rice.edu
Hi RT community,

We are working on an upgrade from RT 3.8.x to RT 4.2.x to get to a
supported version of RT and take advantage of the new features and
enhancements. In order to manage the PostgreSQL connections, we are
using pgbouncer. Pgbouncer has several types of pooling that can be
used: session, transaction and statement. The 'transaction' method
re-uses existing DB connections on a transaction (BEGIN/COMMIT)
boundary, while 'session' uses the same DB connection for each
fastCGI RT instance.

With RT 3.8.x we initially tried to use 'transaction' pooling, but
ended up needing to move to 'session' pooling because updates were
ending up in the wrong RT ticket. Is 'transaction' pooling not
usable? It would really help our multi-instance support if we could
use it instead of 'session'. If it can be used, is there something
that needs to be done configuration-wise to have it work. Thank you
for any information that you can give.

Regards,
Ken


Re: [rt-users] RT 4.2 DB access through DB session pooler?

2015-04-02 Thread k...@rice.edu
On Thu, Apr 02, 2015 at 01:21:17PM -0400, Alex Vandiver wrote:
 On Thu, 2 Apr 2015 09:30:13 -0500 k...@rice.edu k...@rice.edu wrote:
  We are working on an upgrade from RT 3.8.x to RT 4.2.x to get to a
  supported version of RT and take advantage of the new features and
  enhancements. In order to manage the PostgreSQL connections, we are
  using pgbouncer. Pgbouncer has several types of pooling that can be
  used: session, transaction and statement. The 'transaction' method
  re-uses existing DB connections on a transaction (BEGIN/COMMIT)
  boundary, while 'session' uses the same DB connection for each
  fastCGI RT instance.
  
  With RT 3.8.x we initially tried to use 'transaction' pooling, but
  ended up needing to move to 'session' pooling because updates were
  ending up in the wrong RT ticket. Is 'transaction' pooling not
  usable? It would really help our multi-instance support if we could
  use it instead of 'session'. If it can be used, is there something
  that needs to be done configuration-wise to have it work. Thank you
  for any information that you can give.
 
 RT doesn't make sufficient use of database transactions that I think
 transaction will be reliable; I expect session is the best you can
 get.  I'm not aware of any configuration knobs that would affect this;
 fixing it would take some internals development.
  - Alex
 

Thank you for the update. That is the behavior that we have observed
and will stick with the session pooling option.

Regards,
Ken


Re: [rt-users] Down System

2015-03-13 Thread k...@rice.edu
On Fri, Mar 13, 2015 at 11:55:41AM +, Bryon Baker wrote:
 I do not have the system set to allow automatic upgrades.
 
 It appears that it have been cause by some testing I was doing, delete a 
 couple of test tickets that had a very large amount of transactions.  The 
 system seems to be running fine after that task was complete.
 
 Which raises another concern it the problem just lurking around waiting to 
 strike again.
 

Hi Bryon,

You need to increase your fcgi timeout value to allow for an
update that takes a long period of time. 40s is way too small.
You need to be able to accomodate the longest query that you
typically run from RT. We have some very long reporting dashboards
and have a 12h timeout to allow them to complete. The mod_perl
configuration we used to use had no timeout at all, for example.
Now by and large most responses take a very short period of time
but you need to allow for the occasional long ones, as you noticed.

Regards,
Ken


Re: [rt-users] fastcgi: comm with server aborted: read failed after installing RTIR

2015-03-10 Thread k...@rice.edu
On Tue, Mar 10, 2015 at 04:02:49PM -0500, Mario Góngora wrote:
 Hello,
 
 I am installing a RT instance with the RTIR plugin. When the plugin
 finished the installation the server showed a Internal Server Error in
 the Web Browser.
 
 We are using RT 4.2.9 and RTIR 3.2.0 versions.
 
 Below are the type of logs that this error is generating.
 
 [Tue Mar 10 09:00:43.794689 2015] [fastcgi:error] [pid 5642:tid
 140086415734528] (104)Connection reset by peer: [client a.b.c.d:58530]
 FastCGI: comm with server /opt/rt4/sbin/rt-server.fcgi aborted: read
 failed
 
 [Tue Mar 10 09:00:43.794830 2015] [fastcgi:error] [pid 19097:tid
 139882731890432] [client a.b.c.d:54743] FastCGI: incomplete headers (0
 bytes) received from server /opt/rt4/sbin/rt-server.fcgi
 
 
 Have you ever experienced this type of error?, can you help me identify
 what could be wrong with the installation? Thanks in advance.
 
 Mario

Hi Mario,

You need to check the RT logs to see what happened. The fastcgi logs
are just telling you that something did.

Regards,
Ken


Re: [rt-users] Loading requests in batch mode ? RT 4.2.9

2015-03-03 Thread k...@rice.edu
On Mon, Mar 02, 2015 at 04:52:17PM -0700, huotg01 wrote:
 As said earlier, I'm now using another tool to manage our requests. With this
 other system, it is possible to export all the still opened tickets, with
 dates when available.I would like to load, in batch, all these tickets in
 RTIs there a way in RT to do that ?In this specific case, would it be better
 to choose another program than RT ?Thanks,Gaston
 

Hi Gaston,

I think they removed the offline tool, which is what I had used previously in
an earlier version, in version 4.2. Now I would use the REST API to load them
into the system. There is a fairly nice example in the mailing list archives.
Search for 'Convert Other Ticketing System DB to RT' in one of the searchable
archives:

http://www.gossamer-threads.com/lists/rt/

The first result has a sample script.

Regards,
Ken


Re: [rt-users] RT customize SendEmail.pm

2015-01-30 Thread k...@rice.edu
On Fri, Jan 30, 2015 at 11:01:36AM +0100, Sternberger, Sven wrote:
 Hello!
 
 - Ursprüngliche Mail -
  Von: k...@rice.edu
  That sounds like a really, really bad idea. This is a great way to start
  a mail loop, having a program Email itself. Why are you trying to do this?
 
 all emails to RT will be filtered with procmail, if the mail is originated
 by the RT, we will reroute the mail to the mailadresses of the queue members. 
 This gives you simple way to send mail from queue_a to all members of queue_b
 
 regards!
 
 Sven
 

Hi Sven,

I must have missed your previous Email. I understand your use of procmail on
the inbound path to RT in order to deliver to the appropriate queues based
on message details. I do not understand what you mean by:

 if the mail is originated
 by the RT, we will reroute the mail to the mailadresses of the queue members.
 This gives you simple way to send mail from queue_a to all members of queue_b

What are members of queue_b? Would you please explain this a little bit
further.

Regards,
Ken


Re: [rt-users] RT customize SendEmail.pm

2015-01-28 Thread k...@rice.edu
On Wed, Jan 28, 2015 at 10:40:32AM +0100, Sternberger, Sven wrote:
 Hello!
 
 
 I want to modify the SendEmail.pm module, to disable the
 check for RTAdresses, so we want to send emails
 even if RT thinks they are RT email adresses.
 
 I would copy the file SendEmail.pm to SendEmail_Local.pm and remove 
 these lines
 
 $self-RecipientFilter(
 Callback = sub {
 return unless RT::EmailParser-IsRTAddress( $_[0] );
 return $_[0] appears to point to this RT instance. Skipping;
 },
 All = 1,
 );
 
 would this work?
 
 regards!
 
 Sven
 
 Sven Sternberger
 System Engineer
 Tel.: 040/8998-4397
 DESY IT
 

Hi Sven,

That sounds like a really, really bad idea. This is a great way to start
a mail loop, having a program Email itself. Why are you trying to do this?

Regards,
Ken


Re: [rt-users] RT eats table-tags in html-emails

2015-01-16 Thread k...@rice.edu
On Fri, Jan 16, 2015 at 06:49:05AM -0700, vinz wrote:
 RT is pruning the table, td and tr -tags from emails when you look at them at
 the Ticket/Display.html -page, is there a way to stop RT from doing this?
 
 I tried enabling Rich text (HTML) in my preferences and looked at
 \share\html\Elements\ShowMessageStanza but I'm just a beginner when it comes
 to perl.
 
 I'm currently on RT 4.2.6 and use apache, mod_fcgi and nginx as a reverse
 proxy.
 
 Thanks in advance,
 vinz
 
Hi Vinz,

You need to adjust the allowed tags in the HTML::Scrubber object by adding a
Web_Local.pm:

https://www.bestpractical.com/docs/rt/4.2/RT/Interface/Web.html

Here is what I am using because I wanted to allow the tables to have colors:


package HTML::Mason::Commands;
# Let tables through
push @SCRUBBER_ALLOWED_TAGS, qw(TABLE THEAD TBODY TFOOT TR TD TH);
# Allow bgcolor to be set
$SCRUBBER_ALLOWED_ATTRIBUTES{bgcolor} = '^\s*\#[a-fA-F0-9]{3,6}\s*';
1;


Make sure to set the option in your RT_SiteConfig.pm

Set($TrustHTMLAttachments, 1);

I think that is all I needed to do. Then restart after clearing your Mason
cache.

Regards,
Ken


Re: [rt-users] Migrating maildomain

2014-12-19 Thread k...@rice.edu
On Fri, Dec 19, 2014 at 09:13:18AM +0100, markus.wildb...@eu.magna.com wrote:
 Hi guys!
 
 We are currently in a corporate-wide migration process of our mail 
 domains.
 Old domain: @xy.company.com
 New domain: @company.com
 
 We are using ExternalAuth to connect to our LDAP. At the moment, the mail 
 addresses in LDAP correspond to the old maildomain.
 If a user logs on at RT (or sends a mail), is the email address updated 
 automatically or do we get new users with the new mail adresses?
 How could I tell RT, that two mail addresses correspond to the same user?
 Is there anything i could configure??
 
 Would be great, if someone has some hints for me where to start...
 
 Greetings,
 Markus

Hi Markus,

We run an update for the user's information in RT nightly based on their
uid in the directory. In our case we let our community select their preferred
Email address to be used by official communication. The only gotcha was to
ensure that CanonicalizeEmailAddress would accept both the old account address
and the new address during the transition period. In your case, it should be
one-to-one, but if you do not account for it you can get a failed to create
user error due to the conflict.

Regards,
Ken


Re: [rt-users] How do the 'One-time Cc' and 'One-time Bcc' lists get populated

2014-12-17 Thread k...@rice.edu
On Wed, Dec 17, 2014 at 10:45:19AM +1100, Alex Peters wrote:
 The One-time Cc list is constructed by collecting all of the addresses
 related to all of the ticket's transactions and then removing addresses
 belonging to requestors.
 
 Is someone still regularly CC-ing this departed user in new tickets?
 Alternatively (although I'm not sure that this is relevant), is that RT
 user set up as a queue-level CC?
 
 By adding this user's address to the $RTAddressRegexp regex, you're telling
 RT that it directly receives mail to that address, which could have
 unintended consequences (e.g. inability to add or re-add this email address
 to tickets).
 

Hi Alex,

I know about the pitfall of using $RTAddressRegexp but the problem
I have is that even for new test tickets created by Email that I send
which definitely does not have the address in question as a Cc, the
address is added as a one-time Cc/Bcc option. :( I tried to find a
commandline script to pull the addresses to see if I could figure out
where the address is originating, but I did not succeed. It would be
fine if the address was only added if it was Cc-ed earlier.

Regards,
Ken

 On 17 December 2014 at 06:39, k...@rice.edu k...@rice.edu wrote:
 
  On Mon, Dec 15, 2014 at 04:08:52PM -0600, k...@rice.edu wrote:
   Hi RT Users,
  
   I am trying to clear an address that keeps appearing in the
   One-time Cc/Bcc list on the Reply form for a ticket. The user
   is no longer here, but the address keeps showing up in the
   Reply form for new tickets. How is that list constructed?
  
   Regards,
   Ken
  
 
  Okay. It looks like I can add the address to the $RTAddressRegexp
  and it will remove it. I was hoping that there was some type of
  DB/shredder/GUI action that could be used instead of polluting
  the regex.
 
  Regards,
  Ken
 


Re: [rt-users] How do the 'One-time Cc' and 'One-time Bcc' lists get populated

2014-12-17 Thread k...@rice.edu
On Wed, Dec 17, 2014 at 11:50:38AM -0500, Kevin Falcone wrote:
 On Wed, Dec 17, 2014 at 08:55:20AM -0600, k...@rice.edu wrote:
  I have is that even for new test tickets created by Email that I send
  which definitely does not have the address in question as a Cc, the
  address is added as a one-time Cc/Bcc option. :( I tried to find a
  commandline script to pull the addresses to see if I could figure out
  where the address is originating, but I did not succeed. It would be
  fine if the address was only added if it was Cc-ed earlier.
 
 [I'm assuming you mean the checkboxes that appear near
 one-time-cc/one-time-bcc]
 
 That list comes from Ticket-TransactionAddresses which calls
 Attachment-Addresses and it looks on From/To/Cc/a few other things on
 each correspond/comment in the ticket, so somewhere in there, that
 email must appear.  Maybe the code (which is quite simplistic) will
 shed some light.
 
 -kevin

Hi Kevin,

Thank you for the information. I checked out the code and it is quite
basic, as you mentioned. I know that I did not have the Email address
in question in my test Emails so I do not know where it would have
come from. Is there any type of caching within the RT backends or
maybe the browsers that could cause that behavior? Thank you again
for the update.

Regards,
Ken


Re: [rt-users] How do the 'One-time Cc' and 'One-time Bcc' lists get populated

2014-12-16 Thread k...@rice.edu
On Tue, Dec 16, 2014 at 11:32:24AM -0600, Matt Zagrabelny wrote:
 On Mon, Dec 15, 2014 at 4:08 PM, k...@rice.edu k...@rice.edu wrote:
  Hi RT Users,
 
  I am trying to clear an address that keeps appearing in the
  One-time Cc/Bcc list on the Reply form for a ticket. The user
  is no longer here, but the address keeps showing up in the
  Reply form for new tickets. How is that list constructed?
 
 Hi Ken,
 
 What version of RT are you using?
 
 -m
 

We are currently running 3.8.last and working on an upgrade to
4.2.x.

Regards,
Ken


Re: [rt-users] How do the 'One-time Cc' and 'One-time Bcc' lists get populated

2014-12-16 Thread k...@rice.edu
On Mon, Dec 15, 2014 at 04:08:52PM -0600, k...@rice.edu wrote:
 Hi RT Users,
 
 I am trying to clear an address that keeps appearing in the
 One-time Cc/Bcc list on the Reply form for a ticket. The user
 is no longer here, but the address keeps showing up in the
 Reply form for new tickets. How is that list constructed?
 
 Regards,
 Ken
 

Okay. It looks like I can add the address to the $RTAddressRegexp
and it will remove it. I was hoping that there was some type of
DB/shredder/GUI action that could be used instead of polluting
the regex.

Regards,
Ken


[rt-users] How do the 'One-time Cc' and 'One-time Bcc' lists get populated

2014-12-15 Thread k...@rice.edu
Hi RT Users,

I am trying to clear an address that keeps appearing in the
One-time Cc/Bcc list on the Reply form for a ticket. The user
is no longer here, but the address keeps showing up in the
Reply form for new tickets. How is that list constructed?

Regards,
Ken


Re: [rt-users] newbie queue managemnet question: bulk actions

2014-10-07 Thread k...@rice.edu
On Tue, Oct 07, 2014 at 04:20:26PM +, Karres, Dean wrote:
 Hi,
 
 I am still demo-ing RT as a replacement for our aging home-built ticketing 
 system.  I currently have RT setup in parallel with our current system.  All 
 in-bound messages are copied.  One goes to the active system and the copy 
 goes to our RT test.  In order to not confuse our user base I have disabled 
 the notification scripts that would auto-send messages back to the requestors.
 
 In the last several days we have had a crush of items on a particular 
 subject.  So many new tickets have been created that 1) I have created a new 
 RT Queue for that topic; but, 2) the rush to move and address the tickets has 
 not been able to keep up with the load.
 
 I'm not sure what the best practice is here.  What I want to do is a bulk 
 move of all new tickets in our general queue who's subject matches a 
 pattern to another queue.  Is that something best handled as a special perl 
 script?
 
 Is that ability inside the TicketSQL language... but I'm not seeing it?  
 Something like an UPDATE operator that lets me change the queue name of 
 tickets that match some other search criteria?
 
 Dean karres


Hi Dean,

Do the search to pull up the correct ticket list and then use the Bulk Update
to change their queue.

Regards,
Ken
-- 
RT Training November 4  5 Los Angeles
http://bestpractical.com/training


Re: [rt-users] '.' as delimiter/boundary breaks domain name searches

2014-10-02 Thread k...@rice.edu
On Thu, Oct 02, 2014 at 10:56:56AM -0400, Kevin Falcone wrote:
 On Wed, Oct 01, 2014 at 03:50:43PM -0400, Jeff Blaine wrote:
  [ Similar, but unrelated to my other message from 10 minutes ago. ]
  
  It appears any '.' is interpreted as a word boundary with
  Pg full-text indexing turned on.
  
  Is that known to be true, or am I wrong?
  
  This breaks searches for FQDNs names in ticket contents.
  
  Searching for 'foobar' will hit foobar.org
  
  Searching for 'foobar.org' will not hit 'foobar.org'
 
 What FTS will match/return is dictated by your database and its
 configuration.
 
 Have you reviewed the Postgres full text search documentation for your
 release of Pg?
 
 http://www.postgresql.org/docs/8.4/static/textsearch.html
 
 -kevin


Wow! PostgreSQL 8.4, 4 major releases back! I cannot be certain that I
am recalling this correctly, but the default parser in older versions
of PostgreSQL did have that behavior. I do not know when they made the
change to fix it. What do you get when you run:

rt3=# select plainto_tsquery('rice.edu');
 plainto_tsquery 
-
 'rice.edu'
(1 row)

I seem to recall that in the older version when I saw this issue, it
returned:

 plainto_tsquery
-
 'rice'  'edu'

You may be able to make a custom config for your text search using
the definitions from the current release. I just ended up searching
for 'rice' instead of 'rice.edu', for example.

Regards,
Ken
-- 
RT Training November 4  5 Los Angeles
http://bestpractical.com/training


Re: [rt-users] deleting attachments

2014-09-09 Thread k...@rice.edu
On Tue, Sep 09, 2014 at 01:52:25PM +0300, Woody - Wild Things wrote:
 Hello,
 
 My rt4 database has now hit 10GB and i want to clean it out by
 removing some old attachments.
 As far as i an see from rt-shredder attachments can only be removed
 by size, and not created before a certain date.
 Can I just delete the attachments directly from the database with
 sql? or is that unwise?
 
 thanks
 
 w.
 

Hi Woody,

If you are deleting attachments created before a certain date, you are
effectively removing all of the ticket data so you should just remove
all tickets before a certain date. They are numbered sequentially so
that is easy to do. Otherwise, just removing the larger attachments can
free up space. I am curious, 10GB does not seem terribly large. Is the
size causing any performance issues with your system?

Regards,
Ken
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training


Re: [rt-users] Cannot creat articles with content

2014-09-03 Thread k...@rice.edu
On Wed, Sep 03, 2014 at 04:13:22PM -0500, Donald Harper wrote:
 Hello, folks.
 
 I am running RT 4.2.6 under FreeBSD 10.0-RELEASE, with perl5 5.16.3_11 
 and apache22 2.2.27_6 and I am trying to create articles either from a 
 ticket (Display ticket - Actions - Extract Article) or directly with a 
 new article (Articles - Create), and I am not having much luck.
 
 I have read 
 http://www.bestpractical.com/docs/rt/4.2/customizing/articles_introduction.html
  
 but did not find anything to help me.
 
 When I try to extract an article from a ticket, and select the Class and 
 the topic, the page called 'Extract article from ticket ## into class 
 foo', the drop down boxes on each field only has one value of '-'.  When 
 I click on 'Create', it will create an article without any content, but 
 the rest of the fields (Basics, Links, Topics) will have values.
 
 When I create a new article from scratch via Articles - Create - Chose 
 Topic, the form which comes up  
 (https://example.com/rt/Articles/Article/Edit.html?Class=1) has editable 
 fields under Basics, Links, and Topics, but *not* Content.
 
 I have debugging enabled, and I see no errors in the log during this 
 process.
 
 Any pointers on where to look?  I have no extensions dealing with 
 articles installed.
 
 Thanks!
 
 Don
 
Hi Don,

I have seen that happen when the user does not have the appropriate rights
to the custom field that is to hold the article content. Check those ACLs
in the RTFM configuration area.

Regards,
Ken
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training


Re: [rt-users] Catch all ticket changes in one scrip

2014-08-22 Thread k...@rice.edu
On Fri, Aug 22, 2014 at 05:49:29AM -0700, andriusk wrote:
 Hello,
 
 I'm trying to figure out, how can I catch all the changes made to ticket
 fields in one scrip.
 It would be like OnUpdateTicket script, which will gather all the changes
 made, and sync them with DB outside trought REST.
 
 Is there any solution, or maybe code example doing all of that in RT itself
 (github)?
 
 I do not want a scrip to send every changed field in separate requests. Is
 it possible?
 

You need to use TransactionBatch mode and have your scrip run after any
other change inducing scrips.

Regards,
Ken
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training


Re: [rt-users] RT Performance Tuning

2014-08-13 Thread k...@rice.edu
On Wed, Aug 13, 2014 at 01:35:16AM -0500, Lists wrote:
 Hi All,
 
 I am getting ready to deploy RT 4.2.6 to a large population of
 users.  We are currently running RT 3.8.1 so I expect they will see
 a pretty good speed improvement.
 
 I was wondering if there are any other tweaks or optimizations I can
 make to Apache and MySQL to increase performance even more?
 
 Thanks,
 
 Dave

Hi Dave,

With zero details about your setup:

1. Use FastCGI and not mod_perl for better resource management and
   performance. Putting nginx in front of a pool of fastCGI threads
   provided a much nicer user experience for us.
2. Benchmark frequent queries used on your existing system against your
   new system and look for performance regressions using user accounts
   and not root/superuser accounts.

We are still running RT-3.8.last waiting for RT-IR to be available
for RT-4.2.x so we can upgrade so I do not have any specific problems
or pitfalls to report, yet.

Regards,
Ken
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training


[rt-users] RTIR for RT 4.2?

2014-06-20 Thread k...@rice.edu
Hi,

Are we any closer to an ETA for a RT 4.2 compatible RTIR? We
are currently on the unsupported 3.8 series and would prefer
to upgrade to the current release of RT, instead of starting
behind the curve.

Regards,
Ken
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training


Re: [rt-users] Ticket replies not going to another queue

2014-05-30 Thread k...@rice.edu
On Fri, May 30, 2014 at 12:56:17PM +, Guadagnino Cristiano wrote:
 Hi all,
 RT usage is taking off lately here: we started with one division using 
 it, and now there are four divisions using it and a fifth coming soon.
 
 We have been using just one RT instance, using groups and ACLs to 
 separate the queues of one division from the others.
 Every division has its own email address that forwards to RT, and 
 everything has been working very well till now.
 
 However, we have had a little nuisance that is slowly becoming bigger 
 due to the increased number of users and requestors.
 
 The problem arises when one requestor (requestors often are completely 
 unaware of the fact we are using RT internally) send a ticket to a 
 division, and that division replies that the request should be made to 
 another division. At this point, the requestor often takes the reply and 
 forwards it to the other division, leaving it intact.
 Now, if the other division is using RT, the mail message from the 
 requestor is again turned into a ticket and - due to the fact that it 
 already contains a ticket number - it is appended to the old ticket 
 thread instead of creating a new ticket in the other division's queues.
 
 Is anybody having this issue? How did you solve it?
 
 Ideally I think RT should append to the original ticket only if the 
 receiving address is the same as the original ticket. Or at least, this 
 is how it could work in our environment. Anybody foreseeing possible 
 problems with this approach?
 
 Thank you in advance.
 Bye
 Cris

Hi Cris,

We a more general Helpdesk as one of the areas using RT and they have
the rights to put a ticket in any of the other areas' submission queues.
Then if something is mis-routed, we just drop it in the Helpdesk submission
queue for re-routing.

Regards,
Ken
-- 
RT Training - Boston, September 9-10
http://bestpractical.com/training


Re: [rt-users] Maximum recipients allowed

2014-05-19 Thread k...@rice.edu
On Mon, May 19, 2014 at 02:41:19PM +0200, Olivier Lumineau wrote:
 Hi,
 we are using RT 3.8.7, and to filter spam more efficiently, I wanted
 to know if there was an easy way in RT to limit ticket recipients
 (to + cc + bcc) .
 
 I don't want more than 10 or 15 recipients by ticket, to prevent
 that a spam withs hundreds mail addresses pollute our RT.
 
 Thanks
 
 -- 
 Olivier
 
Hi Olivier,

I used the following in Email_Local.pm. Maybe you can do something similar.

Regards,
Ken
---
sub ParseCcAddressesFromHead {
my %args = (
Head= undef,
QueueObj= undef,
CurrentUser = undef,
@_
);

my @recipients =
map lc $_-address,
map Email::Address-parse( $args{'Head'}-get( $_ ) ),
qw(To Cc);

my @res;
foreach my $address ( @recipients ) {
$address = $args{'CurrentUser'}-UserObj-CanonicalizeEmailAddress( 
$address );
next if lc $args{'CurrentUser'}-EmailAddress   eq $address;
next if lc $args{'QueueObj'}-CorrespondAddress eq $address;
next if lc $args{'QueueObj'}-CommentAddresseq $address;
next if RT::EmailParser-IsRTAddress( $address );

push @res, $address;
   }

#
# Limit the number of Cc addresses that we add to a
# ticket during the initial create to minimize damage
# to our Email reputation when SPAM slips through DSPAM.

$RT::Logger-debug($#res Ccs);
if ( $#res  3 ) {
my @riceCc;
my @nonriceCc;
@riceCc = grep /rice.edu/i, @res;
@nonriceCc = grep !/rice.edu/i, @res;
$RT::Logger-debug($#riceCc riceCcs, $#nonriceCc nonriceCcs);
if ($#nonriceCc  1) {
@res = (@riceCc, @nonriceCc[0]);
}
}

return @res;
}
---
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] FullTextSearch the parts of word

2014-04-09 Thread k...@rice.edu
On Wed, Apr 09, 2014 at 05:53:35PM +0400, Arkady Glazov wrote:
 Hi,
 
 I have installed RT 4.2 with PostgreSQL FullTextSearch. In base i can
 search only the whole word. Is in possible search only for parts of word?
 --
 Best regards,
 Arkady Glazov
 http://globster.ru

Hi Arkady,

What do you mean by parts of a word? You can alter what can be searched
for by changing the parsers and dictionaries:

http://www.postgresql.org/docs/9.3/static/textsearch.html

But you will need to understand a LOT more about how it works to do that
successfully. Is there a particular problem you are trying to solve?

Regards,
Ken
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] Use default global scrips for all queues but one?

2014-04-08 Thread k...@rice.edu
On Tue, Apr 08, 2014 at 11:48:03AM -0400, Jeff Blaine wrote:
 Hi all,
 
 We 8 queues, all of which make use of the default global scrips.
 
 We have a need to set up 1 more queue where we don't want some of
 the global scrips to run (we want to override some or do away with
 some entirely).
 
 Before I just start flailing at this, I figured I'd ask. I suspect
 someone has to have wanted this in RT's many years.
 
 Is there anything smart in RT to allow this?
 
 Do queue-owned scrips take precedence in some way? What's the
 mechanism?
 
 Or am I going to have to (yikes)... make a copy of the current set
 of global scrips for each of the existing 8 queues, and then 1 more
 customized copy for the 1 queue?

4.2 should allow this. You can also modify the Default Scrips and add
a User Defined Condition that returns 0 if the Queue is on that you
want to exempt.

Cheers,
Ken
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] Forward an entire ticket w/ history to another RT system - Possible?

2014-04-07 Thread k...@rice.edu
On Mon, Apr 07, 2014 at 06:47:52PM +, Cena, Stephen (ext. 300) wrote:
 We're having a little political issue right now. We're looking to add another 
 queue to our service department, but the manager feels it shouldn't be a part 
 of the service desk. One request I'm getting is if a ticket falls out of 
 service's hands, can it be forwarded to a compeltely different RT system for 
 say customer contacts? We're trying to get thigns worked out so it won't have 
 to come to that but I'm asking in advance. Is this something that it's 
 recommended to hire BestPractical to help set up?
 
 Stephen J. Cena
 Systems Administrator - MIS/IT Dept
 Quality Vision International
 850 Hudson Ave
 Rochester,NY 14620
 Phone: 585-544-0450 x300

Hi Stephen,

I have a quick question. Have you considered just adding the queue to your
existing system and using ACLs and different Email addresses to partition
it away from your existing users? We do that here for several groups and
it works well.

Regards,
Ken
-- 
RT Training - Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] Add 'Owner' dropdown on Display.html?

2014-03-18 Thread k...@rice.edu
On Tue, Mar 18, 2014 at 12:09:02PM +, Baz wrote:
 html
   head
 
 meta http-equiv=content-type content=text/html; charset=ISO-8859-1
   /head
   body bgcolor=#FF text=#00
 font face=Helvetica, Arial, sans-serif I'd like to be able to
   change the owner of the ticket from the 'Display.html' page
   without having to go to the 'People' page first.br
   br
 /fontfont face=Helvetica, Arial, sans-serifWhen viewing a
   ticket I'd like to have a selectable dropdown in the 'People'
   section that works in a similar manner to the one in the
   'Reminders' section, naturally with a 'Save' button too.br
   br
   Can someone point me in the correct direction please?br
   br
   Version 4.2.2, installed on Ubuntu Linux.br
 /font
   /body
 /html

Hi Baz,

Try RT::Extension::QuickUpdate. It does what you want.

Regards,
Ken
-- 
RT Training London, March 19-20 and Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] Full text search/index - Migrate to Postgres or MySQL + Sphinx?

2014-03-13 Thread k...@rice.edu
On Thu, Mar 13, 2014 at 02:47:10PM +, Mark Goodge wrote:
 On 13/03/2014 14:32, Kevin Falcone wrote:
 On Thu, Mar 13, 2014 at 02:06:40PM +, Mark Goodge wrote:
 On 13/03/2014 14:00, Cena, Stephen (ext. 300) wrote:
 We currently run two RT 4.0.19 systems on Ubuntu 12.04LTS and MySQL
 5.5.35. Management is now asking me to enable full text searching on the
 sites so we can search inside the body of the tickets. From what I've
 read, our current configuration won't support it due to MySQL 5.5.x not
 supporting it natively.
 
 MySQL has supported fulltext indexes since version 5.0. What makes you
 think otherwise?
 
 It supported InnoDB Full Text indexing in 5.0?
 
 No; you need to use MyISAM until 5.6.
 
 But that should not be an issue here; I know that RT uses InnoDB by
 default but there should be no reason why the table you want to
 search can't be converted to MyISAM.
 
 Mark

Hi Mark,

I do not use MySQL here, but the table that is to be indexed can be
very large and I certainly would not want to wait for a myisamchk to
complete after a crash. The sphinx option is the only viable one for
use with mysql. Moving to PostgreSQL would work but as suggested by
others, if your expertise is with MySQL, stick with MySQL.

Regards,
Ken
-- 
RT Training London, March 19-20 and Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] RT::Authen::ExternalAuth LDAPS

2014-03-04 Thread k...@rice.edu
TLS would still be over port 389 if it was being used.

Regards,
Ken

On Tue, Mar 04, 2014 at 11:29:48AM -0600, Dewhirst, Rob wrote:
 I am successfully authenticating via LDAP (cleartext) over TCP 389
 using RT::Authen::ExternalAuth
 
 However, once I change:
 
 Set($ExternalServiceUsesSSLorTLS,1);
 
 and in the ExternalSettings for My_LDAP:
 
 'tls'   =  1,
 'ssl_version'   =  3,
 
 It still authenticates (successfully) over TCP 389.
 
 I noticed someone else had a similar problem but was lacking
 Net::SSLeay.  Not my case here (I don't see how you can use Net::LDAP
 without Net:SSLeay)
 
 [root@rtir-test ~]# cpan -i Net::SSLeay
 CPAN: Storable loaded ok (v2.20)
 Reading '/root/.cpan/Metadata'
   Database was generated on Mon, 03 Mar 2014 20:17:02 GMT
 CPAN: Module::CoreList loaded ok (v2.18)
 Net::SSLeay is up to date (1.58).
 [root@rtir-test ~]#
 
 I have debug logging enabled in RT, but it doesn't seem to tell me
 anything useful since nothing is failing.
 
 RT-Authen-ExternalAuth-0.17
-- 
RT Training London, March 19-20 and Dallas May 20-21
http://bestpractical.com/training


Re: [rt-users] Encrypting the DB password in RT_Siteconfig

2014-01-07 Thread k...@rice.edu
On Tue, Jan 07, 2014 at 09:36:03PM +, Brent Wiese wrote:
 Is there a way to use an encrypted value for $DatabasePassword in 
 RT_Siteconfig?
 
 Thanks,
 Brent
 
Hi Brent,

DBD::Pg uses the libpq library, which supports GSSAPI. You could use that
for your authentication instead -- at least if you are using PostgreSQL
as your database.

Regards,
Ken


Re: [rt-users] RT loses MySQL connection

2013-11-25 Thread k...@rice.edu
On Sat, Nov 23, 2013 at 08:35:06AM -0800, Jay Christopherson wrote:
 Interestingly, adjusting the wait_timeout to the default (8 hours) worked
 great - for 8 hours.  After that 8 hours, RT once again lost all
 connectivity to the database.  Running a show processlist on MySQL showed
 that RT had no connections to the DB, even though RT was still running.  A
 restart fixed it - for now.
 
 I am not sure how RT does connection handling, but it seems like it should
 attempt to reconnect?
 

Hi Jay,

Again, a properly managed system does not require and certainly does not expect
to have a connection ripped out from under it. Turn off your timeout and you
will be fine. RT will connect just fine, as you have seen. It should not need
to reconnect to a properly configured DB once it has a valid connection.

Regards,
Ken


Re: [rt-users] RT loses MySQL connection

2013-11-22 Thread k...@rice.edu
On Thu, Nov 21, 2013 at 06:05:23PM -0800, Jay Christopherson wrote:
 No, no entries beyond the startup messages.  I thought maybe there would be
 some connection errors (a flush-hosts situation or something), but nothing.
 
 
 On Thu, Nov 21, 2013 at 6:02 PM, Alex Vandiver 
 ale...@bestpractical.comwrote:
 
  On Thu, 2013-11-21 at 15:20 -0800, Jay Christopherson wrote:
   I just installed a new instance of RT (4.2.1).  I've been using RT for
   quite a long time now, through a lot of different versions, but this
   is a new issue for me.
 
  Is there anything of note in the mysql logs?
   - Alex
 

Hi Jay,

It might be a long shot, but do you have a connection timeout set for your
MySQL DB? Try disabling that. I was bit by that once and was astounded to
find out that the DB just dropped a valid connection like that. It seems
more useful in a broken web app type of way to keep from leaking connections
but normal apps do not expect to lose a good connection. :)

Regards,
Ken


Re: [rt-users] Searching in RT

2013-08-30 Thread k...@rice.edu
On Fri, Aug 30, 2013 at 06:20:27PM +, Bryon Baker wrote:
 I have ran into an issue when search for tickets.
 
 I am searching for a number in the subject line when I am doing this RT 
 assumes that I am search for a ticket number.  Is there something I can do to 
 change this behavior?
 
 I am using version 4.13
 

Hi Bryon,

I am using 3.8.13+secpatches and in it if I lead or follow the number with
a SPACE it searches in the subject. I do not know if that will work on 4.x.

Regards,
Ken


Re: [rt-users] nginx / varnish / apache with RT?

2013-08-06 Thread k...@rice.edu
On Tue, Aug 06, 2013 at 09:04:25PM +1000, Chris Herrmann wrote:
 Hi all,
 
 i've been playing with an NVA setup for some lamp sites (Joomla) and the
 scaling is looking pretty amazing... still early days but initial results
 look very promising.
 
 anyway, it got me thinking to whether varnish would work with RT. I'm
 familiar enough with it to understand the generic accelerator principle ...
 but I don't see how it would work with generated content - because of RT
 handles sessions / authentication / etc. Or is it smart enough to know that
 if I visit the same ticket twice in a row and the ticket hasn't changed, to
 give me cached content?
 
 I've tried searching for perl varnish and request tracker varnish type
 pages but have only found one archive thread
 http://www.gossamer-threads.com/lists/rt/users/72455 which appears
 inconclusive - does it actually make a noticeable difference or not?
 Internally we're using a squid proxy, and we have a small number of users,
 so not sure that the static page elements being handled by varnish or nginx
 would offer a huge advantage? anyway keen to hear people's experiences or
 other thoughts on accelerating RT...
 
 Cheers,
 
 Chris

Hi Chris,

We have tried nginx/fastCGI both with and without nginx caching the static
content. The biggest win was just moving from Apache/mod_perl to the nginx/
fastCGI. It made RT much more scalable and allowed us to manage its resource
allocation better. I do not think that varnish would do anything except add
complexity to the setup.

Regards,
Ken


Re: [rt-users] Inventory Type Add-On

2013-07-30 Thread k...@rice.edu
On Tue, Jul 30, 2013 at 03:35:30PM -0400, Matt Brennan wrote:
 Good Day,
 
   I was looking, and don't see anything, so I'm wondering if this exists.
 We are considering adding a queue to RT to track hardware repairs. As such,
 we would want to keep a list of parts on hand, and be able to associate
 parts used with the repair ticket. Before I consider coding it myself, I'm
 wondering if anything like that currently exists for RT.
 
 Using RT 4, in case it matters.
 
 Thanks,
 Matt

Maybe you could use AT for that with the appropriate custom fields.

Ken


Re: [rt-users] Inventory Type Add-On

2013-07-30 Thread k...@rice.edu
On Tue, Jul 30, 2013 at 03:54:21PM -0400, Matt Brennan wrote:
 I had considered using AT to track the devices themselves that are being
 repaired. I had thought about whether there was a way to use AT to do this,
 but I don't see any way to create a finite supply of parts and to subtract
 from that inventory when used (unless I created an asset for every part in
 inventory which, when you get into things like screws, would be a bit
 ridiculous).
 

I was thinking that the asset would track the part id and then there
would be a custom field with the part count that would be decremented
as used. That is was an inventory system does after all.

Ken


Re: [rt-users] SOS:: many mysql processes are killing RAM, why?

2013-07-23 Thread k...@rice.edu
On Tue, Jul 23, 2013 at 10:14:39AM +0800, Craig Ringer wrote:
 On 07/19/2013 11:42 PM, Alex Decalli wrote:
  
  I have RT 3.8 on mysql 5.1 on ubuntu 11.04. Why do I have many mysql
  processes they are bringing down RAM.
 
 Quite likely you have too many Apache workers with mod_perl, or too many
 fcgi workers if you're using fcgi.
 
 You will need to limit the number of concurrent RT workers - assuming
 that the MySQL workers are even being used by RT, which we don't know
 based on the information you have provided.
 
 Alternately, you can put a *connection pool* in place between RT and the
 database. If you were using PostgreSQL I would advise you to use
 PgBouncer in transaction pooling mode, but I cannot offer much advice
 for MySQL. I'm sure there's a similar pooling proxy.
 
 This sort of question is probably better suited to Serverfault.com than
 the RT list. BTW, text output is usually way more useful than
 screenshots; eg top -b -n 1.
 
Hi Alex,

I will second Craig's suggestion about a connection pooler. We use 
fcgi/pgbouncer
with PostgreSQL here and it works well. The only difference is that we use 
session
mode and not transaction mode with pgbouncer. We had cases of ticket updates 
being
interspersed. Maybe it was a local configuration problem but changing to
session mode fixed it.

Regards,
Ken


Re: [rt-users] RT session cleanup - session table size

2013-07-09 Thread k...@rice.edu
On Tue, Jul 09, 2013 at 12:02:17PM +0800, Craig Ringer wrote:
 On 07/07/2013 08:21 PM, Alex Decalli wrote:
  Hello everybody
  I want to cleanup my session table, it is already about 1 Gigabyte! I hit:
  
  me@myserver:~$ sudo rt-clean-sessions --debug --older 1M
 
 That reminds me - is there any reason RT would get upset if the sessions
 table was suddenly empty after a restart?
 
 I'm wondering if it should be an UNLOGGED table on PostgreSQL 9.1 and
 above, so it doesn't incur write-ahead logging overhead. If it doesn't
 need to be crash-safe and it's OK to just have it truncated after a
 crash recovery restart, that'd be ideal.
 
 Thoughts?
 
Hi Craig,

Truncating the table does not cause any problems. Everyone will just need
to login again. UNLOGGED is okay unless you want to be able to failover
to a DB replica in which case you want them logged to have the backup
DB updated.

Regards,
Ken


Re: [rt-users] Possible to edit ticket content?

2013-06-28 Thread k...@rice.edu
On Fri, Jun 28, 2013 at 07:05:29AM +, Johan Sjöberg wrote:
 Hi
 
 We have a ticket that has grown extremely large because of many mails and 
 lots of included quotes. This means that it takes forever to open in RT. Is 
 it possible to edit the database and truncate the content in each post? It 
 seems like the content is stored in the Attachments table, but it seems to be 
 in binary format. We are running RT 3.8.17
 
 Regards,
 Johan

Hi Johan,

Some ideas: Use RT::Extension::HistoryFilter to reduce the number of 
transactions
displayed in the main page. I do not know if an option is available for this but
only display the most recent updates, for some definition of recent, on the main
display page and have them all available on the History tab. Create a new ticket
and refer to the old ticket as a parent or reference.

Cheers,
Ken


Re: [rt-users] Can a scrip do a search like RT::Client::REST does?

2013-06-13 Thread k...@rice.edu
On Thu, Jun 13, 2013 at 10:38:06AM -0700, Landon wrote:
 My scrip looks for currently open Incidents that are related to each of the
 IP addresses in CF.{IP} on an Incident Report.  If it finds one it links
 the Incident Report to that Incident thus making it unnecessary for someone
 to do it manually later.  This might be changed to CustomerID or something
 later.
 
 Anyway - The snippet from my scrip that I'd like to modify with something
 more native instead of using RT::Client::REST is the following.  Is there a
 way to search for tickets without using RT::Client::REST?  I've been
 reading through page after page but I'm not able to figure this one out.
  Is this the only way I'll be able to do it?  It works but it logs itself
 in to RT via the web interface each time a new Incident Report comes in.
 
 use RT::Client::REST;
 ...

Hi Landon,

I think you should be able to use RT::Search from your scrip directly.
Check out the API docs.

Cheers,
Ken


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training


Re: [rt-users] RT behavior when CCs are present in a ticket

2013-05-30 Thread k...@rice.edu
On Thu, May 30, 2013 at 12:04:39PM +, Guadagnino Cristiano wrote:
 Hi all,
 I have received a few complaints from users about a feature of RT.
 After a little experimenting, I find that those complaints are partially 
 reasonable, so I want to share them with you and get some feedback.
 
 When RT receives an email that is bound to an already existing ticket, 
 it notifies everyone in that ticket (requestor, CCs...). So far 
 everything is good.
 
 Now picture this situation: Bill wants to send an email to Tom, CCing 
 John and Jenny and RT (because he wants this conversation to remain 
 recorded in the ticket's history). The mail is linked to an already 
 existing ticket (i.e. the subject contains the magical tag). Bill is not 
 the ticket's original requestor.
 
 Here comes the problem: Tom, John and Jenny will receive one email 
 from Bill and another identical mail from RT. Even Bill will receive his 
 email back from RT. Even worse, all this emails will look like it was 
 the ticket owner who sent them.
 
 I think RT is being overzealous here: since RT already parses the email 
 header looking for CCs, it should know that those messages are not 
 useful, since those persons are already receiving the original email. So 
 it should only notify people who are CCs for the ticket but are NOT 
 included in the email sent from Bill.
 
 What do you think?
 
 Bye
 Cris
 
 p.s. This is happening on our production RT, which is still at 3.8.10. I 
 don't know if RT 4 changed something in this respect.
 

Hi Chris,

RT's basic premise is that it is the issue management system and handles
notifications and updates. If out-of-band additional CC's are done, they 
will get the CC and the RT update. That being said, you can add these
checks yourself to the scrips that send the extra Email to not send
them in this case. If you do, please put them on the wiki since that seems
like useful functionality. Having worked with people using the same
workflow, it resulted in RT missing updates should the updater forget
to reply to RT resulting in missing history. They did much better when
all they remembered was to just reply to the RT message only and it would
handle the needed additional notifications.

Regards,
Ken


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training


Re: [rt-users] Problem with multple new tickets on same subject

2013-05-28 Thread k...@rice.edu
On Tue, May 28, 2013 at 11:16:03AM -0400, Asif Iqbal wrote:
 On Thu, May 9, 2013 at 1:23 PM, k...@rice.edu k...@rice.edu wrote:
 
  On Thu, May 09, 2013 at 05:14:59PM +0100, Mª Eugenia Moreno wrote:
   I am not sure if there is any solution to this. I have been digging
   everywhere for information but I couldn't find any solution.
  
   I am currently using RT 4 as the ticketing system in my company. Below is
   the scenario:
  
   Colleague A emails to the RT’s email and include Colleague B in the loop
  as
   Cc.
  
   RT create new ticket (#1 New Test Ticket) and send auto reply email
   to Colleague A with Ticket ID.
  
   Colleague B ”reply all”  on the original email sent by Colleague A  thus
   creating another ticket on RT (#2 RE: New Test Ticket).
  
   Is there a way to recognize the subject text instead of the ticket ID to
   avoid the creation of a new ticket? The ideal situation would be to add B
   email to the same ticket of A email instead of creating a new ticket. At
   the moment I am doing manually, I go to RT interface and link ticket #2
  to
   ticket #1.
  
   I would be very grateful if someone could help.
  
   Thanks a lot,
  
   Maria
 
  Hi Maria,
 
  You may want to take a look at this set of patches:
 
  http://code.google.com/p/rt-references/
 
  We use something very similar in-house.
 
 
 Can you show what you did different ? I am looking into this code and
 planning to test it out.
 

Our old code only handles the In-Reply-To: header and does not look for
the References: header and uses a direct SQL query to look up the message
ids, yuck. The code at the link above uses the more standard API's. If you
only want to use the In-Reply-To: headers, just delete/comment out the
sections for References:.

Regards,
Ken


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

Re: [rt-users] Problem with multple new tickets on same subject

2013-05-28 Thread k...@rice.edu
On Tue, May 28, 2013 at 12:23:59PM -0400, Asif Iqbal wrote:
 On Tue, May 28, 2013 at 12:20 PM, Kenneth Crocker 
 kenn.croc...@gmail.comwrote:
 
  We had the same problem and opted to train our users to NOT use Reply
  All and then we put that instruction in ALL our templates at the top.
 
 
 
 We have very little faith in our users. They are very good at ignoring
 instructions.
 
 I am curious what kind of wording you put in your template which you suggest
 to be working.
 

In our case, we tried the discouraging the use of Reply All but kept
running into workflows where it was needed unless the entire workflow
was redesigned. After the 2nd reasonable case, we opt-ed for the
programatic solution and everyone is satisfied with it.

Regards,
Ken


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training


Re: [rt-users] Problem with multple new tickets on same subject

2013-05-09 Thread k...@rice.edu
On Thu, May 09, 2013 at 05:14:59PM +0100, Mª Eugenia Moreno wrote:
 I am not sure if there is any solution to this. I have been digging
 everywhere for information but I couldn't find any solution.
 
 I am currently using RT 4 as the ticketing system in my company. Below is
 the scenario:
 
 Colleague A emails to the RT’s email and include Colleague B in the loop as
 Cc.
 
 RT create new ticket (#1 New Test Ticket) and send auto reply email
 to Colleague A with Ticket ID.
 
 Colleague B ”reply all”  on the original email sent by Colleague A  thus
 creating another ticket on RT (#2 RE: New Test Ticket).
 
 Is there a way to recognize the subject text instead of the ticket ID to
 avoid the creation of a new ticket? The ideal situation would be to add B
 email to the same ticket of A email instead of creating a new ticket. At
 the moment I am doing manually, I go to RT interface and link ticket #2 to
 ticket #1.
 
 I would be very grateful if someone could help.
 
 Thanks a lot,
 
 Maria

Hi Maria,

You may want to take a look at this set of patches:

http://code.google.com/p/rt-references/

We use something very similar in-house.

Regards,
Ken


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

Re: [rt-users] Problems with Newest unowned and queue permissions

2013-05-07 Thread k...@rice.edu
On Tue, May 07, 2013 at 07:44:15AM +, Johan Sjöberg wrote:
 Hi.
 
 We have a number of queues for different departments. I have created groups 
 for the staff and set these groups as Admin CC on their respective queues. 
 The problem I have is that the NN newest unowned tickets isn't working 
 correctly. It seems to count tickets in queues that the user does not have 
 rights on. So if I sort it by queue name, and ascending, I do not see any 
 unowned tickets if there are more than NN unowned tickets in queues that I do 
 not have permissions on, if they are earlier in the alphabet than my queues. 
 This is quite annoying since I have to choose a non-optimal sorting order, 
 and risk missing new, unowned tickets.
 We are using RT 3.8.16.
 
 Regards,
 Johan
 
 
Hi Johan,

Have you set $UseSQLForACLChecks? I think that should fix your problem.

Regards,
Ken


Re: [rt-users] Retrieving CustomFields with RT-Jasper

2013-04-29 Thread k...@rice.edu
On Mon, Apr 29, 2013 at 08:23:34PM +0400, Ruslan Zakirov wrote:
 On Mon, Apr 29, 2013 at 10:41 AM, Michael Keetman 
 michael.keet...@qcn.com.au wrote:
 
  Hello, 
 
  ** **
 
  I am not entirely sure this is the right forum for this question, however
  the only other information I can find about RT-Jasper is in this and the
  Devel mailing lists.  
 
  ** **
 
  I have managed to install the RT-Jasper and RT-REST packages, and
  successfully run a report with the ID and Subject shown (both fields
  exposed directly) using Jasper Reports server, however I have had no luck
  getting any Custom Fields to return any data.  
 
  ** **
 
  Can anyone supply sample JRXML showing how this is done?
 
 
 Isn't it easier to let jasper talk to RT's DB directly?
 
 

Jasper can definitely talk to RT's DB directly very simply. The problem
is that then you have to implement RT in the report tool. Using REST
makes access trivial.

Regards,
Ken


Re: [rt-users] Migration to a new server

2013-04-05 Thread k...@rice.edu
On Fri, Apr 05, 2013 at 05:16:44PM +0100, Gary Mason wrote:
 Hi,
 
 I have inherited an RT 3.6.7 system with around 300,000 tickets in
 it, taking up about 40GB of disk space.
 
 The hardware this runs on is getting on a bit, and response times
 are now getting to the frustratingly slow point.
 
 I have a new server (Debian Squeeze) on which I have managed to get
 RT 4.0.7 up and running via backports PPA.  I have managed to
 include all the configuration and scrips from the existing system,
 and have created a few tickets in order to be able to demonstrate
 the updated UI/reporting/graphs etc to the helpdesk team.  People
 here are impressed :)
 
 My problem is that I have been asked to migrate all the current
 tickets over to the new system in order to retain history.  I have
 next to no postgresql knowledge and am at a loss as to how to do
 this. I have briefly looked at the migration documents online, but I
 can't find anything that resembles a run this script, point it to
 the current and new installations, cross your fingers and hold your
 breathe ... type of migration script that would be so useful.
 
 Is there anything that I can read, or can anyone offer some
 suggestions, as to how I can get the ticket information from the
 current to the new server ?
 
 Thanks,
 Gary
 

Hi Gary,

There are README and UPGRADING documents that come in the source
distribution from Best Practical. You will need to follow those
documents to upgrade the current database.

Regards,
Ken


Re: [rt-users] CanonicalizeEmailAddressMatch

2013-03-29 Thread k...@rice.edu
On Fri, Mar 29, 2013 at 07:10:53AM -1000, Camron W. Fox wrote:
 Alle,
 
   Is it possible to use multiple entries for
 CanonicalizeEmailAddressMatch? For example:
 
 Set( $CanonicalizeEmailAddressMatch,
 '@example\.ac\.jp$|@example\.org$|@example\.com$');
 
 Best Regards,
 Camron
 
Hi Camron,

Yes, here is the usage in the RT code:

if ( my $match   = RT-Config-Get('CanonicalizeEmailAddressMatch') and
 my $replace = RT-Config-Get('CanonicalizeEmailAddressReplace') )
{
$email =~ s/$match/$replace/gi;
}
return ($email);

Regards,
Ken


Re: [rt-users] Extract ticket contents into file(s)

2013-03-26 Thread k...@rice.edu
On Tue, Mar 26, 2013 at 02:09:51PM -0400, Mark Komarinski wrote:
 I'm writing here while I do my own investigation due to time constraints.
 
 I got a request from a set of RT users to get the ticket contents in
 a file that can be parsed to categorize the ticket purpose.  Setting
 aside the fact that custom fields would have prevented this, if
 there's a snippet of code out there that can extract that
 information from a given ticket, I think I can build the rest.
 
 Anyone else run into this situation?
 
 -Mark
 
 -- 
 Mark Komarinski   mark_komarin...@hms.harvard.edu
 Manager   http://ritg.med.harvard.edu
 Research IT Group
 Harvard Medical School
 

Hi Mark,

I think the REST interface can do what you want:

http://requesttracker.wikia.com/wiki/REST

Regards,
Ken


[rt-users] Problem with RT-Extension-RepliesToResolved-0.02

2013-03-06 Thread k...@rice.edu
Dear RT community,

I have installed the extension RT-Extension-RepliesToResolved-0.02
in my RT 3.8.13 installation. The scrip and scripaction are in the
database, but when I tested it on an old ticket, it recognized the
ticket as old but still re-opened it and did not create a new
ticket. Here is what was logged:

Mar  6 09:20:05 rt3 RT: A reply to resolved ticket #372109, creating a new 
ticket 
(/opt/rt3/local/plugins/RT-Extension-RepliesToResolved/lib/RT/Extension/RepliesToResolved.pm:145)
Mar  6 09:20:05 rt3 RT: rt-3.8.13-16755-1362583205-1840.372109-38...@rice.edu 
#372109/10844643 - Scrip 389 0006 On Correspond Notify Requestors and Ccs with 
template Correspondence (/opt/rt3/lib/RT/Action/SendEmail.pm:286)
Mar  6 09:20:05 rt3 RT: rt-3.8.13-16755-1362583205-1840.372109-38...@rice.edu 
No recipients found. Not sending. (/opt/rt3/lib/RT/Interface/Email.pm:382)
Mar  6 09:20:05 rt3 RT: rt-3.8.13-16755-1362583205-1053.372109-41...@rice.edu 
#372109/10844643 - Scrip 411 0007 On Correspond Notify Other Recipients with 
template Correspondence (/opt/rt3/lib/RT/Action/SendEmail.pm:286)
Mar  6 09:20:05 rt3 RT: rt-3.8.13-16755-1362583205-1053.372109-41...@rice.edu 
No recipients found. Not sending. (/opt/rt3/lib/RT/Interface/Email.pm:382)
Mar  6 09:20:06 rt3 RT: rt-3.8.13-16755-1362583205-140.372109-615...@rice.edu 
#372109/10844643 - Scrip 6159 On Correspond Notify AdminCcs 
(/opt/rt3/lib/RT/Action/SendEmail.pm:286)
Mar  6 09:20:06 rt3 RT: rt-3.8.13-16755-1362583205-140.372109-615...@rice.edu 
No recipients found. Not sending. (/opt/rt3/lib/RT/Interface/Email.pm:382)
Mar  6 09:20:06 rt3 RT: Scrip 413 IsApplicable failed: Global symbol 
$CurrentUser requires explicit package name at (eval 3920) line 20. 
(/opt/rt3/lib/RT/Condition/UserDefined.pm:65)
Mar  6 09:20:06 rt3 RT: rt-3.8.13-16755-1362583206-1020.372109-38...@rice.edu 
#372109/10844643 - Scrip 382 0362 On (Create | Correspond | AddWatcher | Queue 
Change | Owner Change | Requestor Change | Subject Change | Status Change ) 
Notify Owner (/opt/rt3/lib/RT/Action/SendEmail.pm:286)
Mar  6 09:20:06 rt3 RT: rt-3.8.13-16755-1362583206-1020.372109-38...@rice.edu 
sent  To: x...@rice.edu (/opt/rt3/lib/RT/Action/SendEmail.pm:317)
Mar  6 09:20:06 rt3 RT: Scrip 413 IsApplicable failed: Global symbol 
$CurrentUser requires explicit package name at (eval 3978) line 20. 
(/opt/rt3/lib/RT/Condition/UserDefined.pm:65)
Mar  6 09:20:06 rt3 RT: rt-3.8.13-16755-1362583206-1095.372109-38...@rice.edu 
#372109/10844644 - Scrip 382 0362 On (Create | Correspond | AddWatcher | Queue 
Change | Owner Change | Requestor Change | Subject Change | Status Change ) 
Notify Owner (/opt/rt3/lib/RT/Action/SendEmail.pm:286)
Mar  6 09:20:06 rt3 RT: rt-3.8.13-16755-1362583206-1095.372109-38...@rice.edu 
sent  To: x...@rice.edu (/opt/rt3/lib/RT/Action/SendEmail.pm:317)


Any ideas about what could be going wrong? I have applied the two patches for 
Email.pm
to our Email_local.pm file.

Regards,
Ken


-- 
RT training in Amsterdam, March 20-21: 
http://bestpractical.com/services/training.html

Help improve RT by taking our user survey: 
https://www.surveymonkey.com/s/N23JW9T


Re: [rt-users] Problem with RT-Extension-RepliesToResolved-0.02

2013-03-06 Thread k...@rice.edu
On Wed, Mar 06, 2013 at 11:27:48AM -0500, Kevin Falcone wrote:
 On Wed, Mar 06, 2013 at 09:43:04AM -0600, k...@rice.edu wrote:
  I have installed the extension RT-Extension-RepliesToResolved-0.02
  in my RT 3.8.13 installation. The scrip and scripaction are in the
  database, but when I tested it on an old ticket, it recognized the
  ticket as old but still re-opened it and did not create a new
  ticket. Here is what was logged:
 
 I know I didn't test against 3.8, I'm not sure if Tim did either.
 
 However - the Scrip part of the extension is purely to link tickets
 together.  The magic to create a new ticket happens in the overrides
 of Email.pm provided by the RepliesToResolved.pm file.
 
  Mar  6 09:20:06 rt3 RT: Scrip 413 IsApplicable failed: Global symbol 
  $CurrentUser requires explicit package name at (eval 3920) line 20. 
  (/opt/rt3/lib/RT/Condition/UserDefined.pm:65)
  Mar  6 09:20:06 rt3 RT: Scrip 413 IsApplicable failed: Global symbol 
  $CurrentUser requires explicit package name at (eval 3978) line 20. 
  (/opt/rt3/lib/RT/Condition/UserDefined.pm:65)
 
 You appear to have a bunch of broken User Defined scrips that I don't
 think belong to this extension, you may want to sort them out to avoid
 muddying the water.
 
 -kevin

Hi Kevin,

That helps. I wanted to know if I had just botched a known working configuration
or blazing new ground. I will debug further. I just included all of the logs 
for the
ticket involved in case that would be at all relevant. I have it on my project 
list
to review all of the scrips.

Regards,
Ken


-- 
RT training in Amsterdam, March 20-21: 
http://bestpractical.com/services/training.html

Help improve RT by taking our user survey: 
https://www.surveymonkey.com/s/N23JW9T


Re: [rt-users] Suppressing RT System itself entries in Ticket History

2013-02-23 Thread k...@rice.edu
On Fri, Feb 22, 2013 at 04:14:29PM -0800, Thomas Sibley wrote:
 On 02/22/2013 04:03 PM, k...@rice.edu wrote:
  On Fri, Feb 22, 2013 at 09:04:20PM +, Raymond Corbett wrote:
  Is there a way to suppress the display of the RT System itself entries 
  in Ticket Display?
 
  The ones such asThe RT System itself - Outgoing email recorded
 
 
  
  Hi Ray,
  
  We use something like this for RT 3.8.1x:
  
  /opt/rt3 diff local/html/Ticket/Elements/ShowHistory 
  share/html/Ticket/Elements/ShowHistory
 
 You can use a callback to do this much much cleaner and in a way that
 won't break when we update ShowHistory in an upgrade.
 
 Those are what my coworker Kevin was pointing Ray at.
 

Yes, the callback is definitely the way to go. I have not seen a post of
the needed code and I have not had time to write it myself. Hence the crude
diff with maintenance concerns during an upgrade, but actual code.

Cheers,
Ken


-- 
RT training in Amsterdam, March 20-21: 
http://bestpractical.com/services/training.html

Help improve RT by taking our user survey: 
https://www.surveymonkey.com/s/N23JW9T


Re: [rt-users] Suppressing RT System itself entries in Ticket History

2013-02-23 Thread k...@rice.edu
On Sat, Feb 23, 2013 at 08:58:57PM +0100, Joop wrote:
 Raymond Corbett wrote:
 
 Is there a way to suppress the display of the RT System itself
 entries in Ticket Display?
 
 
 The ones such asThe RT System itself -- Outgoing email recorded
 
 
 Have a look at RT::Extension::HistoryFilter, I think it will do
 exactly what you want.
 
 Joop
 

Thank you for the pointer. I missed this one. It was nice to get rid of
the file edit and use a callback instead.

Regards,
Ken


-- 
RT training in Amsterdam, March 20-21: 
http://bestpractical.com/services/training.html

Help improve RT by taking our user survey: 
https://www.surveymonkey.com/s/N23JW9T


Re: [rt-users] Suppressing RT System itself entries in Ticket History

2013-02-22 Thread k...@rice.edu
On Fri, Feb 22, 2013 at 09:04:20PM +, Raymond Corbett wrote:
 Is there a way to suppress the display of the RT System itself entries in 
 Ticket Display?
 
 The ones such asThe RT System itself - Outgoing email recorded
 
 

Hi Ray,

We use something like this for RT 3.8.1x:

/opt/rt3 diff local/html/Ticket/Elements/ShowHistory 
share/html/Ticket/Elements/ShowHistory
87,90d86
 my $trans_content = {};
 map { $trans_content-{$_-TransactionId}-{$_-Id} = $_  } 
@attachment_content;
 my $trans_attachments = {};
 map { push (@{$trans_attachments-{$_-TransactionId}}, $_) } @attachments;
102,106d97
 my $trans_creator = $Transaction-Creator;
 my $trans_type = $Transaction-Type;
 next if ( $trans_creator == 1 and $ShowHeaders != 1 and $trans_type ne 
Create );# RT_System
 next if ( $trans_creator == 96711 and $ShowHeaders != 1 );
# escalate
 
108a100,105
 my @trans_attachments = grep { $_-TransactionId == $Transaction-Id } 
 @attachments;
 
 my $trans_content = {};
 grep { ($_-TransactionId == $Transaction-Id )  
 ($trans_content-{$_-Id} = $_)  } @attachment_content;
 

124c121
   Attachments  = $trans_attachments-{$Transaction-id},
---
   Attachments  = \@trans_attachments,


You should be able to adjust this for your needs.

Cheers,
Ken


-- 
RT training in Amsterdam, March 20-21: 
http://bestpractical.com/services/training.html

Help improve RT by taking our user survey: 
https://www.surveymonkey.com/s/N23JW9T


Re: [rt-users] Ticket Image attach corruption

2013-02-07 Thread k...@rice.edu
On Thu, Feb 07, 2013 at 08:58:33AM -0500, Joshua Lansford wrote:
 Thanks to whoever credit is due for the RT program.  I have been
 looking for a while for a bug tracking system I could convince my
 company to use.  I am now rolling out RT for our company and almost
 everyone I talk to about it is excited to use it.  I believe the
 main contributing factor is the high integration with email.  This
 allows me to place RT inline with existing communication and support
 practices with minimal retraining.
 
 I have discovered the multiple image custom field option.  After the
 procedure for uploading the image completes and I click on the file
 name I get RT Error Corrupted customfieldvalue URL.  By Googling I
 have discovered that the max filesize of an attachment is  512KB.
 http://kb.mit.edu/confluence/pages/viewpage.action?pageId=4272898
 However even when restricting my upload to images below this size
 the same error occurs.

Hi Joshua,

This is documentation for an MIT setup about their local limits.
You can set MaxAttachmentSize in your RT_SiteConfig.pm to whatever
size you need AND can support within your DB backend. We have ours
set to 10^7:

Set($MaxAttachmentSize , 1000);

Obviously, the MIT setup has that set to 512KB instead.

Regards,
Ken


-- 
Help improve RT by taking our user survey: 
https://www.surveymonkey.com/s/N23JW9T


Re: [rt-users] how to make updates to already existing tickets or records reflected into indexes quickly

2013-02-04 Thread k...@rice.edu
On Mon, Feb 04, 2013 at 10:28:23PM +0530, Subin wrote:
 Hello all,
 
 Thanks to Arkadiusz Miskiewicz for sharing his knowledge here:
 
 http://lists.fsck.com/pipermail/rt-users/2011-August/072464.html
 
 My question is based exactly on this config which I find is good.
 
 As per my understanding the 'delta' index makes newly created
 rows/records available by using 'SphinxCounters' table. That is
 the delta index which will be run every 15 minutes will check if
 any row which has 'id' greater than the 'id' stored previously
 in 'max_doc_id' column of 'SphinxCounters' table. If greater
 then it will read the source and then add the new record to the
 'delta' index.
 
 
 If an edit/update happens to an *existing* ticket/document/row in
 the source database, how will this change get updated into indexes
 quickly? So according to this config, we will need to wait until
 the next time the 'main' is reindexed again, right? If true how
 can we have a workaround for this problem?
 
 Please excuse and let me know if I made any wrong assumptions
 here.
 
 Thanks,

Hi Subin,

That is how the Sphinx full-text indexing works. You would need to
change to a different DB backend with integrated support for fulltext
indexing. PostgreSQL and Oracle will both work. Eventually, when MySQL
supports full-text indexing with InnoDB natively, RT can be made to
use it as well.

Regards,
Ken


Re: [rt-users] how to make updates to already existing tickets or records reflected into indexes quickly

2013-02-04 Thread k...@rice.edu
On Mon, Feb 04, 2013 at 10:50:05PM +0530, Subin wrote:
 Hi Ken,
 
 Sorry I may not have got you. So isn't there a workaround for the
 issue with **existing* *records? I think I need not change DB since
 I've already compiled MySQL with 'sphinxse'. It is the sphinx
 configuration I'm concerned with.
 
 Thanks,
 

In my brief work with Sphinx, the refresh period was adjustable
so you may be able to make the delay a bit less onerous than
the 15 minutes.

Cheers,
Ken


Re: [rt-users] how to make updates to already existing tickets or records reflected into indexes quickly

2013-02-04 Thread k...@rice.edu
On Mon, Feb 04, 2013 at 12:56:38PM -0600, k...@rice.edu wrote:
 On Mon, Feb 04, 2013 at 10:50:05PM +0530, Subin wrote:
  Hi Ken,
  
  Sorry I may not have got you. So isn't there a workaround for the
  issue with **existing* *records? I think I need not change DB since
  I've already compiled MySQL with 'sphinxse'. It is the sphinx
  configuration I'm concerned with.
  
  Thanks,
  
 
 In my brief work with Sphinx, the refresh period was adjustable
 so you may be able to make the delay a bit less onerous than
 the 15 minutes.
 
 Cheers,
 Ken
 

See Thomas' update. I was incorrect. The delta index will take care of
the incremental updates.

Cheers,
Ken


Re: [rt-users] command by mail line breaker

2013-01-31 Thread k...@rice.edu
On Thu, Jan 31, 2013 at 06:52:27AM +, Thomas Lau wrote:
 Got a slight problem on command by mail. I'm trying to update a multi line 
 test box but I can only update it via example 1 instead of example 2, any 
 idea how to add in a line break?
 
 Eg1
 Cf.{Summary}: line 1
 Line 2 -- this will not be recorded
 
 
 
 Eg2
 Cf.{summary}: line1 line 2
 We need line 2 on the second line

Hi Thomas,

The CommandByMail extension has the documented restriction that the update
must be one line only. To do more would require you to re-write the parsing
routine. If you get it working, please post your changes. I would not mind
having that functionality as well. Just no time to work on it.

Regards,
Ken


[rt-users] UseSQLForACLChecks performance problem on RT 3.8

2013-01-31 Thread k...@rice.edu
Dear RT community,

While investigating performance issues caused by enabling the
option UseSQLForACLChecks, a big cause of the slowdown was drawing
the QuickSeach panel and its resulting DB queries. In RT4 they
have been consolidated into a single query. I have attached a
patched version of html/Elements/QueueSummary that does the same
for RT 3.8.x. The sample that was 15s before is now 2s.

Regards,
Ken
%# BEGIN BPS TAGGED BLOCK {{{
%#
%# COPYRIGHT:
%#
%# This software is Copyright (c) 1996-2013 Best Practical Solutions, LLC
%#  sa...@bestpractical.com
%#
%# (Except where explicitly superseded by other copyright notices)
%#
%#
%# LICENSE:
%#
%# This work is made available to you under the terms of Version 2 of
%# the GNU General Public License. A copy of that license should have
%# been provided with this software, but in any event can be snarfed
%# from www.gnu.org.
%#
%# This work is distributed in the hope that it will be useful, but
%# WITHOUT ANY WARRANTY; without even the implied warranty of
%# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
%# General Public License for more details.
%#
%# You should have received a copy of the GNU General Public License
%# along with this program; if not, write to the Free Software
%# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
%# 02110-1301 or visit their web page on the internet at
%# http://www.gnu.org/licenses/old-licenses/gpl-2.0.html.
%#
%#
%# CONTRIBUTION SUBMISSION POLICY:
%#
%# (The following paragraph is not intended to limit the rights granted
%# to you to modify and distribute this software under the terms of
%# the GNU General Public License and is only of importance to you if
%# you choose to contribute your changes and enhancements to the
%# community by submitting them to Best Practical Solutions, LLC.)
%#
%# By intentionally submitting any modifications, corrections or
%# derivatives to this work, or any other work intended for use with
%# Request Tracker, to Best Practical Solutions, LLC, you confirm that
%# you are the copyright holder for those contributions and you grant
%# Best Practical Solutions,  LLC a nonexclusive, worldwide, irrevocable,
%# royalty-free, perpetual, license to use, copy, create derivative
%# works based on those contributions, and sublicense and distribute
%# those contributions and any derivatives thereof.
%#
%# END BPS TAGGED BLOCK }}}
table border=0 cellspacing=0 cellpadding=1 width=100% 
class=queue-summary

tr
th class=collection-as-table|/lQueue//th
% for my $status ( @statuses ) {
th class=collection-as-table% loc($status) %/th
% }
/tr

%PERL
my $i = 0;
for my $queue (@queues) {
$i++;
my $name = $queue-{Name};
$name =~ s/(['\\])/\\$1/g;
my $queue_cond = Queue = '$name' AND ;
my $all_q = $queue_cond . '('.join(  OR , map Status = '$_', @statuses 
) . ')';
/%PERL
tr class=% $i%2 ? 'oddline' : 'evenline'% 

td
a href=% RT-Config-Get('WebPath') %/Search/Results.html?Query=% 
$all_q |u,n % title=% $queue-{Description} %% $queue-{Name} %/a
/td

%perl
   for my $status (@statuses) {
/%perl
td align=right
a href=% RT-Config-Get('WebPath') %/Search/Results.html?Query=% 
$queue_cond .Status = '$status' |u,n %% $data-{$queue-{id}}-{$status } 
|| '-' %/a
/td
%   }
/tr
% }
/table
%INIT
# Ensure sane default
unless ( @statuses ) {
foreach (RT::Queue-ActiveStatusArray()) {
push @statuses, $_;
}
}

my @queues;

if ($cache  exists $session{$cache}) {
@queues = @{$session{$cache}};
} else {
my $Queues = RT::Queues-new( $session{'CurrentUser'} );
$Queues-UnLimit();
$m-callback( CallbackName = 'SQLFilter', Queues = $Queues );

@queues = grep $queue_filter-($_), @{ $Queues-ItemsArrayRef };
$m-callback( CallbackName = 'Filter', Queues = \@queues );

@queues = map {
{  id  = $_-Id,
   Name= $_-Name,
   Description = $_-Description || '',
}
} grep $_, @queues;

$session{$cache} = \@queues if $cache;
}

my $data = {};
my $statuses = {};

use RT::Report::Tickets;
my $report = RT::Report::Tickets-new( RT-SystemUser );
my $query =
(.
join( OR , map {s{(['\\])}{\\$1}g; Status = '$_'} @statuses) #'
.) AND (.
join(' OR ', map Queue = .$_-{id}, @queues)
.);
$query = 'id  0' unless @queues;
$report-SetupGroupings( Query = $query, GroupBy = [qw(Status Queue)] );

while ( my $entry = $report-Next ) {
$data-{ $entry-__Value(Queue) }-{ $entry-__Value(Status) }
= $entry-__Value('id');
$statuses-{ $entry-__Value(Status) } = 1;
}
/%INIT
%ARGS
$cache = undef
$queue_filter = undef
@statuses = ()
/%ARGS


Re: [rt-users] UseSQLForACLChecks performance problem on RT 3.8

2013-01-31 Thread k...@rice.edu
On Thu, Jan 31, 2013 at 09:02:59PM +0400, Ruslan Zakirov wrote:
 On Thu, Jan 31, 2013 at 8:45 PM, k...@rice.edu k...@rice.edu wrote:
  Dear RT community,
 
  While investigating performance issues caused by enabling the
  option UseSQLForACLChecks, a big cause of the slowdown was drawing
  the QuickSeach panel and its resulting DB queries. In RT4 they
  have been consolidated into a single query. I have attached a
  patched version of html/Elements/QueueSummary that does the same
  for RT 3.8.x. The sample that was 15s before is now 2s.
 
 It should be even faster. Don't show inactive statuses if you have
 many historical tickets. An index may help. Also, 2 seconds can be
 result of hitting Pg problem I mentioned earlier. Explain of the query
 will answer this.
 
  Regards,
  Ken
 
 -- 
 Best regards, Ruslan.
 

Hi Ruslan,

Here is the EXPLAIN. It looks like a reasonable plan.

Regards,
Ken


EXPLAIN ANALYZE SELECT COUNT(DISTINCT main.id) AS id, main.Status AS status, 
main.Queue AS queue FROM Tickets main  WHERE (main.Status != 'deleted') AND ( ( 
main.Status = 'new' OR main.Status = 'open' OR main.Status = 'stalled' )  AND  
( main.Queue = '3' OR main.Queue = '7' OR main.Queue = '4' OR main.Queue = 
'131' OR main.Queue = '169' OR main.Queue = '170' OR main.Queue = '167' OR 
main.Queue = '105' OR main.Queue = '42' OR main.Queue = '6' OR main.Queue = 
'41' OR main.Queue = '18' OR main.Queue = '1' OR main.Queue = '8' OR main.Queue 
= '89' OR main.Queue = '90' OR main.Queue = '43' OR main.Queue = '68' OR 
main.Queue = '72' OR main.Queue = '73' OR main.Queue = '17' OR main.Queue = 
'158' OR main.Queue = '71' OR main.Queue = '92' OR main.Queue = '107' OR 
main.Queue = '95' OR main.Queue = '23' OR main.Queue = '24' OR main.Queue = 
'27' OR main.Queue = '86' OR main.Queue = '16' OR main.Queue = '97' OR 
main.Queue = '53' OR main.Queue = '66' OR main.Queue = '12' OR main.Queue = 
'82' OR main.Queue = '75' OR main.Queue = '51' OR main.Queue = '69' OR 
main.Queue = '26' OR main.Queue = '96' OR main.Queue = '152' OR main.Queue = 
'93' OR main.Queue = '25' OR main.Queue = '165' OR main.Queue = '81' OR 
main.Queue = '29' OR main.Queue = '14' OR main.Queue = '19' OR main.Queue = 
'162' OR main.Queue = '140' OR main.Queue = '98' OR main.Queue = '10' OR 
main.Queue = '5' OR main.Queue = '133' OR main.Queue = '121' OR main.Queue = 
'153' OR main.Queue = '20' OR main.Queue = '154' OR main.Queue = '126' OR 
main.Queue = '125' OR main.Queue = '168' OR main.Queue = '134' OR main.Queue = 
'137' OR main.Queue = '173' OR main.Queue = '94' OR main.Queue = '155' OR 
main.Queue = '138' OR main.Queue = '127' OR main.Queue = '157' OR main.Queue = 
'156' OR main.Queue = '132' OR main.Queue = '123' OR main.Queue = '112' OR 
main.Queue = '118' OR main.Queue = '117' OR main.Queue = '119' OR main.Queue = 
'115' OR main.Queue = '9' OR main.Queue = '122' OR main.Queue = '160' OR 
main.Queue = '28' OR main.Queue = '100' OR main.Queue = '44' OR main.Queue = 
'45' OR main.Queue = '149' OR main.Queue = '48' OR main.Queue = '164' ) ) AND 
(main.Type = 'ticket') AND (main.EffectiveId = main.id)  GROUP BY main.Status, 
main.Queue;









   QUERY PLAN

Re: [rt-users] UseSQLForACLChecks performance problem on RT 3.8

2013-01-31 Thread k...@rice.edu
On Fri, Feb 01, 2013 at 03:28:35AM +0400, Ruslan Zakirov wrote:
 On Thu, Jan 31, 2013 at 10:24 PM, k...@rice.edu k...@rice.edu wrote:
  On Thu, Jan 31, 2013 at 09:02:59PM +0400, Ruslan Zakirov wrote:
  On Thu, Jan 31, 2013 at 8:45 PM, k...@rice.edu k...@rice.edu wrote:
   Dear RT community,
  
   While investigating performance issues caused by enabling the
   option UseSQLForACLChecks, a big cause of the slowdown was drawing
   the QuickSeach panel and its resulting DB queries. In RT4 they
   have been consolidated into a single query. I have attached a
   patched version of html/Elements/QueueSummary that does the same
   for RT 3.8.x. The sample that was 15s before is now 2s.
 
  It should be even faster. Don't show inactive statuses if you have
  many historical tickets. An index may help. Also, 2 seconds can be
  result of hitting Pg problem I mentioned earlier. Explain of the query
  will answer this.
 
 Explain quoted below looks good. Have you meant 2 seconds for the page
 or quick search box only? I think whole page and it sounds not bad.
 

Yes, it is for the whole page load. I am glad that I was not missing
some low-hanging fruit. Thank you for the help.

Regards,
Ken


Re: [rt-users] Odd number of elements in anonymous hash error

2013-01-26 Thread k...@rice.edu
On Sat, Jan 26, 2013 at 01:10:19PM -0500, Tim Dunphy wrote:
 Also this server has 2GB of ram. Generally speaking is that enough to run
 RT 4.02 on?
 
 Thanks
 tim
 

Hi Tim,

If the DB is on the same machine, not really. Version 3.2 worked okay with
2GB, 3.6 worked okay with 4-8GB and that is the least amount I would try
to use for 4.0 with them on the same machine.

Cheers,
Ken


Re: [rt-users] UseSQLForACLChecks / CurrentUserCanSee

2013-01-25 Thread k...@rice.edu
On Fri, Jan 25, 2013 at 02:15:02AM +0400, Ruslan Zakirov wrote:
 On Fri, Jan 25, 2013 at 1:52 AM, k...@rice.edu k...@rice.edu wrote:
  We are running version 3.8.13 with a PostgreSQL 9.2 backend. I will
  try to look into it further and see if I can locate the cause of the
  pathological performance issues.
 
 Then you don't have one performance improvement that is only in RT
 4.0+, grab patch from b5b357766929465521281c2886456c6b1fe24824 commit.
 
 Pg's log of slow queries would be next stop.
 
 
 -- 
 Best regards, Ruslan.
 

Hi Ruslan,

I could not figure out how to pull this patch from the git commit, but
here are the two top queries from the DB logs:

SELECT count ( DISTINCT main.id ) FROM tickets main JOIN groups groups_1 ON ( 
groups_1.domain = '' ) AND ( groups_1.instance = main.id ) LEFT JOIN 
cachedgroupmembers cachedgroupmembers_2 ON ( cachedgroupmembers_2.memberid = '' 
) AND ( cachedgroupmembers_2.groupid = groups_1.id ) WHERE ( main.STATUS != '' 
) AND ( main.queue = '' AND main.STATUS = '' AND ( ( main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue = '' OR main.queue = '' OR main.queue = '' OR main.queue = '' OR 
main.queue

[rt-users] UseSQLForACLChecks / CurrentUserCanSee

2013-01-24 Thread k...@rice.edu
Dear RT community,

I have been testing the option UseSQLForACLChecks which is based on the
function CurrentUserCanSee and the initial testing is disappointing. Here
are 3 representative front page loads with and without SQL-checks enabled:

with-SQL: 16s, 13.8s, 14.5s --- 14.7s average
no-SQL: 2.3s, 0.99s, 0.97s --- 1.42s average

That is a 10x slowdown and it does not get any better with reloads. In
some of the messages on the mailing list, it is mentioned that the performance
is not bad for some setups. Is there a reference setup that is defined that
produces these not bad timings? Alternatively, does anyone have a setup
that is working well or that has an appropriate cache layer setup?

Regards,
Ken


Re: [rt-users] UseSQLForACLChecks / CurrentUserCanSee

2013-01-24 Thread k...@rice.edu
On Fri, Jan 25, 2013 at 01:08:30AM +0400, Ruslan Zakirov wrote:
 On Fri, Jan 25, 2013 at 12:57 AM, k...@rice.edu k...@rice.edu wrote:
  Dear RT community,
 
  I have been testing the option UseSQLForACLChecks which is based on the
  function CurrentUserCanSee and the initial testing is disappointing. Here
  are 3 representative front page loads with and without SQL-checks enabled:
 
  with-SQL: 16s, 13.8s, 14.5s --- 14.7s average
  no-SQL: 2.3s, 0.99s, 0.97s --- 1.42s average
 
  That is a 10x slowdown and it does not get any better with reloads. In
  some of the messages on the mailing list, it is mentioned that the 
  performance
  is not bad for some setups. Is there a reference setup that is defined 
  that
  produces these not bad timings? Alternatively, does anyone have a setup
  that is working well or that has an appropriate cache layer setup?
 
 
 Hello Ken,
 
 You probably read description of the option, right? I always suspected
 that there
 will be instances for which performance degrades dramatically because
 of the option. So far we had one case when option works good for core
 RT and behaves badly in a proprietary extension. For most of our
 customers it works great.
 
 A few changes have been made since the option was introduced to fix
 ACL problems and performance issues, so as always you should mention
 RT version.
 
 We would love to see more details on your case. The option will be
 turned on by default in RT 4.2.
 
  Regards,
  Ken
 
 -- 
 Best regards, Ruslan.
 

Hi Ruslan,

We are running version 3.8.13 with a PostgreSQL 9.2 backend. I will
try to look into it further and see if I can locate the cause of the
pathological performance issues.

Regards,
Ken


Re: [rt-users] Searching Ticket Bodies

2013-01-08 Thread k...@rice.edu
On Tue, Jan 08, 2013 at 11:08:20AM -0800, Tim Gustafson wrote:
  http://bestpractical.com/rt/docs/latest/RT_Config.html#FullTextSearch
  http://bestpractical.com/rt/docs/latest/full_text_indexing.html
 
  These are also shipped with RT itself as doc in etc/RT_Config.pm and
  docs/full_text_indexing.pod.
 
 Hrmm, I remember now.  That documentation states:
 
 MySQL does not support full-text indexing natively.
 
 Which is untrue.  MySQL does indeed have full-text indexing, and the
 most recent version has full-text indexing with InnoDB tables.  Is
 there any hope for taking advantage of the FTS built-in to MySQL?  My
 MySQL server does a *lot* more than just RT, and re-compiling the
 whole thing with an add-on that gets used by exactly one database (out
 of, let's say, 400 databases) seems sub-optimal.
 
 -- 
 
 Tim Gustafson
 t...@soe.ucsc.edu
 831-459-5354
 Baskin Engineering, Room 313A
 

Hi Tim,

Per the web site www.mysql.com, the version of MySQL with native InnoDB
support is not yet released. (5.6) Once it is released, it would be possible
to include support for it. Until that happens, your options are to compile
a new build with the needed functionality, use a different version for RT,
or use a different DB entirely. PostgreSQL and Oracle both support it natively
currently.

Regards,
Ken


Re: [rt-users] question

2013-01-06 Thread k...@rice.edu
On Sun, Jan 06, 2013 at 09:27:02AM +, Yetomiwa Jabar wrote:
 Hi, please i just registered for rt users, where and how do i log in to paste 
 my questions?
 
 

Welcome,

You just asked your first question. :) You send a text Email to this address
with your questions. Then someone may have feedback or ideas that may help you
with your problem.

Regards,
Ken


Re: [rt-users] request

2013-01-06 Thread k...@rice.edu
On Sun, Jan 06, 2013 at 09:38:26AM +, Yetomiwa Jabar wrote:
 Hello,
 
 PLease i have been trying to install request tracker on my ubuntu 12.04 since 
 four weeks ago with no major headways, i have been stocked at different 
 junctions.Now that i have been able to join rtusers, can any one give an a-z 
 easy to follow installation guide to any rt version for ubuntu 12.04.i am a 
 complete novice to ubuntu,and i am not a programmer.please any help is 
 welcomed.
 
 Thanks

Hi Yetomiwa,

There is a README file in the distribution that describes the installation
process. It is pretty straight-forward, but as a novice you may want to see
it Ubuntu has a prepacked distribution of RT available.

Regards,
Ken


[rt-users] RTx-From gives a cross-site error...

2012-12-21 Thread k...@rice.edu
Dear RT users,

You can click through but it adds an additional step and alarms the
users. Does anyone have any pointers to documentation about how to
fix these types of problems within RT 3.8?

Regards,
Ken


Re: [rt-users] Slower ticket display with RT-IR installed

2012-12-17 Thread k...@rice.edu
Dear RT community,

Now that we have a finished install for grins I pulled the
Time to display values for 4 typical pages from RT with
and without the RT-IR plugin enabled:

Effect of RTIR on RT 3.8.13+security patches responsiveness:

w/o RTIR:

front page - Time to display: 0.77
tickets new search - Time to display: 2.31
rtfm - Time to display: 0.14
sample ticket - Time to display: 1.27

w/ RTIR:

front page - Time to display: 1.08 +40%
tickets new search - Time to display: 2.41 +4%
rtfm - Time to display: 0.16 +14%
sample ticket - Time to display: 2.66 +109%


As you can see there is a dramatic slowdown for both the
front page and pulling up a sample ticket. By virtue of
running the new version in an nginx+fastCGI configuration
at least the slow dribble of web content to the browser
is concealed. The front page and sample ticket
slowness as well as the most dramatic will impact the
users the most because those are the two that are used
far and away the most.

I have opened a bug report for this issue already #21729,
but does anyone have any ideas about what could be done
to improve the performance of those two page displays?

Regards,
Ken

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Error on Mark all messages as seen in ticket

2012-12-13 Thread k...@rice.edu
Hi RT community,

We figured out the problem -- a bad case of local modifications.
Sorry for the interruption.

Regards,
Ken

On Wed, Dec 12, 2012 at 05:41:56PM -0600, Susan K. McClure wrote:
 Hi,
 I am getting an error when trying to click on the link in a ticket to
 jump to the first unread message and mark all messages as seen
 
 This is testing on a newly upgraded system:
  - rt 3.8.13, w/ RT-FM, RT-IR, RT::Authn::ExternalAuth and others.
  - on rhel 6
  - Using  postgresql 9.2.2, nginx, and spawn-fcgi
  - We are also using the colorize status  code feature  as in
http://wiki.bestpractical.com/view/ShowStatusInColor
 
 When I click on the link in a ticket (ticket # 391377) The browser
 displays:
 An internal RT error has occurred.  Your administrator can find more
 details in RT's log files
 
 I see in the nginx error.log:
 
  2012/12/12 17:35:36 [error] 31935#0: *13 FastCGI sent in stderr:
  DBD::Pg::st execute failed: ERROR:  invalid input syntax for integer:
  Must specify 'Name' attribute
  LINE 1: SELECT  * FROM Principals WHERE id = 'Must specify ''Name'' ...
   ^ at
  /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 590.
  RT::Handle=HASH(0x69f1e60) couldn't execute the query 'SELECT  * FROM
  Principals WHERE id = ?' at
  /usr/local/share/perl5/DBIx/SearchBuilder/Handle.pm line 603
  DBIx::SearchBuilder::Handle::SimpleQuery('RT::Handle=HASH( while
  reading response header from upstream, client: 10.67.48.228, server:
  rt3.rice.edu, request: GET
  /Ticket/Display.html?id=391377MarkAsSeen=1Anchor=txn-10489494
  HTTP/1.1, upstream: fastcgi://unix:/opt/rt3/var/fastcgi.sock:,
  host: rt3.rice.edu, referrer:
  https://rt3.rice.edu/Ticket/Display.html?id=391377;
  2012/12/12 17:35:36 [error] 31935#0: *13 FastCGI sent in stderr:
  0x69f1e60)', 'SELECT  * FROM Principals WHERE id = ?', 'Must specify
  \'Name\' attribute') called at
  /usr/local/share/perl5/DBIx/SearchBuilder/Record.pm line 1206

   DBIx::SearchBuilder::Record::_LoadFromSQL('RT::Principal=HASH(0x7092440)',
  'SELECT  * FROM Principals WHERE id = ?', 'Must specify \'Name\'
  attribute') called at
  /usr/local/share/perl5/DBIx/SearchBuilder/Record.pm line 1125

   DBIx::SearchBuilder::Record::LoadByCols('RT::Principal=HASH(0x7092440)',
  'id', 'Must specify \'Name\' attribute') ca while reading response
  header from upstream, client: 10.67.48.228, server: rt3.rice.edu,
  request: GET
  /Ticket/Display.html?id=391377MarkAsSeen=1Anchor=txn-10489494
  HTTP/1.1, upstream: fastcgi://unix:/opt/rt3/var/fastcgi.sock:,
  host: rt3.rice.edu, referrer:
  https://rt3.rice.edu/Ticket/Display.html?id=391377;
  2012/12/12 17:35:36 [error] 31935#0: *13 FastCGI sent in stderr: lled
  at /usr/local/share/perl5/DBIx/SearchBuilder/Record/Cachable.pm line 120

   
  DBIx::SearchBuilder::Record::Cachable::LoadByCols('RT::Principal=HASH(0x7092440)',
  'id', 'Must specify \'Name\' attribute') called at
  /opt/rt3/lib/RT/Record.pm line 368
  RT::Record::LoadByCols('RT::Principal=HASH(0x7092440)', 'id',
  'Must specify \'Name\' attribute') called at
  /usr/local/share/perl5/DBIx/SearchBuilder/Record.pm line 1140

   DBIx::SearchBuilder::Record::LoadById('RT::Principal=HASH(0x7092440)', 
  'Must
  specify while reading response header from upstream, client:
  10.67.48.228, server: rt3.rice.edu, request: GET
  /Ticket/Display.html?id=391377MarkAsSeen=1Anchor=txn-10489494
  HTTP/1.1, upstream: fastcgi://unix:/opt/rt3/var/fastcgi.sock:,
  host: rt3.rice.edu, referrer:
  https://rt3.rice.edu/Ticket/Display.html?id=391377;
  2012/12/12 17:35:36 [error] 31935#0: *13 FastCGI sent in stderr:
  \'Name\' attribute') called at
  /usr/local/share/perl5/DBIx/SearchBuilder/Record.pm line 1056
  DBIx::SearchBuilder::Record::Load('RT::Principal=HASH(0x7092440)',
  'Must specify \'Name\' attribute') called at /opt/rt3/lib/RT/Record.pm
  line 320
  RT::Record::Create('RT::Principal=HASH(0x7092440)',
  'PrincipalType', 'User', 'ObjectId', 0, 'Disabled', 0) called at
  /opt/rt3/lib/RT/Principal.pm line 110
  RT::Principal::Create('RT::Principal=HASH(0x7092440)',
  'PrincipalType', 'User', 'Disabled', 0, 'ObjectId', while reading
  response header from upstream, client: 10.67.48.228, server:
  rt3.rice.edu, request: GET
  /Ticket/Display.html?id=391377MarkAsSeen=1Anchor=txn-10489494
  HTTP/1.1, upstream: fastcgi://unix:/opt/rt3/var/fastcgi.sock:,
  host: rt3.rice.edu, referrer:
  https://rt3.rice.edu/Ticket/Display.html?id=391377;
  2012/12/12 17:35:36 [error] 31935#0: *13 FastCGI sent in stderr:  0)
  called at /opt/rt3/local/lib/RT/User_Local.pm line 86
  RT::Base::Create('RT::Attribute=HASH(0x72010b0)', 'ContentType',
  '', 'Creator', 402, 'ObjectId', 391377, 'LastUpdatedBy', 402, ...)
  called at /opt/rt3/lib/RT/Record.pm line 289
  RT::Record::Create('RT::Attribute=HASH(0x72010b0)', 'Name',
  'User-402-SeenUpTo', 'Content', '2012-12-04 

[rt-users] Slower ticket display with RT-IR installed

2012-12-05 Thread k...@rice.edu
Dear RT community,

I have been trying to track down some ticket display slowdowns for our
upgrade from 3.8.5 to 3.8.13+security patches. One difference in the
new version is that we have the latest RT-IR installed. Now there is
a noticable pause during the population of the ticket metadata right
after the The Basics pane. When I enabled query logging in the DB
(postgreSQL), I see almost 700 queries of the type:

2012-12-05 08:57:40.365 CSTLOG:  duration: 0.325 ms  statement: SELECT DISTINCT 
main.* FROM CustomFields main JOIN ObjectCustomFields ObjectCustomFields_1  ON 
( ObjectCustomFields_1.CustomField = main.id )  WHERE (LOWER(main.Name) = 
'constituency') AND (ObjectCustomFields_1.ObjectId = '28') AND (main.LookupType 
= 'RT::Queue-RT::Ticket')  ORDER BY main.Disabled ASC  LIMIT 1
2012-12-05 08:57:40.366 CSTLOG:  duration: 0.512 ms  statement: SELECT DISTINCT 
main.* FROM CustomFields main JOIN ObjectCustomFields ObjectCustomFields_1  ON 
( ObjectCustomFields_1.CustomField = main.id )  WHERE (LOWER(main.Name) = 
'constituency') AND (ObjectCustomFields_1.ObjectId = '0') AND (main.LookupType 
= 'RT::Queue-RT::Ticket')  ORDER BY main.Disabled ASC  LIMIT 1

That is a .3 seconds total for something that is essentially repeating
the same two queries back to back that take a total of 0.85 ms. Is there
something that I have misconfigured? Any ideas? I have attached the full
set of queries.

Regards,
Ken


rt-ir-queries.gz
Description: GNU Zip compressed data

We're hiring! http://bestpractical.com/jobs


Re: [rt-users] Slower ticket display with RT-IR installed

2012-12-05 Thread k...@rice.edu
On Wed, Dec 05, 2012 at 07:55:23PM +0400, Ruslan Zakirov wrote:
 On Wed, Dec 5, 2012 at 7:11 PM, k...@rice.edu k...@rice.edu wrote:
  Dear RT community,
 
  I have been trying to track down some ticket display slowdowns for our
  upgrade from 3.8.5 to 3.8.13+security patches. One difference in the
  new version is that we have the latest RT-IR installed. Now there is
  a noticable pause during the population of the ticket metadata right
  after the The Basics pane. When I enabled query logging in the DB
  (postgreSQL), I see almost 700 queries of the type:
 
  2012-12-05 08:57:40.365 CSTLOG:  duration: 0.325 ms  statement: SELECT 
  DISTINCT main.* FROM CustomFields main JOIN ObjectCustomFields 
  ObjectCustomFields_1  ON ( ObjectCustomFields_1.CustomField = main.id )  
  WHERE (LOWER(main.Name) = 'constituency') AND 
  (ObjectCustomFields_1.ObjectId = '28') AND (main.LookupType = 
  'RT::Queue-RT::Ticket')  ORDER BY main.Disabled ASC  LIMIT 1
  2012-12-05 08:57:40.366 CSTLOG:  duration: 0.512 ms  statement: SELECT 
  DISTINCT main.* FROM CustomFields main JOIN ObjectCustomFields 
  ObjectCustomFields_1  ON ( ObjectCustomFields_1.CustomField = main.id )  
  WHERE (LOWER(main.Name) = 'constituency') AND 
  (ObjectCustomFields_1.ObjectId = '0') AND (main.LookupType = 
  'RT::Queue-RT::Ticket')  ORDER BY main.Disabled ASC  LIMIT 1
 
  That is a .3 seconds total for something that is essentially repeating
  the same two queries back to back that take a total of 0.85 ms. Is there
  something that I have misconfigured? Any ideas? I have attached the full
  set of queries.
 
 1) File a bug, we should try to avoid running this queries for not RTIR 
 tickets.
 2) Send explain of the query
 3) Optimize execution with an index or two, it shouldn't take that
 long to load a CF
 

Hi Ruslan,

I will log a bug report. Here are the EXPLAIN commands for these two queries:

rt3813=# explain analyze SELECT DISTINCT main.* FROM CustomFields main JOIN 
ObjectCustomFields ObjectCustomFields_1  ON ( ObjectCustomFields_1.CustomField 
= main.id )  WHERE (LOWER(main.Name) = 'constituency') AND 
(ObjectCustomFields_1.ObjectId = '27') AND (main.LookupType = 
'RT::Queue-RT::Ticket')  ORDER BY main.Disabled ASC  LIMIT 1;

  QUERY PLAN
   
---
 Limit  (cost=3.60..3.64 rows=1 width=99) (actual time=0.051..0.051 rows=0 
loops=1)
   -  Unique  (cost=3.60..3.64 rows=1 width=99) (actual time=0.050..0.050 
rows=0 loops=1)
 -  Sort  (cost=3.60..3.61 rows=1 width=99) (actual time=0.049..0.049 
rows=0 loops=1)
   Sort Key: main.disabled, main.id, main.name, main.type, 
main.description, main.sortorder, main.creator, main.created, 
main.lastupdatedby, main.lastupdated, main.repeated, main.pattern, 
main.maxvalues
   Sort Method: quicksort  Memory: 25kB
   -  Nested Loop  (cost=0.00..3.59 rows=1 width=99) (actual 
time=0.034..0.034 rows=0 loops=1)
 -  Index Scan using objectcustomfields_1 on 
objectcustomfields objectcustomfields_1  (cost=0.00..1.06 rows=5 width=4) 
(actual time=0.006..0.008 rows=5 loops=1)
   Index Cond: (objectid = 27)
 -  Index Scan using customfields_pkey on customfields 
main  (cost=0.00..0.48 rows=1 width=99) (actual time=0.004..0.004 rows=0 
loops=5)
   Index Cond: (id = objectcustomfields_1.customfield)
   Filter: (((lookuptype)::text = 
'RT::Queue-RT::Ticket'::text) AND (lower((name)::text) = 'constituency'::text))
   Rows Removed by Filter: 1
 Total runtime: 0.107 ms
(13 rows)

rt3813=# explain analyze SELECT DISTINCT main.* FROM CustomFields main JOIN 
ObjectCustomFields ObjectCustomFields_1  ON ( ObjectCustomFields_1.CustomField 
= main.id )  WHERE (LOWER(main.Name) = 'constituency') AND 
(ObjectCustomFields_1.ObjectId = '0') AND (main.LookupType = 
'RT::Queue-RT::Ticket')  ORDER BY main.Disabled ASC  LIMIT 1;

  QUERY PLAN
   
---
 Limit  (cost=13.64..13.68 rows=1 width=99) (actual time=0.274..0.274 rows=0 
loops=1)
   -  Unique  (cost=13.64..13.68 rows=1 width=99) (actual time=0.273..0.273 
rows=0 loops=1)
 -  Sort  (cost

Re: [rt-users] RT setup and Postgres object ownership

2012-11-27 Thread k...@rice.edu
Hi Darren,

You can grant access using roles in PostgreSQL. So even though
the DB is owned by postgres, your configured rt user can still
access the data.

Cheers,
Ken

On Mon, Nov 26, 2012 at 03:50:58PM -0700, Darren Spruell wrote:
 Recent user of RT on PostgreSQL backend (a couple of years on MySQL)
 and have been struggling to understand something related to DB access
 privileges under postgres with RT's setup.
 
 I don't understand how the default ownership/rights after the RT
 setup, done using the postgres superuser (DBA), allow the RT user to
 have read/write access to RT objects. What I got:
 
 # Database ownership set to Pg superuser. No privileges for other roles 
 present.
 postgres=# \l+
Name| Owner  | Encoding |   Collate   |Ctype|
 Access privileges   |  Size   | Tablespace |
 Description
 ---++--+-+-+---+-++
  rt4   | postgres   | UTF8 | en_US.UTF-8 | en_US.UTF-8 |
 | 9061 kB | pg_default |
 
 
 # Only a single schema, public. Only Pg superuser granted explicit
 privileges; no privileges for other roles present.
 rt4=# \dn+
   List of schemas
   Name  |  Owner   |  Access privileges   |  Description
 +--+--+
  public | postgres | postgres=UC/postgres+| standard public schema
 |  | =UC/postgres
 
 
 # Owner of all tables is also DB superuser (by inheritance, I'm assuming).
 rt4=# \dt+
List of relations
  Schema |  Name   | Type  |  Owner   |Size| 
 Description
 +-+---+--++-
  public | acl | table | postgres | 40 kB  |
  public | articles| table | postgres | 8192 bytes |
  public | attachments | table | postgres | 72 kB  |
  public | attributes  | table | postgres | 96 kB  |
  public | cachedgroupmembers  | table | postgres | 48 kB  |
  public | classes | table | postgres | 16 kB  |
  public | customfields| table | postgres | 16 kB  |
  public | customfieldvalues   | table | postgres | 88 kB  |
  public | groupmembers| table | postgres | 8192 bytes |
  public | groups  | table | postgres | 48 kB  |
  public | links   | table | postgres | 16 kB  |
  public | objectclasses   | table | postgres | 8192 bytes |
  public | objectcustomfields  | table | postgres | 40 kB  |
  public | objectcustomfieldvalues | table | postgres | 16 kB  |
  public | objecttopics| table | postgres | 0 bytes|
  public | principals  | table | postgres | 40 kB  |
  public | queues  | table | postgres | 16 kB  |
  public | scripactions| table | postgres | 16 kB  |
  public | scripconditions | table | postgres | 16 kB  |
  public | scrips  | table | postgres | 48 kB  |
  public | sessions| table | postgres | 160 kB |
  public | templates   | table | postgres | 48 kB  |
  public | tickets | table | postgres | 8192 bytes |
  public | topics  | table | postgres | 8192 bytes |
  public | transactions| table | postgres | 48 kB  |
  public | users   | table | postgres | 16 kB  |
 
 
 I'm guessing this is more a a postgres access privileges topic than a
 RT topic - but curious how the application DB user has privileges to
 these objects, and also why the default installation doesn't set the
 app user (rt_user) as the owner of the database and then allow
 inheritance to set ownership on child objects.
 
 -- 
 Darren Spruell
 phatbuck...@gmail.com
 
 We're hiring! http://bestpractical.com/jobs
 

We're hiring! http://bestpractical.com/jobs


  1   2   >