Re: [rt-users] RT 4.4.1 - Change owner on corrospond Scrip - Strange issue

2017-02-23 Thread Kenneth Marshall
On Thu, Feb 23, 2017 at 10:12:19AM -0500, Robert Blayzor wrote:
> I did try that, and it literally did nothing. (other than recorded the change 
> in the ticket and created empty emails to requestors)
> 
> This has been very easy to re-produce and there must be some different way 
> the Owner is pulled in the Queue view vs. actual ticket view. It is annoying 
> as we have people pulling the queue list of tickets looking for unowned 
> tickets which do not appear on the dashboard, but they do in queue view.
> 
> 
> Even if I do a custom query for unowned tickets, they do not show up; yet in 
> queue view it still shows them unowned.
> 

Hi,

We are still working on our 4.4.1 upgrade so I do not yet have a place to
reproduce your problem. Enabling SQL and RT debugging would be the next
option.

Regards,
Ken


Re: [rt-users] RT 4.4.1 - Change owner on corrospond Scrip - Strange issue

2017-02-23 Thread Kenneth Marshall
On Thu, Feb 23, 2017 at 08:51:29AM -0500, Alex Hall wrote:
> I'm going to send the email I normally hate to receive. If you ever figure 
> this out, please share it with the list!
> 
> I have a script to assign the ticket creator as the owner on creation, which 
> works perfectly. Like you, though, the owner fails to display properly in 
> ticket lists but works if you open a ticket. This has annoyed all our staff 
> for months, but when I asked about on this list, we couldn't work out what 
> the problem was.
> 
> Sorry you're running into this, but at the same time, I'm glad to know it's 
> not just me. :) 
> > On Feb 23, 2017, at 08:13, Robert Blayzor  wrote:
> > 
> > Running RT 4.4.1 - running fine for years and probably never noticed this 
> > before. We have a Scrip that runs that probably carried over from the 
> > pre-RT4 days.
> > 
> > 
> > Pretty common function is to change the Owner of the ticket from “Nobody” 
> > to the first person to correspond if they are a privileged user in RT. The 
> > Scrip is below and it does work. (kind of).
> > 
> > 
> > What works: When user is first to correspond, Scrip executes and in Ticket 
> > view the Owner is set as expected.
> > 
> > 
> > What doesn’t work: If we go into the queue and list all the open tickets, 
> > the owner will be listed as “nobody” in this view, but if you open the 
> > ticket, there is an owner. If you change the owner to someone else and 
> > change it back, then it seems to fix this issue.
> > 
> > 
> > Is this just a display bug or are we not using the proper method to change 
> > the owner of the Ticket?
> > 
> > 
> > 
> > Here is the Scrip we’ve been using:
> > 
> > # Condition: On correspond
> > # Action: User Defined
> > # Template: blank
> > 
> > my $Actor = $self->TransactionObj->Creator;
> > my $Queue = $self->TicketObj->QueueObj;
> > 
> > # if actor is RT_SystemUser then get out of here
> > return 1 if $Actor == $RT::SystemUser->id;
> > 
> > # get out unless ticket owner is nobody
> > return 1 unless $self->TicketObj->Owner == $RT::Nobody->id;
> > 
> > # get out unless $Actor is not part of AdminCc watchers
> > return 1 unless $Queue->IsWatcher(Type => 'AdminCc', PrincipalId => $Actor);
> > 
> > # do the actual 'status update'
> > my ($status, $msg) = $self->TicketObj->_Set(Field => 'Owner', Value => 
> > $Actor, RecordTransaction => 0);
> > unless( $status ) {
> >  $RT::Logger->warning( "Can't set ticket owner to $Actor: $msg" );
> >  return undef;
> > }
> > return 1;
> > 


Hi Alex and Robert,

What happens if you set RecordTransaction to 1/true? I have not checked the 
code,
but I would imagine that if you do not record the transaction, the cache 
infrastructure
would not invalidate the old entry and would continue to serve stale data. 
Something
to try perhaps.

Regards,
Ken


Re: [rt-users] RT 4.4: Configuring escalations with various rt-crontool options, but none are working

2017-02-20 Thread Kenneth Marshall
On Mon, Feb 20, 2017 at 09:32:33AM +0100, Daniel Rauer wrote:
> Nobody with an idea on how we can make any progress with escalations?
> Any input would be helpful, like working config snippets, rt-crontool
> calls that works for someone, ...
> 
> Bye, Daniel

Hi Daniel,

We are still working on our upgrade to 4.4.x, but we had very poor luck
with using escalations in our current version. The priorities did increase,
but without any additional resources being allocated, the result was every
ticket eventually being at the maximum priority. That means the priority
then was useless as a differentiator. The take-away, is that you should
only consider automatic priority escalation, if and only if additional resources
WILL be allocated.

Regards,
Ken


Re: [rt-users] Pre-configure users "RT At A Glance" with specific elements - Default Dashboards?

2017-02-13 Thread Kenneth Marshall
On Mon, Feb 13, 2017 at 03:53:41PM +, Cena, Stephen (ext. 300) wrote:
> We have an instance of RT that is shared across three departments.  Each 
> department only needs to be able to see specific queues. Due to the way 
> permissions work in RT, all the queues are visible. My idea to fix the 
> "display" problem is to rewrite some of the widgets to only include the 
> desired queues (ex: 10 unonwned now is 10 tickets unowned in queues I should 
> see). Is there a way that I can pre-populate my users "RT At A Glance" with 
> specific elements that are germane to the specific user? (Dept A user gets 
> widgets A-J, Dept B gets A-D,K, etc) or can I create custom Dashboards and 
> somehow instruct RT to use them as the "home screen"?
> 
> Thanks!

Hi Stephen,

We do this with standard RT permissions. We put the users in a group, and only
members of that group can see/work on tickets in their queue. They do not see
any other qeueus. I think you just need to look at your current ACLs more
closely.

Regards,
Ken


Re: [rt-users] Preventing duplicate emails

2016-12-07 Thread Kenneth Marshall
On Wed, Dec 07, 2016 at 11:46:44AM -0500, Alex Hall wrote:
> Hello list,
> Is there an example of a script to prevent duplicate emails? We often have
> users adding an owner as a CC, or adding someone as a CC and a one-time CC,
> or for other reasons adding someone to a ticket multiple times. I've
> accepted that user training won't solve this completely, so is there an
> example of a script that will? Some way to prevent identical emails going
> to one person more than once? Or, given that this would be one script and
> thus couldn't access the details of other scripts when a transaction
> happens, is this simply not possible? Thanks for any ideas.
> 

Hi Alex,

You will need to check your notification workflows and change the scrips
to prevent duplications. We have had similar complaints about duplicate
notifications, but each scrip was working correctly. One was to address
this is to use a scrip with much more internal logic to control who gets
sent what. Then you would only get a single Email, unless your scrip
has a bug.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017


Re: [rt-users] Best way to deal with unwanted auto notifications?

2016-12-05 Thread Kenneth Marshall
On Mon, Dec 05, 2016 at 02:02:19PM +, Joel Bergmark wrote:
> Hi,
> 
> I have a problem with "On Correspondance Notify Requestor".
> 
> In some cases we have a requestor like  but we get replys 
> from  hence the global rule "On Correspondance Notify 
> Requestor" applies and sends a mail to the random@ causing a bit of confusion.
> 
> How have you guys dealt with such issues?
> 
> Regards, Joel

Hi Joel,

In our case, we canonicalize all Email addresses to a canonical form so
that the system will recognize that the correspondance is from the same
person and will not notify them again. If that is not the behavior that
you are describing, please add a little more detail about your problem.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017


Re: [rt-users] Owner not showing in search results?

2016-11-28 Thread Kenneth Marshall
On Mon, Nov 28, 2016 at 11:32:36AM -0500, Alex Hall wrote:
> Thanks, I didn't know that would happen. I did that to suppress the email 
> notification; we want users notified if their tickets change owners, but only 
> if that change is NOT from "nobody" to themselves.
> 
> I just updated the script to record the transaction. It worked, because I got 
> the email I wanted suppressed, and the owner still changed. Oddly, "nobody" 
> is still the owner when I search for my ticket, though. Should I flush a 
> cache or something? Mason cache wouldn't have anything to do with this, would 
> it?

Hi Alex,

Well, that is not what I would have expected to happen. I do not know enough
about the DB queries that are being run to generate the search results. 
Probably,
my next step would be to look at the actual query and see where the incorrect
results are being produced. I am not much help because we use PostgreSQL as
the DB and not MySQL. Sorry, I cannot be of more assistance.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017


Re: [rt-users] Owner not showing in search results?

2016-11-28 Thread Kenneth Marshall
Hi Alex,

You do not record your transaction in your scrip. That means that the
system does not know that a change has been made and to invalidate the
caches. You will either need to record it or live with the result.

Regards,
Ken

On Mon, Nov 28, 2016 at 11:12:00AM -0500, Alex Hall wrote:
> >> my ($status, $msg) = $self->TicketObj->_Set(Field => 'Owner', Value =>
> >> $Actor, RecordTransaction => 0);

This should be 1, not 0 to record the transaction and that should flush
the cached info.

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017


Re: [rt-users] Modifying some contents in History

2016-11-28 Thread Kenneth Marshall
On Mon, Nov 28, 2016 at 03:43:01PM +, Kriegers Horst wrote:
> Hi,
> 
> Thanks for your reply.
> I know this is the easiest way, but it is not acceptable in our case
> 
> Regards,
> Horst

Hi Horst,

When the shredder runs, it generates a SQL file to reconstitute the
deleted item when run. You could run shredder and then edit the SQL
file to obfuscate the needed items. Then run the resulting file to
re-add the now cleaned up item back into the system.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017


Re: [rt-users] Modifying some contents in History

2016-11-28 Thread Kenneth Marshall
Hi,

It is easier to just use the Shredder to delete the transaction
from the system.

Regards,
Ken

On Mon, Nov 28, 2016 at 02:32:17PM +, Kriegers Horst wrote:
> Hello,
> 
> We have users they have mentioned confidential information in RT.
> Now I need just to anonymize these information in the Ticket History.
> 
> I’ve identified the transaction Id and now I how can I decode et re-encode 
> the Content value located in the Attributes table
> 
> Example :
> 
> ConfidentialData  --> xx
> 
> 
> 
> 
> Our config :
> 
> -  RT 4.2.12
> 
> -  MySQL
> 
> 
> 
> Thanks in advance for your help.
> Horst
> 
> 
> 
> Note Importante: Le contenu de ce courriel est uniquement réservé à la 
> personne ou l'organisme à qui il est destiné. Si vous n'êtes pas le 
> destinataire prévu, veuillez nous en informer au plus vite et détruire le 
> présent courriel. Dans ce cas, il ne vous est pas permis de copier ce 
> courriel, de le distribuer ou de l'utiliser de quelque manière que ce soit.
> 
> 
> Important Notice: The content of this e-mail is intended only and solely for 
> the use of the named recipient or organization. If you are not the named 
> recipient, please inform us immediately and delete the present e-mail. In 
> this case, you are not allowed to copy, distribute or use this e-mail in any 
> way.
> 
> 

> -
> RT 4.4 and RTIR training sessions, and a new workshop day! 
> https://bestpractical.com/training
> * Los Angeles - January 9-11 2017

-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017

Re: [rt-users] RT 4.4.1 - ExternalAuth intermittently failing

2016-11-22 Thread Kenneth Marshall
On Tue, Nov 22, 2016 at 04:13:46PM -0500, Mike Johnson wrote:
> We just went live with RT 4.4.1 and it seems that LDAP authentication is
> failing.
> 
> It has now died 2 days in a row, at approximately the same time.
> 
> The RT log is showing the following error:
> 2819] [Mon Nov 21 21:10:28 2016] [critical]:
> RT::Authen::ExternalAuth::LDAP::_GetBoundLdapObj Can't bind:
> LDAP_INVALID_CREDENTIALS 49
> (/opt/rt4/sbin/../lib/RT/Authen/ExternalAuth/LDAP.pm:678)
> 
> This seems like a generic LDAP error, and it's not pointing us to a
> specific issue.
> 
> The user that we are binding with is a user that was in-use on our RT 3.8.X
> environment that hadn't had an issue in years (3?).
> 
> Restarting apache resolves the immediate issue, but clearly there is
> something else going on that we should be able to fix permanently. Anyone
> have any ideas on where to look?
> 
> This didn't come up in our testing, but I don't believe we had the volume
> of credential testing that we do in prod.
> 
> Any help would be great!
> 
> P.S. The LDAP server is a Microsoft Active Directory server. This same
> server was being used for ExternalAuth extension in 3.8.
> 
> Mike.

Hi Mike,

You probably will need to check your AD logs as well. We have seen issues
with AD authentication when an account is locked out by a bad password
login attempt. Since it is about the same time of day, maybe something
else is trying to login with those credentials and causing it to lock.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017


Re: [rt-users] Searching ticket content?

2016-11-07 Thread Kenneth Marshall
On Mon, Nov 07, 2016 at 08:57:32AM -0500, Alex Hall wrote:
> Hello list,
> Some users at work are wondering if they can search ticket contents?
> There's no way in the search builder, but I know I can plug any SQL I want
> to into the advanced search. Even if I knew the SQL to use, though, that's
> only a saved search for that string. Could I somehow offer users a way to
> search for a string they enter when they're ready to search? I don't want
> to expose the actual SQL query, as there's too much chance of a misplaced
> punctuation mark or mistyped character causing errors. Thanks.
> 
> -- 
> Alex Hall
> Automatic Distributors, IT department
> ah...@autodist.com


Hi Alex,

In advanced search, you select 'Content' and the the items to search
for. Does that not work for you?

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - January 9-11 2017


Re: [rt-users] Overriding files in lib/RT?

2016-10-31 Thread Kenneth Marshall
On Mon, Oct 31, 2016 at 04:17:11PM -0400, Alex Hall wrote:
> Hi all,
> Thanks for the responses, it's partially working. When I use my
> Email_Local.pm, the server refuses to start, yet I have no errors. Running
> it through Perl's checker reveals only:
> 
> Name "RT::Logger" used only once: possible typo at Email_Local.pm at line 31
> 
> Perl says everything else is fine. I pulled the single function I wanted to
> modify out of the original Email.pm (ParseTicketId) and left it alone,
> except for changing \s+ to \s* in the "if (my $@captures" line. As usual,
> any errors that might be generated are going who knows where, so I'm not
> sure where to start looking. As I said, Perl thinks this is fine save that
> warning, but RT definitely doesn't. Any thoughts? Here's the file:
> 

Hi Alex,

Try running the fcgi process by hand and look for any errors. Sometimes,
the one function you pull has dependencies on other function in the file
which means that they would need to be in the new file as well. Running
it by hand gave a useful error for me.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - Q1 2017


Re: [rt-users] "Hidden" tickets suddenly appear

2016-10-27 Thread Kenneth Marshall
On Thu, Oct 27, 2016 at 03:21:51PM -0400, Jeff Blaine wrote:
> On 10/26/2016 4:27 AM, Martin Wheldon wrote:
> > Hi Jeff,
> > 
> > If you examine the ticket history of the problem ticket it should tell
> > you what happened
> > for it to be set back to the "new" status.
> > 
> > Is it being reopened by a reply to a email from the pervious ticket
> > corespondance perhaps??
> 
> Martin,
> 
> Right, that's where I first looked. There are zero transactions past the
> initial creation via email. Nothing has been done to the ticket.
> 
> Jeff

Hi Jeff,

You need to find out what is preventing the ticket from showing up in
your query. One of your AND conditions may not be met so the ticket
does not show up. Are you saving your Email that is creating the missed
tickets? You could try submitting a similar Email to see if it has the
same visibility problem. Also, do you have any customizations? Sometimes
a change can have unusual ramifications down the line.

Good luck,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - Q1 2017


Re: [rt-users] possibly OT: RT's FCGI server randomly fails, no log

2016-10-11 Thread Kenneth Marshall
On Tue, Oct 11, 2016 at 12:55:13PM -0400, Alex Hall wrote:
> Hello list,
> This may be off-topic, but I'm serving RT with Nginx and FCGI. Randomly, it
> seems, the FCGI server is failing. Nginx works, but users see "error 502:
> bad gateway". I see the same in the logs, with connect() failing. All I
> have to do is run the spawn-fcgi command to get things back.
> 
> Why this is happening, with some frequency, is the question. My Nginx, RT,
> and system logs all show nothing, and to my knowledge, there are no FCGI
> logs at all. The first error for today in Nginx is when a client failed to
> connect after the server went down; there's nothing that says what the
> actual problem was. This happened Saturday, then again today.
> 
> The server has the latest updates for Debian 8.6, and has 4GB of ram. It's
> serving a few dozen users at most, so the load can't be the problem. I'm
> using Nginx 1.6.2 with four workers and 768 threads per worker. Users see
> nothing unusual before this happens, just a 502 instead of the page they
> expected.
> 
> If anyone else is using Nginx and has ever seen this, I'd love some input.
> As this could be considered off topic, feel free to respond directly to
> ah...@autodist.com. If I need to provide more details, please let me know.
> Thank you.
> 
> -- 
> Alex Hall
> Automatic Distributors, IT department
> ah...@autodist.com


Hi Alex,

You will get the 502 error when there are no more RT backends running. I
tracked down verious errors in the RT logs that resulted in a backend
exits. Most were of the 'cannot believe I did that type' by people
setting up the system, i.e. not really fixable with a distributed
management environment. We ended up using 'multiwatch' in RHEL6
and systemd in RHEL7 to keep an appropriate number of backends always
available.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Modifying global RT homepage for all users?

2016-10-07 Thread Kenneth Marshall
On Fri, Oct 07, 2016 at 03:53:05PM -0400, Alex Hall wrote:
> Hello list, yet again,
> We're trying to add a saved search, to let the user view owned and CC-ed
> tickets. I have the search made, and stored as a system-wide item. I have a
> dashboard with the search on it. All users can select that dashboard if
> they want to. The problem is that no one is going to select the secondary
> dashboard all the time, and they get their default one each time they go to
> the homepage from anywhere else in RT or log out and back in. Is there a
> way to have admins edit the system-wide homepage, to add this saved search
> to everyone's at once? We'd also like to remove another portlet that is no
> longer required due to what the search offers.
> 
> Put simply, how can we modify the homepage for all users at once? Thanks,
> as always, for any help.
> 
> -- 
> Alex Hall
> Automatic Distributors, IT department
> ah...@autodist.com


Hi Alex,

You should be able to use rt-attributes-modify to script the needed
changes.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Queue template not available for queue scripts

2016-10-07 Thread Kenneth Marshall
On Fri, Oct 07, 2016 at 11:36:13AM -0400, Alex Hall wrote:
> Yes, that would be the ideal solution, and I would dearly love to have
> that. From what I've seen so far, and from what people have said on this
> list, it doesn't seem like RT can do that. If there's a way, I think
> everyone who works at this company would greatly appreciate that knowledge.
> I'm not good enough with Perl to delve into a custom email parser or
> anything, but do you know of a way or extension that offers this
> functionality? Thanks.
> 

Hi Alex,

You should be able to do a filter with something like procmail that
handles that process before the message ever gets into RT. Setting up
the Email template for the message is, of course, easy. No need to
know anything about RT code at all.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Queue template not available for queue scripts

2016-10-07 Thread Kenneth Marshall
On Fri, Oct 07, 2016 at 11:24:06AM -0400, Alex Hall wrote:
> Hello all,
> I'm kind of jumping around, both trying to update the test RT instance and
> do more with our production instance between other projects, so sorry for
> seeming to be all over the place with questions.
> 
> I've been asked to disallow email replies (easily done) but to offer a link
> in the body of email notifications for users to click that will open a new
> email. Essentially, the whole quoted text thing is making everyone so mad
> they want to force responses to always come from a new message. I made my
> first attempt at a template for this, but can't seem to assign it to the
> queue's script.
> 
> I went to queues > Technology (where I'll be testing this) and created a
> new template. I saved it, and I see it in the list of queue templates. I
> then went to Scripts from the same queue, chose a script, and tried to pull
> up my newly made custom template. It is nowhere in the list of templates,
> though. I see all the stock ones, but the one I just made and which appears
> in the queue templates list fails to appear in the list of templates for
> scripts.
> 
> Did I do something wrong, or miss a step? I don't want this to apply to all
> queues until I know it works, so I need to limit it to just one queue. Do I
> have to make my template the same name as a global one, or can I customize
> a script to use my custom template? Thanks.
> 
> -- 
> Alex Hall
> Automatic Distributors, IT department
> ah...@autodist.com


Hi Alex,

It sounds like you may want to have something in your Email template that
you send that will set-off the reply in a way that you can filter it on the
inbound side:

---REPLY BELOW THIS LINE---

---REPLY ABOVE THIS LINE---

Then clip the message on the receiving side. That is pretty much what all
of the systems that I have seen do. It is not my personal preference because
you lose the ability to reference items from a previous update in-line.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Making ticket history easier to read

2016-10-05 Thread Kenneth Marshall
On Wed, Oct 05, 2016 at 09:20:06PM +0200, Joop wrote:
> On 5-10-2016 14:33, Alex Hall wrote:
> > Oh right, of course. Still not used to all the commands available, I
> > guess. For anyone who is reading this and needs to locate the folder,
> > I found it at
> > /usr/local/share/request-tracker4/Plugins
> > In there is a folder for this extension, and presumably others I
> > install. In the extension's folder is etc, and in that is the
> > configuration file.
> >
> > All that said, I don't see a difference between the RT with this
> > plugin active and the one without it. Just as much extraneous detail
> > seems to be on both pages. It looks like my only recourse now is to
> > try the basic interface option.
> >
> Hmm, thats strange as I seem to remember that the only things being
> shown is Create/Correspond/Comment. There is a user preference which can
> add back all the transaction types available. Its in the Ticket Display
> box at the end and that can be reached using the righthand menu
> Settings/Preferences.
> I'm thinking that the extension is not enabled. (See the menu
> Admin/Tools/SystemConfiguration). I'm on RT-4.4.0
> 
> Regards,
> 
> Joop
> 

Hi Joop,

Alex is referring to the things like 'Brief headers -- Full headers' and 
'Download (untitled) / with headers' links that adorn the updates.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Making ticket history easier to read

2016-10-04 Thread Kenneth Marshall
On Tue, Oct 04, 2016 at 05:10:57PM -0400, Alex Hall wrote:
> Do you happen to know where that is on Debian? I can't locate a plugins
> directory anywhere I've tried, and putting it in /usr/request-tracker4/etc
> didn't seem to work correctly. Thanks.
> 

Hi Alex,

Try doing a find for a '*HistoryFilter*' directory. Unfortunately, I am
unfamiliar with Debian.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Making ticket history easier to read

2016-10-04 Thread Kenneth Marshall
On Tue, Oct 04, 2016 at 04:21:13PM -0400, Alex Hall wrote:
> Thanks guys. For the RT::Extension::HistoryFilter, where should the config
> file go and what should it have? The readme says to put it in /etc, but
> that doesn't seem right. Even if it is, the readme never details the
> options or syntax that can be used in the file. I've installed the
> extension, but see no difference thus far.
> 
> Upgrading from 4.2.8 to 4.4.x isn't an option at the moment, even if I can
> get a from-source install to work. I will look at the patch the link
> describes, though, and hope that an upgrade will be possible soon. Maybe
> over Christmas while no one is using the system for a few days. . Thanks.
> 

Hi Alex,

On our system, the config file is:

/opt/rt3/local/plugins/RT-Extension-HistoryFilter/etc/HistoryFilter_Config.pm

and contains:

--
# configuration for RT::Extension::HistoryFilter

Set( @HistoryFilterTypes, qw(Create Correspond Comment) );

1;
--

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Making ticket history easier to read

2016-10-04 Thread Kenneth Marshall
On Tue, Oct 04, 2016 at 07:13:12PM +0200, Joop wrote:
> On 4-10-2016 16:31, Alex Hall wrote:
> > Sorry to ask something I've already posted about, but this is the last
> > major area my boss and coworkers are all continuing to ask me about.
> > It's also one area on which I can find nothing at all.
> >
> > People want the ticket history to read more like a forum or instant
> > message conversation, rather than an email reply chain with tons of
> > extra links. Just for two replies on a ticket, here's what we all see:
> Have a look at RT::Extension::HistoryFilter which will hide quite a bit
> of history.
> 
> Regards,
> 
> Joop

Hi,

This functionality is included natively in newer RT releases. If just the
few additional links are problematic, you may want to look at:

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

It allow you to toggle to the SelfService interface which is much more
basic. If that does not work, you will need to take a look at the options
to customize your local system. If you do it cleanly, then updates are
much simpler.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] What is $HideUnsetFieldsOnDisplay?

2016-10-03 Thread Kenneth Marshall
On Mon, Oct 03, 2016 at 02:11:32PM -0400, Alex Hall wrote:
> Hi all,
> The only note for the configuration variable in the docs says "hides unset
> fields on ticket display", which I knew from the variable name. But what is
> an unset field, and is this on ticket creation as well? How do I unset a
> field, or does it mean a field not filled in during ticket creation? I
> hoped I could unset a few fields my work will never need, to take away some
> clutter, such as 'time worked' or the article selection on a ticket reply.
> Thanks for any explanations.
> 
> -- 
> Alex Hall
> Automatic Distributors, IT department
> ah...@autodist.com


Hi Alex,

When you are looking at the ticket display, the custom fields and their values
are listed, even ones that do not currently have a value. Setting this config
option determines whether empty value fields will be displayed. In 4.4, this
is a per-user preference setting.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Pushing Tickets in queue the "pusher" is not a member of?

2016-09-28 Thread Kenneth Marshall
On Mon, Sep 26, 2016 at 06:02:53PM +0200, Patrick G. Stoesser wrote:
> Hello there,
> 
> I'm using RT 4.2.8. I'm having several queues for several departments.
> 
> Now, tickets have to be pushed into other queues where then the
> according department works on them. But the "pusher" should not be a
> member of the queue, and he should not even see the queue.
> 
> Now I'm not getting anywhere with this. How do I systematically
> enable users to push tickets in queues in which they are no members,
> and which they don't need to see?
> 
> Thanks for any advice.
> 
> Regards, Patrick

Hi Patrick,

We have given the groups that should only be able to 'push' at ticket
to a queue only the SeeQueue and CreateTicket rights. They can see the
name of the queue(s) in that assignment dropdown but not the tickets
in the queue.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Best way to set up test RT instance?

2016-09-21 Thread Kenneth Marshall
On Wed, Sep 21, 2016 at 02:12:00PM -0400, Alex Hall wrote:
> Do you run from source? If not, how did you direct RT to use alternative
> paths during the install rather than using all the same ones and thus
> failing to install or overriding existing files?
> 
> Were I to attempt a source install again, could I safely do so alongside
> the current 4.2.8 instance on the server? Obviously I'd have to make a
> different database, and couldn't have both instances using the same email
> addresses for sending/receiving, but what else would I have to consider?
> 

Hi Alex,

Yes we do install from source and use /opt/rt3813, /opt/rt4210, /opt/rt441
as the install point based on the source. For the test instances we typically
configure their Email to deliver to a single file and we can check what was
sent within the RT history. Delivery could be controlled in many diffferent
ways based on the Email system delivery process.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Best way to set up test RT instance?

2016-09-21 Thread Kenneth Marshall
On Wed, Sep 21, 2016 at 12:50:51PM -0400, Alex Hall wrote:
> Hello all,
> I finally have RT sending out emails on the company's server, so we're
> ready to move forward with testing things and making changes. To that end,
> I'm wondering how everyone manages testing changes without affecting the
> primary instance, then moving those changes into production?
> 
> My first thought is to have a second installation on the same server, maybe
> in /etc/request-tracker4_test. The problems are how to deal with the other
> places RT installs itself (I use the pre-packaged install) and how to tell
> Debian to use that path in the first place.
> 
> My next option would be a whole different server, but doing that requires a
> way to move items between the two. Besides, it seems more efficient,
> somehow, to use one server rather than two.
> 
> Either way, I'll have to merge the changes I find work on the test system
> back to the real one. Is there a relatively simple way to do this, or do
> people just manually repeat the work they did on the test system on the
> live one? I'm not talking about source code changes, but, say, a new ticket
> type or SLA. Thanks for any thoughts.
> 
> -- 
> Alex Hall
> Automatic Distributors, IT department
> ah...@autodist.com


Hi Alex,

We use nginx to serve multiple independent installs from the same
server. The RT code + modifications is a pretty small footprint and
it allows us to have as full a test instance as we would care to
provide the resources.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Database again stuck at SQLite?

2016-09-14 Thread Kenneth Marshall
On Wed, Sep 14, 2016 at 09:00:48AM -0400, Alex Hall wrote:
> Hello all,
> I'm getting a bit desperate. I have no idea why the setting in
> 51-dbconfig-common and the main SiteConfig.pm file are both 'mysql', but
> the error when my FCGI server starts clearly indicates that RT is trying to
> connect to a SQLite database. I've run update-rt-siteconfig, and I've tried
> to run dbconfig-common; the latter doesn't exist, and I just get an error
> from the shell that it doesn't know the command. The former works fine, as
> indicated by all the settings being in the .pm file, but never actually
> seems to apply those settings for some reason.
> 
> I've even re-installed both RT and rt4-db-mysql, but that didn't make any
> difference as, for some reason, the initial package configuration for RT
> didn't appear. I've also changed the database type in
> /etc/dbconfig-common/request-tracker4.conf, but again, to no avail. Perhaps
> there's a way of applying dbconfig-common changes I don't know?
> 
> If anyone has any ideas about how I might get RT on the right backend,
> please, please send them along. We haven't been able to move RT to a local
> server, and thus start testing it with a wider pool of users, for two days
> because of this problem. My boss isn't happy, and I'm stuck.
> 

Hi Alex,

I do not have any experience with your prebuilt packages. I always installed
it myself and then a simple reconfig worked. Have you tried uninstalling all
of the packages and re-installing from scratch with just the backend packages
that you need? Good luck.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Adding group to one-time CC/Admin CC for ticket?

2016-09-12 Thread Kenneth Marshall
On Mon, Sep 12, 2016 at 12:53:37PM -0400, Alex Hall wrote:
> Hi all,
> My boss has just been looking through RT, and he didn't like that everyone
> in a queue was emailed for every ticket. I've removed queue staff and admin
> groups as watchers so this won't happen again, and we'll rely on entering
> users into the one-time CC and Admin CC boxes instead, not to mention
> severity escalation.
> 
> This made me wonder, though, if you can add a group as a CC or admin CC on
> a ticket? I know the field wants a comma-separated list of addresses, but
> couldn't a group name go in there, and the system pull the addresses on its
> own? It doesn't currently do this, at least on 4.2.8, but is it an option I
> could enable? Or a feature in newer versions of RT?
> 
> -- 
> Alex Hall
> Automatic Distributors, IT department
> ah...@autodist.com


Hi Alex,

For severity escalation, you can use the priority change to have a Scrip
automatically add an AdminCc to a particular ticket.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Moving Tickets in Bulk

2016-09-12 Thread Kenneth Marshall
On Mon, Sep 12, 2016 at 09:08:44AM -0700, Tim Gustafson wrote:
> We just finished importing around 50,000 tickets from one RT instance
> into another instance with its own large collection of tickets.  The
> rt-importer script put them into new queues (which we expected) rather
> than the ones we had already created in the destination system for the
> cut-over.  I went in to start moving tickets from the imported queues
> into the correct ones, and noticed that it's kinda slow, and it's
> sending notification e-mails (via scrips) for each move.
> 
> What's the safest way to move tickets from one queue to another in
> bulk without sending notification e-mails?  Is it safe to just do:
> 
> update Tickets set queue = 1234 where queue = 4321
> 
> in Postgres?  I don't care so much if the ticket's transaction history
> doesn't show the move.
> 
> -- 
> 
> Tim Gustafson
> t...@ucsc.edu
> 831-459-5354
> Baskin Engineering, Room 313A

Hi Tim,

That is how I have done it to avoid the notification flurry.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Adding updated ticket details to emails?

2016-09-06 Thread Kenneth Marshall
On Tue, Sep 06, 2016 at 11:49:51AM -0400, Alex Hall wrote:
> Hi again all,
> Another question related to emails came up as we tested RT just now. My
> coworker emailed in his ticket, and it got created. I went into the
> website, set myself as the owner, 'rejected' the ticket, and wrote a text
> reply. I expected him to get an email telling him my reply and all the
> updates to his ticket; instead, he got an email with only my reply.
> 
> In general, for our use case, it would be best for emails to include any
> changes to the status of the ticket in question along with any text written
> by anyone working on the ticket. For instance, Joe might send a reply
> saying "I took care of this", but he didn't close the ticket. John gets
> that email, since he's on the ticket too, and he sees that the status is
> still 'open' or 'new', so he knows to go in and close it. Or John takes
> ownership of the ticket, but doesn't write anything. This should still
> generate a message to Joe showing that John is now the owner. That kind of
> thing.
> 
> Is there a setting to enable such information/notifications, or will I have
> to modify the templates and scripts?
> 
> -- 
> Alex Hall
> Automatic Distributors, IT department
> ah...@autodist.com

Hi Alex,

You need to update your template to send the information you would like
to see. Here is a sample template that should work with a bit of customization:

Name: Transaction
Description: Default transaction template
Content:
RT-Attach-Message: yes

[{$rtname} #{$Ticket->id()}] was modified by 
  "{$Transaction->CreatorObj->RealName}" 
<{$Transaction->CreatorObj->EmailAddress}> on {$Transaction->CreatedAsString}:

 Transaction: {$Transaction->Type}: {$Transaction->Description}
   New Value: {$Transaction->NewValue}  Old Value: {$Transaction->OldValue}
   Queue: {$Ticket->QueueObj->Name}
 Subject: {$Transaction->Subject || $Ticket->Subject || "(No subject 
given)"}
   Owner: {$Ticket->OwnerObj->Name}
Requestor(s): {$Ticket->RequestorAddresses}
  Status: {$Ticket->Status}
 Created: {$Ticket->CreatedObj->AsString} 
({$Ticket->CreatedObj->AgeAsString})
 Due: {$Ticket->DueObj->AsString} ({$Ticket->DueObj->AgeAsString})
  Ticket URL: {$RT::WebURL}Ticket/Display.html?id={$Ticket->id}

{
if ( !($Transaction->Content() eq 'This transaction appears to have no 
content') ) 
  {
$OUT .= "-=-=-=-=-=-
".$Transaction->Content().""
  }
}

This is for 3.8.x but the principles are the same.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] Best web server for RT4?

2016-09-01 Thread Kenneth Marshall
On Thu, Sep 01, 2016 at 01:23:23PM -0400, Alex Hall wrote:
> Hey all,
> I think it's pretty clear by now that no one on this list uses Nginx (my
> server of choice). So, I guess I'll try to use Apache instead, using the
> official setup page:
> https://docs.bestpractical.com/rt/4.4.1/web_deployment.html
> 
> I'm using 4.2.8, but it's the same thing for hosting, I hope. Anyway, the
> Nginx section of the above page looked very simple--a configuration, a
> restart of Nginx, a spawn-fcgi, and you're done. Worse are all the warnings
> in each subsection of the Apache section. I'm not good enough with Linux to
> fully grasp what it is they're warning me about, but when Apache, then each
> subsection of Apache, has caveats and notes, while Nginx has none, I
> thought I'd take the safer road. If Nginx isn't an option, though, which
> method for Apache should I use to host the FCGI that RT needs in order to
> work? Is there a different RT setup/serving page that explains things
> differently? Thanks in advance.
> 
> -- 
> Alex Hall
> Automatic Distributors, IT department
> ah...@autodist.com


Hi Alex,

We use nginx+spawn-fcgi with RT here and it works very well. I think you
will need to test each piece of your setup before moving to the next. i.e.
Does the standalone server run? Then try it with fcgi. You should also
check your RT logs, because if the backend exits, then their will be nothing
to talk to.

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Boston - October 24-26
* Los Angeles - Q1 2017


Re: [rt-users] requestor is able to reopen ticket

2016-08-17 Thread Kenneth Marshall
On Wed, Aug 17, 2016 at 11:22:30AM -0700, Aaron McCormack wrote:
> This is a scrip that I've previously used on 4.2 to prevent the "thanks" 
> replies from reopening tickets:   
> https://rt-wiki.bestpractical.com/wiki/AutoOpenProblem
> 
> I think education would be best, but this will squelch the status changes 
> from making the ticket active.  I don't have the scrip running now in 4.4, 
> but hopefully the idea would still apply.
> 
> Aaron
> 

What about the extension  RT-Extension-RepliesToResolved-0.02

Regards,
Ken
-
RT 4.4 and RTIR training sessions, and a new workshop day! 
https://bestpractical.com/training
* Los Angeles - September 12-14, 2016


Re: [rt-users] Searching ticket subjects

2016-07-12 Thread Kenneth Marshall
On Tue, Jul 12, 2016 at 11:06:44PM +0530, Nilesh wrote:
> ... 
> > > > Does the default RT strip that off? Because I'm not seeing in one recent
> > > > duplicate created in the manner I described.
> > > > 
> > > Ah it's hidden inside 'show full headers'. This is interesting. Is there
> > > some documentation about this header?
> > Hi,
> > 
> > You can look at the RFC's, but that was the header that provided the most
> > value in reducing duplicate tickets.
> > 
> > Regards,
> > Ken
> 
> As this discussion is going on a few duplicate tickets were created in the
> system and this definitely looks like a good way to solve it. Did you use
> ExtractCustomFields module to get this done? 
> 
> I'm thinking of doing it like this:
> Run ExtractCustomFields on every correspond to get the Message ID out of the
> headers. Then I can search through this field probably using a customized rt-
> mailgate. Does that sound good? I don't think there's a way using scrips 
> because
> by the time scrip executes ticket is already created (unless something is
> possible in the "On transaction" condition).
> 

Hi Nilesh,

I have attached my current version of ./local/lib/RT/Interface/Email_Local.pm.
It includes our modifications gathered from the list recommendations in the 
function

ParseInReplyTo()

This patch is against RT 3.8.13+ and has not been updated to RT 4+ but is should
be a straight-forward update. To make your own version of Email_Local.pm, start
with just the function ParseInReplyTo() and the calling function and add 
functions
from ./lib/RT/Interface/Email.pm until you have a working file. That will be the
minimum that you will need. Take a look at 
http://requesttracker.wikia.com/wiki/Customizing
for more details. Let me know if you have any questions.

Regards,
Ken
package RT::Interface::Email;

use strict;
no warnings qw(redefine);

use Email::Address;
use MIME::Entity;
use RT::EmailParser;
use File::Temp;
use UNIVERSAL::require;
use Mail::Mailer ();
use Text::ParseWords qw/shellwords/;

sub ParseTicketId {
my $Subject = shift;

my $rtname = RT->Config->Get('rtname');
my $test_name = RT->Config->Get('EmailSubjectTagRegex') || qr/\Q$rtname\E/i;

my $id;
if ( $Subject =~ s/\[$test_name\s+\#(\d+)\s*\]//i ) {
$id = $1;
} else {
foreach my $tag ( RT->System->SubjectTag ) {
next unless $Subject =~ s/\[\Q$tag\E\s+\#(\d+)\s*\]//i;
$id = $1;
last;
}
}
return undef unless $id;

$RT::Logger->debug("Found a ticket ID. It's $id");
return $id;
}

sub ExtractTicketId {
my $entity = shift;

my $subject = $entity->head->get('Subject') || '';
chomp $subject;
return ParseTicketId( $subject );
}

sub ParseInReplyTo {
my $MessageId = shift;
$MessageId =~ s/<(.+)>/$1/;

my $id;
if ($MessageId ne '') {
$RT::Logger->debug("Looking for matching ticket using In-Reply-To: 
$MessageId");
my $query = "SELECT ObjectId" .
"  FROM Transactions JOIN Attachments" .
"ON Attachments.TransactionId = Transactions.id" .
" WHERE ObjectType = 'RT::Ticket'" .
"   AND MessageId = ?;";

my @result = $RT::Handle->FetchResult($query, $MessageId);

if ( $result[0] =~ /^\d+$/ ) {
$id = $result[0];
$RT::Logger->debug("Found a ticket ID using In-Reply-To header. 
It's $id");
}
}
return undef unless defined($id);

return $id;
}

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;
}

sub Gateway {
my $argsref = shift;
my %args= (
action  => 'correspond',
queue   => '1',
ticket  => undef,
message => undef,

Re: [rt-users] Searching ticket subjects

2016-07-12 Thread Kenneth Marshall
On Tue, Jul 12, 2016 at 07:06:41PM +0530, Nilesh wrote:
> On Tue, Jul 12, 2016 at 7:02 PM, Nilesh <m...@nileshgr.com> wrote:
> 
> > On Tue, Jul 12, 2016 at 6:58 PM, Kenneth Marshall <k...@rice.edu> wrote:
> >
> >> On Tue, Jul 12, 2016 at 06:54:09PM +0530, Nilesh wrote:
> >> > I don't think that's going to help me.
> >> > Let me give you a scenario:
> >> >
> >> > Person A sends a mail to my queue with B and C in CC. RT sends
> >> autoreply to
> >> > all of them. Then B thinks there should be something added so he
> >> replies to
> >> > A's mail instead of autoreply mail.
> >> > Now I have 2 different tickets created for the same subject by A and B.
> >> >
> >>
> >> Hi Nilesh,
> >>
> >> The 2nd Email should include an In-Reply-To: header that can be used
> >> to link it to the 1st Email's ticket.
> >>
> >> Regards,
> >> Ken
> >>
> >
> > Does the default RT strip that off? Because I'm not seeing in one recent
> > duplicate created in the manner I described.
> >
> 
> Ah it's hidden inside 'show full headers'. This is interesting. Is there
> some documentation about this header?

Hi,

You can look at the RFC's, but that was the header that provided the most
value in reducing duplicate tickets.

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


Re: [rt-users] Searching ticket subjects

2016-07-12 Thread Kenneth Marshall
On Tue, Jul 12, 2016 at 07:02:02PM +0530, Nilesh wrote:
> On Tue, Jul 12, 2016 at 6:58 PM, Kenneth Marshall <k...@rice.edu> wrote:
> 
> > On Tue, Jul 12, 2016 at 06:54:09PM +0530, Nilesh wrote:
> > > I don't think that's going to help me.
> > > Let me give you a scenario:
> > >
> > > Person A sends a mail to my queue with B and C in CC. RT sends autoreply
> > to
> > > all of them. Then B thinks there should be something added so he replies
> > to
> > > A's mail instead of autoreply mail.
> > > Now I have 2 different tickets created for the same subject by A and B.
> > >
> >
> > Hi Nilesh,
> >
> > The 2nd Email should include an In-Reply-To: header that can be used
> > to link it to the 1st Email's ticket.
> >
> > Regards,
> > Ken
> >
> 
> Does the default RT strip that off? Because I'm not seeing in one recent
> duplicate created in the manner I described.

Hi,

You will need to look at Email.pm to see what it does. At least that is the
name of the file in RT 3.8.13+. We are working on an upgrade to 4.4.x.

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


Re: [rt-users] Searching ticket subjects

2016-07-12 Thread Kenneth Marshall
On Tue, Jul 12, 2016 at 06:54:09PM +0530, Nilesh wrote:
> I don't think that's going to help me.
> Let me give you a scenario:
> 
> Person A sends a mail to my queue with B and C in CC. RT sends autoreply to
> all of them. Then B thinks there should be something added so he replies to
> A's mail instead of autoreply mail.
> Now I have 2 different tickets created for the same subject by A and B.
> 

Hi Nilesh,

The 2nd Email should include an In-Reply-To: header that can be used
to link it to the 1st Email's ticket.

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


Re: [rt-users] Handling a ticket that contains MANY comments....

2011-04-22 Thread Kenneth Marshall
On Fri, Apr 22, 2011 at 10:32:31AM -0400, Chris Hall wrote:
 Hello all,
 
 Question:  How should I best handle a ticket with multiple comments?  By
 multiple, I mean 400+.
 
 Here's the background.  Our helpdesk had to deal w/ a widespread outage.
  Tons upon tons of ppl were calling in for the entire day.  They decided
 they needed to log all these calls, so they created on ticket, named for
 this example outage.  Everytime someone called in, they would open the
 outage ticket and put a quick advised user of outage in the ticket.
  However, once the ticket started growing into the hundreds of comments, it
 would nearly lock the server up when someone would access it.  The CPU would
 peg out while the page was loaded, which would take roughly 2 minutes... and
 with probably a new person trying to access the ticket every 15 seconds, you
 could see how this was a problem.  It brought the entire ticketing system to
 something of a standstill.
 
 My question to you guys is how do I avoid something like this moving forward
 in the future?  I found this:
 
 http://search.cpan.org/~ruz/RT-Extension-ViaLink-UpdateTicket-0.02/lib/RT/Extension/ViaLink/UpdateTicket.pm
 
 and was thinking it would resolve the problem, if I can format the link it
 talks about to just update the ticket w/o trying to load/render a several
 hundred line ticket.. what are your thoughts?  Would this work?

We actually open a child ticket for each person to keep the
updates more compartmentalized. That works pretty well.

Cheers,
Ken


Re: [rt-users] RT 3.8.9 + PostgreSQL 8.4.7 - missing/bad indexes

2011-04-15 Thread Kenneth Marshall
On Fri, Apr 15, 2011 at 12:09:58PM +1000, Jesse Vincent wrote:
 
 
 
 On Thu 14.Apr'11 at 15:26:33 +0200, V?clav Ovs?k wrote:
  Hi,
  because of horrible performance of spreadsheet export of tickets I found
  some badly created or missing indexes. I didn't investigate if other
  RDBMS schemas has the same problem.
  To discover problems I rewrote Results.tsv into command-line shape and
  run it with DBI_TRACE=2 finally. 
  
  For every row of Tickets the following additional problematic queries are
  executed:
  
  
  
  SELECT  * FROM Groups WHERE Instance = ? AND LOWER(Domain) = LOWER(?) AND 
  LOWER(Type) = LOWER(?)
  
  e.g. one my bind params: 106431 'RT::Ticket-Role' 'Requestor'
  
  rt=# EXPLAIN ANALYZE SELECT * FROM Groups WHERE Instance = 106431 AND 
  LOWER(Domain) = LOWER('RT::Ticket-Role') AND LOWER(Type) = 
  LOWER('Requestor');
   QUERY PLAN 
   
 
 I'd actually consider this a code bug. We shouldn't be LOWER()ing either 
 of those parameters.  Please open a ticket by mailing
 rt-b...@bestpractical.com
 
 Thanks!
 

Okay, but does removing the LOWER()'s make the product harder to use?
In other words, when writing a Scrip that uses Type would it now be
case sensitive? i.e. Were AdminCc and admincc both acceptable? Some
of my most painful bug hunts were case-only related. Maybe the RT
code already handles that. My two cents.

Ken


Re: [rt-users] Modifying the text in a ticket?

2011-04-13 Thread Kenneth Marshall
On Wed, Apr 13, 2011 at 10:07:51AM -0500, Chris Barnes wrote:
 Ok, this might be a stopid question.  But I'm going to ask anyway.

 Is there an easy way for me to edit the text of things already in a ticket?

 For example, say I have a ticket and I add some comments (not sent to the 
 requestor) and I have a typo.  Is there a way I can go in and correct the 
 typo *of the original comment*?


 For us at least, RT is not a legal document flow where we need to 
 preserve every exact historical flow.  There are times I would like to 
 change things that DON'T show up in the History of the ticket

 -- 
 Chris Barnes   AOL IM: CNBarnes
 chris-bar...@tamu.eduYahoo IM: chrisnbarnes
 Computer Systems Manager   MSN IM: ch...@txbarnes.com
 Department of Physics  ph: 979-845-1379
 Texas AM University  fax: 979-845-2590


You will need to use SQL on the backend.

Cheers,
Ken


Re: [rt-users] How do I submit a ticket in behalf of a user?

2011-04-01 Thread Kenneth Marshall
On Thu, Mar 31, 2011 at 10:25:08PM -0400, Thomas Sibley wrote:
 On 31 Mar 2011 22:08, Rocel M. Lacida wrote:
  Hello All,
  Good Day!
  
  It's my first to post a mail to the mailing list so  bear with me. First
  I am previous user of other ticketing system (Accord Trellis) and I have
  many problems about it and upon searching on the net about  what is best
  ticketing system out there I found RT and it really meet my
  requirements. Been using RT for only a couple of weeks and honestly it
  was awesome. Though I stumble some difficulties at first it was solve
  upon searching on the web where lots of solutions are provided. Now the
  only hindrance right now is this,Sorry  to ask this question though I
  think there is an easy to answer for this I just don't know where to
  find it. In my prevoius ticketing system there is a functionality that
  someone can post a ticket in behalf of that user.Where I can find it on
  RT? Is there any equivalent functionality that I could duplicate? Hope
  you could help me about this. Sorry for the long introduction.
 
 Glad to hear you're enjoying RT.  To create a ticket on behalf of a
 user, just put their email address in the Requestor field when creating
 a ticket via the web.
 
 Cheers,
 Thomas
 

You can also use the CommandByMail extension to set the requestor
via Email.

Cheers,
Ken


Re: [rt-users] Create tickets on mails without creating a real user record.

2011-04-01 Thread Kenneth Marshall
On Fri, Apr 01, 2011 at 11:12:13PM +0200, Jan Hugo Prins wrote:
 On 04/01/2011 04:05 PM, Kevin Falcone wrote:
  RT creates a user record for any email address associated with a
  ticket.  That is a fundamental part of how RT works.
 
  Why are you concerned about this?
 Well, it's not that I'm concerned about it, but we were wandering about
 this during our tests on how to get RT working with creating new
 external users, while also allowing users authenticate that have a LDAP
 account. This doesn't seem to work the way it is supposed to work, at
 least not yet, and then we thought, can we accept tickets without
 creating the account. Besides that, when your RT installation starts
 receiving spam mail, then you can end up with an enormous user database,
 so allowing external users to autocreate an account is not really an
 option I think.
 
 Jan Hugo
 

Putting a reasonable SPAM filter in front of RT greatly minimizes
this problem. We pass all non-authenticated (remote) users through
DSPAM and let the quarantine catch the spam. Authenticated mail
senders zoom right in.

Cheers,
Ken
 


Re: [rt-users] MySQL to PostgreSQL for RT

2011-03-24 Thread Kenneth Marshall
There are procedures used by several different people who performed
this migration in the wiki. None of them look particularly difficult.

Cheers,
Ken

On Thu, Mar 24, 2011 at 03:10:16PM -0700, Simon Gao wrote:
 Hi,
 
 Have anyone successfully migrated RT database from MySQL to PostgreSQL?
 
 Thanks,
 
 Simon


Re: [rt-users] RT Ticket History Search

2011-03-09 Thread Kenneth Marshall
On Wed, Mar 09, 2011 at 08:30:11PM +0200, ronald higgins wrote:
 Greetings List Members,
 
 Does anyone know how to search through the ticket history. I'm trying
 to trace all the tickets that a particular user has worked on and not
 necessarily closed, possibly handed over to another user,
 is there a way to do this via the front or back end ?
 
 Regards
 
 Ronald
 
You can troll through the transactions table looking for a
specific creator with SQL certainly.

Cheers,
Ken


Re: [rt-users] Search for tickets with unread comments

2011-03-04 Thread Kenneth Marshall
On Fri, Mar 04, 2011 at 06:41:16AM -0800, Yan Seiner wrote:
 Kevin Falcone wrote:
 Back to the New Messages behavior - it doesn't do that.  It says
 No even if a new emailed comment appears.  Is there a way to get
 the behavior I want?
 

 Are you the one updating the ticket?  That isn't a valid test case.
   
 The test case was a requester updating the ticket.


 But honestly, it sounds like you want to order by LastUpdated and show
 LastUpdatedBy so that you can tell if an external customer updated a
 ticket.
   
 OK, I'll give it a try.  Thanks!


Yan,

I have not tried it yet, but this looks like it would do what you
want and mark tickets that have new replies:

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

Cheers,
Ken


Re: [rt-users] Possible solution for assigning tickets to users

2011-03-04 Thread Kenneth Marshall
On Fri, Mar 04, 2011 at 04:43:46PM -0500, Mathew Snyder wrote:
 Right now our configuration limits who can own tickets in each queue.
 It used to be a flatter configuration in which anyone could own a
 ticket in any queue. This was cumbersome for more than one reason. It
 meant every user was listed in the drop down for every queue. It also
 made tracking work difficult because anyone could take a ticket from
 you while actually doing work or provide conflicting information.
 Knowing this, when someone moves a ticket to a queue which they don't
 have StealTicket or TakeTicket (which implies OwnTicket) rights on it
 is automatically assigned to Nobody, which makes sense.
 
 This leads to a minor concern with my bosses, though. They don't like
 that if they want to assign a ticket to a specific user when moving
 between queues that they have to perform two operations: move the
 ticket then wait for the user list to refresh with the new, authorized
 users and then assign the ticket. They want this to be a single action
 event: Tell RT which queue to send the ticket to and to whom it should
 be assigned when it's moved. This also makes sense. But, as stated,
 one has to wait for the list to be populated with the actual users
 that can own the ticket in the new queue before assigning it to them.
 
 My proposed solution which I'd like some input on (or other possible
 solutions that users have found to work) is to create a custom field
 with every privileged user. One would select the user to whom the
 ticket will be assigned and then a scrip will evaluate the field and
 make the assignment. If someone selects a user that doesn't have
 permission to own a ticket in the destination queue it would
 presumably default to Nobody. Ideally, the field would be able to be
 populated with existing users each time the page is written
 eliminating the need to manually update it whenever a new user is
 created or an old one is eliminated, but that's secondary to the
 problem at hand.
 
 So, what say the masses? Is this a viable solution or has anyone come
 up with something a bit more elegant?
 
 -Mathew
 

That sounds okay to me. Would it be possible to set the permissions
on the custom field to only be viewable/settable by the bosses?

Cheers,
Ken


Re: [rt-users] Deactivate User Nobody

2011-03-03 Thread Kenneth Marshall
On Thu, Mar 03, 2011 at 01:09:31AM -0800, john s. wrote:
 
 
 Hello all,
 
 Is it possibe to deactivate the user nobody without any Disadvantages for
 the whole system?
 
 
 or is it a recipe for an proximate event?
 
 best regards john 
 

You will need to run through all the scrips and perl code to
ensure that nothing sets the owner to Nobody and uses an actual
value. It sounds like a recipe for disaster with tickets being
assigned at creation to owners that cannot resolve them. It
may be that your workflow will allow that to work. What are
you trying to gain from this change?

Cheers,
Ken


Re: [rt-users] Can't use an undefined value as a HASH reference at /opt/rt3/share/html/Admin/Users/index.html line 120, line 69.

2011-03-01 Thread Kenneth Marshall
On Tue, Mar 01, 2011 at 02:15:11PM +0100, hubert depesz lubaczewski wrote:
 On Tue, Mar 01, 2011 at 04:13:14PM +0300, Ruslan Zakirov wrote:
  Then something wrong with your setup. RT_Config.pm should contain defaults
  for this option.
 
 This is config from rather old version of rt moved across versions to
 current version.
 
 What can I do now to solve the problem?
 
 Best regards,
 
 depesz
 
 

You need to put your local differences from RT_Config.pm in the
RT_SiteConfig.pm. Then check the new config file to see if there
are any changes that need to be put in your site specific config
file. This check should be part of the upgrade process.

Cheers,
Ken


Re: [rt-users] RTx::EmailCompletion adding name/other fields to pop down display

2011-02-25 Thread Kenneth Marshall
On Fri, Feb 25, 2011 at 11:17:02AM +, Giuseppe Sollazzo wrote:
 Hi all,
 we've been using RTx::EmailCompletion for a while very successfully. This 
 is an extension that allows the user to see a pop down display of e-mail 
 addresses upon insertion of a minimum number of characters.

 The search is made on a number of parameters you can specify (in our case, 
 e-mail and cn from our directory). However, only the e-mail address is 
 displayed, whereas we would like to show something more, let's say part of 
 the cn or other data.

 Has anyone done something similar?

 I've found on the cpan page that the customisation can be done in
 - html/NoAuth/js/emailcompletion.js
 - lib/RTx/EmailCompletion.pm

 but it's not totally clear to me how - I'm not too much into JS. Can anyone 
 help?

 Cheers,
 ||


Unfortunately my Javascript skills are non-existent, but I would
like this as well. It would be great if it could display a number
of fields from the directory service to help you select the correct
Email address. For example, we also include phone extension/number
as a search key but we often need more information to validate the
customer.

Regards,
Ken


Re: [rt-users] Users Modify.html error with 3.8.8

2011-02-18 Thread Kenneth Marshall
On Thu, Feb 17, 2011 at 04:27:40PM -0600, Susan McClure wrote:
 I am attempting to upgrade to rt 3.8.8 and when I try, as SuperUser to
 Select a user's record under Config=Users I receive this error:

 RT::User::CurrentUserRequireToSetPassword Unimplemented in 
 HTML::Mason::Commands. 
 (/opt/opt.CORE/rt-3.8.8/rhel5/share/html/Admin/Users/Modify.html line 353)
 I tried restarting the webserver and clearing the Mason cache.

 Any ideas please?

 Thanks

 Susan McClure


We found the problem. It was a local customization. Once we moved
that over, it worked.

Thank you,
Ken


Re: [rt-users] A way to skip a global scrip in one queue?

2011-02-17 Thread Kenneth Marshall
On Thu, Feb 17, 2011 at 11:03:54AM -0600, Jon Baker wrote:
 I have an RT system running about 25 queues.  I have a global scrip that runs 
 On Correspond to notify the requestor with the default Correspondence 
 template.
 
 I have one queue that I'd like to use a different template (to have a 
 specific message in addition to the update).  The only way I see to do this 
 is to remove the global scrip, and then enter it into each of the 24 queues 
 that I want to keep it, then place the slightly modified one into the new 
 queue.  But that seems like a pain to manage, so I was wondering if there's a 
 way to prevent a global scrip from running in a single queue?
 
 ~jon
 

You can use a queue specific template to override the global
one of the same name. *I think.*

Ken


[rt-users] getting a group of ticket numbers

2011-02-09 Thread Kenneth Marshall
Maybe I cannot see the forest for the trees, but how
can you select a group of ticket ids? You can type a
single ticket number in the search box and that works,
but what if you want tickets numbered 235-331? Any
ideas?

Cheers,
Ken


Re: [rt-users] getting a group of ticket numbers

2011-02-09 Thread Kenneth Marshall
Thank you. I could have sworn that I tried that and it
did not work, but it worked now.

Ken

On Wed, Feb 09, 2011 at 09:50:48AM -0500, Lander, Scott wrote:
 ID is less than 332 and id is greater than 235?
 
 
 
 -Original Message-
 From: rt-users-boun...@lists.bestpractical.com 
 [mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Kenneth 
 Marshall
 Sent: Wednesday, February 09, 2011 9:39 AM
 To: rt-users@lists.bestpractical.com
 Subject: [rt-users] getting a group of ticket numbers
 
 Maybe I cannot see the forest for the trees, but how
 can you select a group of ticket ids? You can type a
 single ticket number in the search box and that works,
 but what if you want tickets numbered 235-331? Any
 ideas?
 
 Cheers,
 Ken
 
 This e-mail message is intended only for the personal use of the recipient(s) 
 named above. If you are not an intended recipient, you may not review, copy 
 or distribute this message. If you have received this communication in error, 
 please notify the Hearst Service Center (cad...@hearstsc.com) immediately by 
 email and delete the original message.
 
 
 


Re: [rt-users] LVS and RT

2011-02-08 Thread Kenneth Marshall
On Mon, Feb 07, 2011 at 10:16:22PM -0700, Thierry Thelliez wrote:
 Hello,
 
 We have been playing with different redundant architectures.
 
 The system we are trying now is comprised of:
 1- Two front end servers running an LVS based proxy system. Proxy to
 RT and also other apps.
 2- The two previous servers load balance to two RT servers.
 3- The RT servers talk to a MySQL Master/Slave setup.
 
 We are trying to understand how Mason/Perl/RT are managing end user
 sessions.  We are getting session mix-ups. User A becomes User B...
 
 Any experience with such a setup? Or any enlightenment on how user
 sessions work in RT?
 
 Thanks
 Thierry
 

Are you storing your sessions in the database with an INNODB table,
or are they stored in the filesystem?

Ken


Re: [rt-users] Set ticket due date with email

2011-02-08 Thread Kenneth Marshall
On Tue, Feb 08, 2011 at 05:25:26PM -0430, Hernan Garcia wrote:
 Good evening guys,
 
 I am wondering if there's a way to set a ticket due date with the same email 
 sent to create it in the first place (like any special string format in the 
 subject or body of the email).
 
 Thanks in advance.
 

Try:

RT-Extension-CommandByMail

Cheers,
Ken


Re: [rt-users] Possible to stop rt-crontool from logging to ticket?

2011-02-04 Thread Kenneth Marshall
On Fri, Feb 04, 2011 at 10:31:05AM -0600, John Alberts wrote:
 I have setup some cronjobs to use rt-crontool to email reminders to a
 group email address about open tickets.  This works great, but every
 time it sends an email, it logs it in the ticket history.  This makes
 the ticket history quite messy.  Is there any way to tell rt-crontool
 not to log to the ticket history, or possibly specify something in the
 template I'm using?
 
  
 
 Here's an example of one of the cronjobs I'm using:
 
 0 3 * * * /opt/rt3/bin/rt-crontool --search RT::Search::FromSQL
 --search-arg Owner = 'nobody' AND Created  '2 days ago' AND Created 
 '3 days ago' AND Status != 'resolved' AND Status != 'rejected' AND
 Status != 'deleted'  --action RT::Action::RecordComment --template
 'Unowned tickets2'
 
  
 
 Also, where can I get a list of supported actions for rt-crontool?  I
 couldn't find any documentation for that.
 
  
 
 Thanks
 
 --
 
 John Alberts
 
 Hosted Services Systems Administrator
 
 Ex Libris (USA) Inc.
 1350 E. Touhy Ave.  Suite 200 East
 Des Plaines, IL 60018

Hi John,

The --action you are using stores the information in the History.
Have you considered making the appropriate dashboard and then using
the Email Dashboards function to send the appropriate reminders.
This should avoid having to add to the History. Alternatively, you
could send the mail from outside of RT and just use the  RT CLI to
gather the information for your mail message.

Cheers,
Ken


Re: [rt-users] Trying to modify the Quick Ticket function

2011-02-03 Thread Kenneth Marshall
On Thu, Feb 03, 2011 at 12:38:41PM -0600, Chris Barnes wrote:
 On the dashboard (is that it - the home?) there is this neat thing called 
 Quick Ticket Creation.

 Because of the way we do things, this area is really only useful to us to 
 log quickie, one time events.   That is,
 * if one of the IT folks need to create a ticket with some actual content, 
 we use the new ticket in button at the top.
 * users create tickets by sending us email (ie. they do NOT have accounts 
 in RT).


 Thus, since we want to use the Quick Ticket area for event logging, there 
 are a couple of things we are trying to accomplish by modifying it's 
 function

 (1) the ticket needs to have the status set to Resolved

 (2) it does NOT send email to the requestor  (at all, ever).
 note that we DO want to send email to the requestor from other functions, 
 so we do NOT want to blow away the ability to send email when we set a 
 normal ticket to resolved.



 I am trying to make this change in RT by modifying the Mason script.
 /opt/rt3/share/html/Ticket/ModifyAll.html has the following section

 tr
 td class=label|/lUpdate Type/:/td
 td class=entry
   select name=UpdateType
 % if ($CanComment) {
 option value=private |/lComments (Not sent to
 requestors)//option
 % }
 % if ($CanRespond) {
 option value=response|/lReply to requestors//option
 % }
   /select
 % $m-callback( %ARGS, CallbackName = 'AfterUpdateType' );
 /td
   /tr

 I simply tried to splice this
 into /opt/rt3/share/html/Elements/QuickCreate

 tr class=input-row
 td class=labeltop|/lContent/:/td
 td colspan=3 class=valuetextarea name=Content cols=50
 rows=3/textarea/td/tr

 tr
 td class=label|/lUpdate Type/:/td
 td class=entry
   select name=UpdateType
 % if ($CanComment) {
 option value=private |/lComments (Not sent to
 requestors)//option
 % }
 % if ($CanRespond) {
 option value=response|/lReply to requestors//option
 % }
   /select
 % $m-callback( %ARGS, CallbackName = 'AfterUpdateType' );
 /td
   /tr

 /table
  /Elements/Submit, Label = loc('Create') 
 /form
 /

 % $m-callback( CallbackName = 'EndOfList', TicketObj = $TicketObj, %
 ARGS );
 /div

 %INIT

 my $CanRespond = 1;
 my $CanComment = 1;
 my $checks_failure = 0;
 my $title;

 # Things needed in the template - we'll do the processing here, just
 # for the convenience:

 my ($CommentDefault, $ResponseDefault);
 $CommentDefault = qq[ selected=selected];
 $ResponseDefault = qq[ selected=selected];

 /%INIT

 %ARGS

 $TicketObj = undef





 Problem #1 is that this generates two tickets

 Problem #2 is that it is sending a reply to the requestor (actually 2 
 replies, but that is probably due to Problem #1).


 Is this even the right way to go about trying to implement his feature 
 change?  Or am I barking up the wrong tree?

 -- 
 Chris Barnes   AOL IM: CNBarnes
 chris-bar...@tamu.eduYahoo IM: chrisnbarnes
 Computer Systems Manager   MSN IM: ch...@txbarnes.com
 Department of Physics  ph: 979-845-1379
 Texas AM University  fax: 979-845-2590


Hi Chris,

I can think of several ways to do this. If you only need this function
for a several queues, make a shadow queue for each queue called qt:queue
to place them near each other. Then configure the scrips for your shadow
queue to assign/process the queue as describe. Another way is to have
creation using the quick ticket method set a global custom field and use
that to trigger your alternate processing.

Cheers,
Ken


Re: [rt-users] Any gotchas for load balancing RT's front end?

2011-01-28 Thread Kenneth Marshall
On Fri, Jan 28, 2011 at 04:35:01PM -0500, Todd Chapman wrote:
 We are looking at possibly load balancing RT's web front end. Our
 sessions are DB based.
 
 Are there any gotchas to consider?
 
 RT 3.6.3 (I know, I know)
 
 Thanks.
 
 -Todd
 

We have not needed to do this for RT yet, but you should provide
for some level of persistance for connections to leverage RT's
internal caching. A pure round-robin load balance will have both
frontends doing more work than they need to do. It may also be
worth revisiting your settings for KeepAlive on your web servers
as well to maximize performance and minimize resource usage.

Regards,
Ken


Re: [rt-users] Sphinx full-text search engine in RT

2011-01-11 Thread Kenneth Marshall
On Tue, Jan 11, 2011 at 09:00:51AM -0500, Steve McStravick wrote:
 This looks great, I hope to be trying this soon.
 I'll also try to integrate antiword, docx2text and pdftotext so we can
 search our RTFM documents.
 
 If/When I do, I'll be sure to update wiki!
 
 Steve

I am not using sphinx for FTS but hopefully your patch for these
will also work with PostgreSQL FTS and Oracle FTS. I can test
PostgreSQL if you need a tester.

Cheers,
Ken



Re: [rt-users] Modifying 10 highest tickets

2011-01-11 Thread Kenneth Marshall
On Tue, Jan 11, 2011 at 01:53:48PM +, Garry Booth wrote:
 Hi all

 Happy new year.

 Does anybody know if there is a way to globally change the default setup 
 for 10 highest priority tickets I own?
 e.g: make it order by a custom field.
 I can easily do it for myself by simply editing the widget, but would like 
 to roll out a change to it for all users

 regards
 Garry

Hi Garry,

This can be done, but an approach we have taken is to have
a custom dashboard that is used by default instead of mucking
with the standard system pieces. The advantage of the dashboard
method is that you can provide a custom interface for a number
of different groups and not just one for all.

Regards,
Ken


Re: [rt-users] Custom field queries are very slow after 3.8.8 upgrade (from 3.6.10)

2011-01-06 Thread Kenneth Marshall
On Thu, Jan 06, 2011 at 01:50:19PM +0900, Georgi Georgiev wrote:
 Quoting Kenneth Marshall at 05/01/2011-08:14:10(-0600):
  On Wed, Jan 05, 2011 at 07:31:37PM +0900, Georgi Georgiev wrote:
   I am looking for some advice on how to speed up some queries using
   custom fields that got unusably slow after an upgrade from the RT 3.6 
   series
   to 3.8.
   
   We are currently running RT 3.6.10 on CentOS 5.5 with a postgresql
   back end (used to be PgSQL 8.1 but we upgraded to 8.4 when CentOS 5.5
   came out). The RT package is from EPEL and everything is fine.
   
   When trying to upgrade to RT 3.8.8 some of our saved queries using
   custom fields get very, *very* slow. I tried this twelve months ago with
   RT 3.8.7 on CentOS 5.x and PgSQL 8.1 (whatever was current then), and
   also again today, on RHEL6 with PgSQL 8.4.
   
   The problematic queries look something like this:
   
   Queue = 'somequeue' AND Status = 'stalled' AND (
   'CF.{MyCF}' = 'value1' OR
   'CF.{MyCF}' = 'value2' OR
   'CF.{MyCF}' = 'value3' OR
   'CF.{MyCF}' = 'value4' OR
   'CF.{MyCF}' = 'value5' OR
   'CF.{MyCF}' = 'value6' OR
   'CF.{MyCF}' = 'value7' )
   
   where the listed values are 3-4 characters long and their number varies.
   
   After the ugprade, and with logging of slow queries enabled, I saw these
   numbers for queries with 5, 6, 7, and 8 OR statements for the custom
   field in the postgresql logs:
   - query for 5 possible CF values - 0.6 seconds
   - query for 6 possible CF values - 6 seconds
   - query for 7 possible CF values - 65 seconds
   - query for 8 possible CF values - 681 seconds
   
   In comparison, the corresponding query in RT 3.6 executes in less than 2
   milliseconds.
   
   One thing I noticed is that the SQL that is generated by RT 3.6 and 3.8
   is substantially different.
   
   In 3.6 there is a single SELECT on the ObjectCustomFieldValues table, so
   the generated SQL looks like this:
   
   SELECT DISTINCT main.*
   FROM Tickets main
   JOIN ObjectCustomFieldValues ObjectCustomFieldValues_1
   ON  ( ObjectCustomFieldValues_1.CustomField = '1' )
   AND ( ObjectCustomFieldValues_1.ObjectType = 'RT::Ticket' )
   AND ( ObjectCustomFieldValues_1.Disabled = '0' )
   AND ( ObjectCustomFieldValues_1.ObjectId = main.id )
   WHERE (main.Status != 'deleted')
   AND (main.Queue = '11' AND main.Status = 'stalled' AND
   (
( ( ObjectCustomFieldValues_1.Content = 'value1' )  )
OR  ( ( ObjectCustomFieldValues_1.Content = 'value2' )  )
   ...
   )
   )
   AND (main.Type = 'ticket')
   AND (main.EffectiveId = main.id)
   ORDER BY main.id ASC
   
   In RT 3.8.8 the generated SQL looks like this:
   
   SELECT DISTINCT main.*
   FROM Tickets main
   LEFT JOIN ObjectCustomFieldValues ObjectCustomFieldValues_1
   ON  ( ObjectCustomFieldValues_1.CustomField = '1' )
   AND ( ObjectCustomFieldValues_1.ObjectType = 'RT::Ticket' )
   AND ( ObjectCustomFieldValues_1.Disabled =  '0' )
   AND ( ObjectCustomFieldValues_1.ObjectId = main.id )
   LEFT JOIN ObjectCustomFieldValues ObjectCustomFieldValues_2
   ON  ( ObjectCustomFieldValues_2.CustomField = '1' )
   AND ( ObjectCustomFieldValues_2.ObjectType = 'RT::Ticket' )
   AND ( ObjectCustomFieldValues_2.Disabled =  '0' )
   AND ( ObjectCustomFieldValues_2.ObjectId = main.id )
   
   WHERE (main.Status != 'deleted')
   AND (
   main.Queue = '11' AND main.Status = 'stalled' AND
(
   (  (  ( ObjectCustomFieldValues_1.Content = 'value1' )  )  )
   OR  (  (  ( ObjectCustomFieldValues_2.Content = 'value2' )  )  )
   
)
   )
   AND (main.Type = 'ticket')
   AND (main.EffectiveId = main.id)
   ORDER BY main.id ASC
   
   I ran the queries through explain analyze and tried disabling nested
   loops, then disabling hash joins (I tried disabling whatever the planner
   was trying to use hoping it will try something else that is faster) but
   the query speed did not change considerably.
   
   Our database is not that big and can easily fit in the memory of the
   machine (400MB filesize), and we have less than 6000 tickets total. The
   queries I tried out return only a total of 4 to 5 tickets in the end. The
   custom field that I am referring to above is a mandatory field so it is
   assigned for almost all tickets, and with multiple values most of the
   time.
   
   Any advice?
   
  
  Hi Georgi,
  
  What are your postgresql.conf parameters?
  
  What are the EXPLAIN ANALYZE results for the fast query (3.6.x) and
  the slow (3.8.8) query? That should also point out where an index may
  help.
 
 Thanks for the pointers, Kenneth.
 
 We actually haven't touched postgresql.conf at all. The defaults have
 worked fine for our small postgresql installation thus far and I just
 didn't know where I should look next - in RT or postgres. Here is our
 postgresql.conf (it's the default one on the distro) and it is identical
 on RHEL6 and CentOS 5.5.
 
 max_connections = 100
 shared_buffers = 32MB
 logging_collector = on
 log_directory = 'pg_log

Re: [rt-users] Custom field queries are very slow after 3.8.8 upgrade (from 3.6.10)

2011-01-05 Thread Kenneth Marshall
On Wed, Jan 05, 2011 at 07:31:37PM +0900, Georgi Georgiev wrote:
 I am looking for some advice on how to speed up some queries using
 custom fields that got unusably slow after an upgrade from the RT 3.6 series
 to 3.8.
 
 We are currently running RT 3.6.10 on CentOS 5.5 with a postgresql
 back end (used to be PgSQL 8.1 but we upgraded to 8.4 when CentOS 5.5
 came out). The RT package is from EPEL and everything is fine.
 
 When trying to upgrade to RT 3.8.8 some of our saved queries using
 custom fields get very, *very* slow. I tried this twelve months ago with
 RT 3.8.7 on CentOS 5.x and PgSQL 8.1 (whatever was current then), and
 also again today, on RHEL6 with PgSQL 8.4.
 
 The problematic queries look something like this:
 
 Queue = 'somequeue' AND Status = 'stalled' AND (
 'CF.{MyCF}' = 'value1' OR
 'CF.{MyCF}' = 'value2' OR
 'CF.{MyCF}' = 'value3' OR
 'CF.{MyCF}' = 'value4' OR
 'CF.{MyCF}' = 'value5' OR
 'CF.{MyCF}' = 'value6' OR
 'CF.{MyCF}' = 'value7' )
 
 where the listed values are 3-4 characters long and their number varies.
 
 After the ugprade, and with logging of slow queries enabled, I saw these
 numbers for queries with 5, 6, 7, and 8 OR statements for the custom
 field in the postgresql logs:
 - query for 5 possible CF values - 0.6 seconds
 - query for 6 possible CF values - 6 seconds
 - query for 7 possible CF values - 65 seconds
 - query for 8 possible CF values - 681 seconds
 
 In comparison, the corresponding query in RT 3.6 executes in less than 2
 milliseconds.
 
 One thing I noticed is that the SQL that is generated by RT 3.6 and 3.8
 is substantially different.
 
 In 3.6 there is a single SELECT on the ObjectCustomFieldValues table, so
 the generated SQL looks like this:
 
 SELECT DISTINCT main.*
 FROM Tickets main
 JOIN ObjectCustomFieldValues ObjectCustomFieldValues_1
 ON  ( ObjectCustomFieldValues_1.CustomField = '1' )
 AND ( ObjectCustomFieldValues_1.ObjectType = 'RT::Ticket' )
 AND ( ObjectCustomFieldValues_1.Disabled = '0' )
 AND ( ObjectCustomFieldValues_1.ObjectId = main.id )
 WHERE (main.Status != 'deleted')
 AND (main.Queue = '11' AND main.Status = 'stalled' AND
 (
  ( ( ObjectCustomFieldValues_1.Content = 'value1' )  )
  OR  ( ( ObjectCustomFieldValues_1.Content = 'value2' )  )
 ...
 )
 )
 AND (main.Type = 'ticket')
 AND (main.EffectiveId = main.id)
 ORDER BY main.id ASC
 
 In RT 3.8.8 the generated SQL looks like this:
 
 SELECT DISTINCT main.*
 FROM Tickets main
 LEFT JOIN ObjectCustomFieldValues ObjectCustomFieldValues_1
 ON  ( ObjectCustomFieldValues_1.CustomField = '1' )
 AND ( ObjectCustomFieldValues_1.ObjectType = 'RT::Ticket' )
 AND ( ObjectCustomFieldValues_1.Disabled =  '0' )
 AND ( ObjectCustomFieldValues_1.ObjectId = main.id )
 LEFT JOIN ObjectCustomFieldValues ObjectCustomFieldValues_2
 ON  ( ObjectCustomFieldValues_2.CustomField = '1' )
 AND ( ObjectCustomFieldValues_2.ObjectType = 'RT::Ticket' )
 AND ( ObjectCustomFieldValues_2.Disabled =  '0' )
 AND ( ObjectCustomFieldValues_2.ObjectId = main.id )
 
 WHERE (main.Status != 'deleted')
 AND (
 main.Queue = '11' AND main.Status = 'stalled' AND
  (
 (  (  ( ObjectCustomFieldValues_1.Content = 'value1' )  )  )
 OR  (  (  ( ObjectCustomFieldValues_2.Content = 'value2' )  )  )
 
  )
 )
 AND (main.Type = 'ticket')
 AND (main.EffectiveId = main.id)
 ORDER BY main.id ASC
 
 I ran the queries through explain analyze and tried disabling nested
 loops, then disabling hash joins (I tried disabling whatever the planner
 was trying to use hoping it will try something else that is faster) but
 the query speed did not change considerably.
 
 Our database is not that big and can easily fit in the memory of the
 machine (400MB filesize), and we have less than 6000 tickets total. The
 queries I tried out return only a total of 4 to 5 tickets in the end. The
 custom field that I am referring to above is a mandatory field so it is
 assigned for almost all tickets, and with multiple values most of the
 time.
 
 Any advice?
 

Hi Georgi,

What are your postgresql.conf parameters? What are the EXPLAIN ANALYZE
results for the fast query (3.6.x) and the slow (3.8.8) query? That
should also point out where an index may help.

Cheers,
Ken


Re: [rt-users] Can I add user info to ticket metadata?

2010-12-20 Thread Kenneth Marshall
On Mon, Dec 20, 2010 at 08:31:15AM -0600, Tollefsen, Lyle wrote:
 Hello,
 
 Is it possible to include users Identity, Location and Phone numbers info in 
 the ticket metadata? I know I can grant ShowConfigTab and AdminUsers to give 
 access to this info, but I want access to be read only and, ideally, visible 
 when a ticket is opened. Can this be done?
 
 Thanks.
 
 Lyle Tollefsen

Hi Lyle,

We created custom fields to hold this information and then
populate them during the initial ticket creation with scrips
in order to keep a copy with the ticket.

Cheers,
Ken


Re: [rt-users] advanced search w/ a sql call

2010-12-20 Thread Kenneth Marshall
On Mon, Dec 20, 2010 at 11:38:35AM -0500, Darin Perusich wrote:
 Hello,
 
 I'd like to search for tickets created w/in the past 7 days which can be
 done easily enough by creating a query where Created after some day,
 Created  '2010-12-13'. I'd like to make this more dynamic so I go
 into Advanced and change the Query to Created  date_add(current_date,
 interval - 7 day) and when I apply the changes I'm left on the Advanced
 query page and the format has been wiped out. Not what I was hoping for.
 
 Are you allowed to enter straight SQL through the interface like this to
 make dynamic queries? Certainly I can see why this would not be allowed
 since it could lead to sql injection but I'm curious.
 
 Also, is there a way to save such a report so I could just point to a
 URL or something of that nature to fire it off? Basically my manager
 wants a weekly report of all the tickets entered into RT and I'm trying
 to automate the creation of the report I give him.
 
 Thanks!
 
 RT 3.8.8 w/mysql
 

You should be able to use something like 7 days ago or
-7 days in the query.

Cheers,
Ken


Re: [rt-users] Possible to downgrade DB from 3.8 to 3.6?

2010-12-13 Thread Kenneth Marshall
On Mon, Dec 13, 2010 at 11:43:14AM -0600, John Arends wrote:
 CPAN makes me cranky, but trying to package all the perl modules as RPMs 
 makes me crankier. It's like wrapping one packaging system around another 
 one, and fighting with both of them.

 The reality is, every time RHEL updates perl, RT will break. I solve this 
 by having an identical test system. I apply the updates, see what breaks, 
 and then reinstall the perl modules in question using CPAN.

 Once I figure this out, I do the same process on the production RT system 
 during a maintenance window. It actually works out pretty well now that I 
 am used to this, but it is less than ideal.

 RHEL is a major platform, and I'd love it if BestPractical supported it in 
 some official way so we don't have these kinds of problems we have to work 
 around.

 Still, I love RT and praise it to anyone who will listen.

 On 12/13/10 11:04 AM, Khusro Jaleel wrote:
 I'm stuck between a rock and a hard place, then. The Redhat people are
 telling me to *avoid* CPAN like the plague, and most people [1] seem to
 have accomplished the install on CentOS systems using a combination of
 packages + CPAN, which is something else that is NOT recommended to do.

 I wish Best Practical did come up with their own packages, especially
 for Redhat, it would make things so much easier.

 [1] - http://requesttracker.wikia.com/wiki/CentOS5InstallPlusSome


It is probably better to remove perl from the list of packages
that are automatically updated and apply those manually, if they
are needed.

Cheers,
Ken


Re: [rt-users] Content searching takes a long time and runs multiple queries

2010-12-11 Thread Kenneth Marshall
On Sat, Dec 11, 2010 at 09:35:26AM +, Justin Hayes wrote:
 Thanks Ken. I certainly prefer the idea of using inbuilt DB server 
 functionality to improve performance than an external tool hooked in.
 
 I'll probably look into a PostgreSQL migration first and see where that takes 
 me. I hope it's *just* a case of creating the schema by running a 3.8.8 
 install against it, dumping the data and loading it in ;)
 
 Justin
 

The migration should be pretty straightforward. There is a wiki page on it:

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

There are a number of methods that people have used for the migration. I would
probably use the dump/restore method and then create a second version using the
connect to both DBs at once and transfer the data. Then I would compare the
resulting DBs. They should be the same. :)

Ken



Re: [rt-users] RT Sending Email too SLOW

2010-12-10 Thread Kenneth Marshall
Hi Naresh,

One thing that may be worth doing is to run a local caching
DNS server. This can help prevent transient DNS problems with
your ISP from tanking your RT performance. The best one that
I know of and that we use on our RT system is called
pdns-recursor-3.3. You can get it from www.powerdns.com as
a free download. I am glad that you got it all working again.

Cheers,
Ken

On Thu, Dec 09, 2010 at 11:42:49PM +, Naresh Maharaj wrote:
 Dear Ruslan
 
 
 Thank you - have done all of this already.
 
 Just checked the DNS Servers we use and it seems our ISP had not informed us
 of a change to the DNS address.
 
 Made a change to /etc/resolve.conf
 
 added the new DNS server address and hey presto !!!
 
 Super fast
 
 Kind regards
 
 
 Naresh Maharaj,
 
 Hewitt  May (Shirtmakers) Ltd
 email: i...@hewittandmay.com
 web: http://www.hewittandmay.co.uk
 
 
 
 
 
 
 On 9 December 2010 23:39, Ruslan Zakirov r...@bestpractical.com wrote:
 
  Hi,
 
  The following may help you
  http://requesttracker.wikia.com/wiki/SendmailTips
 
  On Fri, Dec 10, 2010 at 12:48 AM, Naresh Maharaj
  nar...@hewittandmay.com wrote:
   Hi
  
   We really need some help resolving the slow email issue.
   I have been researching this for over 2 weeks now before calling our to
   RT_Users.
   I have searched all of the below,
  
   http://wiki.bestpractical.com/
   http://gossamer-threads.com/lists/rt/
   http://www.google.com/
  
   and much wider across the Internet. Almost given up!!
  
   ++Description:
   Overall there are no issues with email leaving RT - email reaches all
   destinations
   There are no issues raising tickets into the queue via email.
   Overall speed of moving around RT Web front end is fast / acceptable
  
   ++Issue:
   replying to a ticket takes up to 30 seconds to complete and sending the
   email in some cases up to 1 min.
   this is simply prohibitive to use in a professional setup.
  
   ++Other Issues:
   Squirrel Mail (Linux Web Mail) has the same issue, up to 30 seconds to
  send
   an email - no solution
   SSH to shell remotely same problem 30s - Now resolved by removing the DNS
   lookup: /etc/ssh/sshd_config  [UseDNS no]
   SFTP - Slow 30 sec - fixed by line above
   Sendmail takes 30 sec to send an email from command line test an issue we
   have had with php apps for over a year - now resolved by :
   Edit the sendmail.cfg
  
   Was:
   # pass to name server to make hostname canonical
   R$* $| $*  @ $*  $*  $: $2  @ $[ $3 $]  $4
  
   Now:
   # pass to name server to make hostname canonical
   #R$* $| $*  @ $*  $*  $: $2  @ $[ $3 $]  $4
  
   OR
   sendmail.mc
   Add:
   FEATURE(`nocanonify')dnl
  
   then rebuiuld sendmail using m4
  
   Sendmail now blistering fast.
  
   ++RT mail Configuration:
   Previously I was using sendmailpipe
   $MailCommand = 'sendmailpipe';
   $SendmailArguments = -oi -t;
   $SendmailPath = /usr/sbin/sendmail;
  
   Now that I have confirmed that Sendmail is NOT the issue I am now using:
   $MailCommand = 'sendmailpipe';
   #$SendmailArguments = -oi -t;
   $SendmailArguments = -oi -ODeliveryMode=b -OErrorMode=m;
   $SendmailPath = /usr/sbin/sendmail;
  
   Also have soft link:
   /etc/smrsh/rt-mailgate - /opt/rt3/bin/rt-mailgate
  
   Note sure what else to test.
  
   The common denominator here is Apache Http
   So here is the conf entry for RT:
  
  
   [r...@caitanya conf]# diff httpd.conf httpd.conf.working.20101126
   997,1015d996
Alias /rt /opt/rt3/share/html
PerlModule Apache::DBI
PerlRequire /opt/rt3/bin/webmux.pl
Directory /opt/rt3/share/html
  AllowOverride All
  Options ExecCGI FollowSymLinks
  IfModule mod_access.c
Order allow,deny
  Allow from all
  /IfModule
/Directory
   
Location /rt
  RewriteEngine On
  RedirectMatch permanent (.*)/$ $1/index.html
  AddDefaultCharset UTF-8
  SetHandler perl-script
  PerlHandler RT::Mason
/Location
  
   Appreciate any help that one can give.
   Its the only issue stopping us from moving RT from test environment to
   production.
  
   Naresh Maharaj,
  
   Hewitt  May (Shirtmakers) Ltd
   email: i...@hewittandmay.com
   web: http://www.hewittandmay.co.uk
  
 
 
 
  --
  Best regards, Ruslan.
 
 
 
 
 --


Re: [rt-users] Search Word document attachments?

2010-12-10 Thread Kenneth Marshall
On Fri, Dec 10, 2010 at 10:15:19AM -0500, Jeff Blaine wrote:
 We have the need to be able to search MS Word documents
 as part of RT search.

 Any ideas where to start on that?

 Thanks!


You will need a MS Word - text converter. Then when an
attachment is of type MSWord, run the converter to generate
a text version of the document, then use that to feed a
fulltext index. Then your searches will pull up the
documents automatically.

Cheers,
Ken


Re: [rt-users] New Scrip to cascade TimeWorked Upwards for Parents

2010-12-10 Thread Kenneth Marshall
On Fri, Dec 10, 2010 at 11:22:51AM -0800, Kenneth Crocker wrote:
 To List,
 
 I use the parent/child relationships alot in my projects. I get tired of
 adding timeworked in a child and then add it again to the parent of that
 child and on and on upwards, including forks.
 So, I created scrip (customized one of Ruslan's) that takes the time worked
 (newvalue - oldvalue) value added to a ticket and checks for parents, both
 vertically and horizontally and adds that same value to each of those
 parents. That way I only have to enter my time once on a task and I know
 that my parents tickets will contain the summarized value for the complete
 set of tasks.
 Not everyone keeps their time in summary form for a parent, so they might
 not use this, bit for those of you that do, this might be a little
 time-saver.
 If anyone is interested, let me know and I'll add it to the wiki.
 
 Thanks.
 
 Kenn
 LBNL

Yes, please add it to the wiki.

Regards,
Ken


Re: [rt-users] RT Sending Email too SLOW

2010-12-09 Thread Kenneth Marshall
It sounds like all of your problems are DNS related. Instead
of disabling the lookups everywhere because they are busted,
if you fixed them it would all just work. Barring that, you
will need to disable the DNS lookup that is causing the slow
mail problem. Good luck.

Cheers,
Ken

On Thu, Dec 09, 2010 at 09:48:56PM +, Naresh Maharaj wrote:
 Hi
 
 We really need some help resolving the slow email issue.
 I have been researching this for over 2 weeks now before calling our to
 RT_Users.
 I have searched all of the below,
 
 http://wiki.bestpractical.com/
 http://gossamer-threads.com/lists/rt/
 http://www.google.com/
 
 and much wider across the Internet. Almost given up!!
 
 ++Description:
 Overall there are no issues with email leaving RT - email reaches all
 destinations
 There are no issues raising tickets into the queue via email.
 Overall speed of moving around RT Web front end is fast / acceptable
 
 ++Issue:
 replying to a ticket takes up to 30 seconds to complete and sending the
 email in some cases up to 1 min.
 this is simply prohibitive to use in a professional setup.
 
 ++Other Issues:
 Squirrel Mail (Linux Web Mail) has the same issue, up to 30 seconds to send
 an email - no solution
 SSH to shell remotely same problem 30s - Now resolved by removing the DNS
 lookup: /etc/ssh/sshd_config  [UseDNS no]
 SFTP - Slow 30 sec - fixed by line above
 Sendmail takes 30 sec to send an email from command line test an issue we
 have had with php apps for over a year - now resolved by :
 Edit the sendmail.cfg
 
 Was:
 # pass to name server to make hostname canonical
 R$* $| $*  @ $*  $*  $: $2  @ $[ $3 $]  $4
 
 Now:
 # pass to name server to make hostname canonical
 #R$* $| $*  @ $*  $*  $: $2  @ $[ $3 $]  $4
 
 OR
 sendmail.mc
 Add:
 FEATURE(`nocanonify')dnl
 
 then rebuiuld sendmail using m4
 
 Sendmail now blistering fast.
 
 ++RT mail Configuration:
 Previously I was using sendmailpipe
 $MailCommand = 'sendmailpipe';
 $SendmailArguments = -oi -t;
 $SendmailPath = /usr/sbin/sendmail;
 
 Now that I have confirmed that Sendmail is NOT the issue I am now using:
 $MailCommand = 'sendmailpipe';
 #$SendmailArguments = -oi -t;
 $SendmailArguments = -oi -ODeliveryMode=b -OErrorMode=m;
 $SendmailPath = /usr/sbin/sendmail;
 
 Also have soft link:
 /etc/smrsh/rt-mailgate - /opt/rt3/bin/rt-mailgate
 
 Note sure what else to test.
 
 The common denominator here is Apache Http
 So here is the conf entry for RT:
 
 
 [r...@caitanya conf]# diff httpd.conf httpd.conf.working.20101126
 997,1015d996
  Alias /rt /opt/rt3/share/html
  PerlModule Apache::DBI
  PerlRequire /opt/rt3/bin/webmux.pl
  Directory /opt/rt3/share/html
AllowOverride All
Options ExecCGI FollowSymLinks
IfModule mod_access.c
  Order allow,deny
Allow from all
/IfModule
  /Directory
 
  Location /rt
RewriteEngine On
RedirectMatch permanent (.*)/$ $1/index.html
AddDefaultCharset UTF-8
SetHandler perl-script
PerlHandler RT::Mason
  /Location
 
 Appreciate any help that one can give.
 Its the only issue stopping us from moving RT from test environment to
 production.
 
 
 Naresh Maharaj,
 
 Hewitt  May (Shirtmakers) Ltd
 email: i...@hewittandmay.com
 web: http://www.hewittandmay.co.uk


Re: [rt-users] Content searching takes a long time and runs multiple queries

2010-12-08 Thread Kenneth Marshall
Given that you are familiar with PostgreSQL already, I would use
it because the current versions of RT support the fulltext indexing
already and you have fewer moving pieces. If you are already running
the 4.9.x series, then you could certainly test the sphinx integration.

Cheers,
Ken

On Wed, Dec 08, 2010 at 09:55:06AM +, Justin Hayes wrote:
 Hmm we were looking at sphinx. Would you suggest plugging that in rather than 
 migrating to postgres (which we're also familiar with)?
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Dec 2010, at 19:40, Kenneth Marshall wrote:
 
  Hi Justin,
  
  In the wiki, there are fulltext index modifications for Oracle and
  PostgreSQL. I based the PostgreSQL version on the Oracle version
  and we use it here. It works very well indeed. It looks like the
  pre version rt-4, a.k.a rt-3.9.6 support Oracle and PostgreSQL
  using their fulltext support and MySQL using sphinx, pretty cool.
  
  Regards,
  Ken
  
  On Tue, Dec 07, 2010 at 05:49:12PM +, Justin Hayes wrote:
  Hi Ken,
  
  I was just thinking the same about the counts - it has to do that for 
  pagination. Though I guess it could have been written to run 1 query for 
  all the data, and just display the first 50 etc.
  
  Which DB backend would work faster?
  
  Thanks,
  
  Justin
  
  -
  Justin Hayes
  OpenBet Support Manager
  justin.ha...@openbet.com
  
  On 7 Dec 2010, at 17:40, Kenneth Marshall wrote:
  
  You need to use a DB backend that supports fulltext indexing for
  content searchs to be fast. The actual query that you stated runs
  quickly, is only for the first 50 tickets. I do agree that running
  the same count() query twice for the same search is sub-optimal. I
  do not see how you could avoid the count query totally if you are
  paginating the results.
  
  Cheers,
  Ken
  
  On Tue, Dec 07, 2010 at 05:31:17PM +, Justin Hayes wrote:
  Guys,
  
  Searching for ticket content takes forever. I've done a bit of digging 
  and for a single search in one of my queues over the last year, RT 
  spawned 3 separate queries.
  
  2 are counts (which appear to be identical), and 1 gets the actual 
  content.
  
  Is there anyway round this? Losing loads of time just to get counts 
  seems rather counter-productive? The final select was actually pretty 
  quick.
  
  I've added the queries below.
  
  Many thanks,
  
  Justin
  
  # Time: 101207 17:24:09
  # u...@host: rt_support[rt_support] @ localhost []
  # Query_time: 57.722237  Lock_time: 0.000183 Rows_sent: 1  
  Rows_examined: 122794
  SET timestamp=1291742649;
  SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN Transactions 
  Transactions_1  ON ( Transactions_1.ObjectId = main.id ) JOIN 
  Attachments Attachments_2  ON ( Attachments_2.TransactionId = 
  Transactions_1.id )  WHERE (Transactions_1.ObjectType = 'RT::Ticket') 
  AND (main.Status != 'deleted') AND (main.Created  '2010-01-01 00:00:00' 
  AND main.Queue = '4' AND Attachments_2.Content LIKE '%testing%') AND 
  (main.Type = 'ticket') AND (main.EffectiveId = main.id);
  
  # Time: 101207 17:24:38
  # u...@host: rt_support[rt_support] @ localhost []
  # Query_time: 28.780620  Lock_time: 0.000510 Rows_sent: 1  
  Rows_examined: 122794
  SET timestamp=1291742678;
  SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN Transactions 
  Transactions_1  ON ( Transactions_1.ObjectId = main.id ) JOIN 
  Attachments Attachments_2  ON ( Attachments_2.TransactionId = 
  Transactions_1.id )  WHERE (Transactions_1.ObjectType = 'RT::Ticket') 
  AND (main.Status != 'deleted') AND (main.Created  '2010-01-01 00:00:00' 
  AND main.Queue = '4' AND Attachments_2.Content LIKE '%testing%') AND 
  (main.Type = 'ticket') AND (main.EffectiveId = main.id);
  
  # Time: 101207 17:24:42
  # u...@host: rt_support[rt_support] @ localhost []
  # Query_time: 4.492875  Lock_time: 0.000175 Rows_sent: 50  
  Rows_examined: 100799
  SET timestamp=1291742682;
  SELECT DISTINCT main.* FROM Tickets main JOIN Transactions 
  Transactions_1  ON ( Transactions_1.ObjectId = main.id ) JOIN 
  Attachments Attachments_2  ON ( Attachments_2.TransactionId = 
  Transactions_1.id )  WHERE (Transactions_1.ObjectType = 'RT::Ticket') 
  AND (main.Status != 'deleted') AND (main.Created  '2010-01-01 00:00:00' 
  AND main.Queue = '4' AND Attachments_2.Content LIKE '%testing%') AND 
  (main.Type = 'ticket') AND (main.EffectiveId = main.id)  ORDER BY 
  main.id ASC  LIMIT 50;
  
  -
  Justin Hayes
  OpenBet Support Manager
  justin.ha...@openbet.com
  
  
  
  
 
 


Re: [rt-users] callback for Search/Simple.html not working on freebsd

2010-12-08 Thread Kenneth Marshall
On Wed, Dec 08, 2010 at 10:44:51AM +0300, alexander lunev wrote:
 07.12.2010 17:51, Kenneth Marshall ??:
 Not to discourage you, but it is really better to not default to
 search resolved tickets. That number will grow without bound and
 eventually kill your performance. Also, how will you NOT search
 the resolved tickets? My two cents.

 I _need_ to search resolved tickets, and in simple search they're not 
 searching. Besides, this is my first try to make callbacks work, and i'm 
 planning to further customize RT for my needs, and i want to understand why 
 it is not working at all?


All that you should need to do is include the word resolved in the
Simple Search window to search resolved tickets. For example:

turkey open resolved

would search all open or resolved tickets with the word turkey in
the subject.

Ken


Re: [rt-users] callback for Search/Simple.html not working on freebsd

2010-12-08 Thread Kenneth Marshall
On Wed, Dec 08, 2010 at 05:05:02PM +0300, alexander lunev wrote:
 08.12.2010 16:58, Kenneth Marshall ??:
 I _need_ to search resolved tickets, and in simple search they're not
 searching. Besides, this is my first try to make callbacks work, and i'm
 planning to further customize RT for my needs, and i want to understand 
 why
 it is not working at all?


 All that you should need to do is include the word resolved in the
 Simple Search window to search resolved tickets. For example:

 turkey open resolved

 would search all open or resolved tickets with the word turkey in
 the subject.

 Thank you for this valuable advice, although i already know how to search 
 all tickets by including words like resolved or deleted.

 The question is WHY CALLBACK DOESN'T WORK?


You probably did this already, but did you clear the Mason cache?

Ken


Re: [rt-users] callback for Search/Simple.html not working on freebsd

2010-12-07 Thread Kenneth Marshall
Not to discourage you, but it is really better to not default to
search resolved tickets. That number will grow without bound and
eventually kill your performance. Also, how will you NOT search
the resolved tickets? My two cents.

Cheers,
Ken

On Tue, Dec 07, 2010 at 05:47:06PM +0300, alexander lunev wrote:
 Hello.

 It's FreeBSD 6.2-R, apache-2.2.14, rt-3.8.8

 I'm trying to make simple search broader so it will search all tickets 
 including resolved, and did as it says in
 http://requesttracker.wikia.com/wiki/CustomizingWithCallbacks

 apache configuration:

 VirtualHost *:80
 ServerName support.domain.ru

 DocumentRoot /usr/local/share/rt38/html
 AddDefaultCharset UTF-8

 PerlRequire /usr/local/bin/webmux.pl

 Directory /usr/local/share/rt38/html
 Options Indexes FollowSymlinks
 /Directory
 Location /NoAuth/images
 SetHandler default
 /Location
 Location /
 SetHandler perl-script
 PerlResponseHandler RT::Mason
 /Location
 /VirtualHost

 FreeBSD port installs RT files under /usr/local/share:

 # ls /usr/local/share/rt38
 etc fonts   htmllib local   plugins po

 I created file with callback:

 /usr/local/share/rt38/local/html/Callbacks/MyCallbacks/Search/Simple.html/ModifyQuery:

 %init
  $$query = $$query .  new open resolved stalled rejected deleted;
  /%init

  %args
  $query = undef
  /%args


 But the magic did not work, search finds only new and open tickets. I've 
 tried to put $RT::Logger call in ModifyQuery (though i don't know should it 
 work in callback files or not) to test does it even go into this file, and 
 nothing appears in logs.

 I also tried to put whole path with callback file 
 local/html/Callbacks/MyCallbacks/Search/Simple.html/ModifyQuery to 
 /var/run/rt38 (where mason_data and session_data resides) with no outcome.

 How can i debug this callback to find where the problem is? I've set RT to 
 send debug logs to file, and i see nothing suspicious there.

 Help please.

 -- 
 best regards
 alexander lunev



Re: [rt-users] Content searching takes a long time and runs multiple queries

2010-12-07 Thread Kenneth Marshall
You need to use a DB backend that supports fulltext indexing for
content searchs to be fast. The actual query that you stated runs
quickly, is only for the first 50 tickets. I do agree that running
the same count() query twice for the same search is sub-optimal. I
do not see how you could avoid the count query totally if you are
paginating the results.

Cheers,
Ken

On Tue, Dec 07, 2010 at 05:31:17PM +, Justin Hayes wrote:
 Guys,
 
 Searching for ticket content takes forever. I've done a bit of digging and 
 for a single search in one of my queues over the last year, RT spawned 3 
 separate queries.
 
 2 are counts (which appear to be identical), and 1 gets the actual content.
 
 Is there anyway round this? Losing loads of time just to get counts seems 
 rather counter-productive? The final select was actually pretty quick.
 
 I've added the queries below.
 
 Many thanks,
 
 Justin
 
 # Time: 101207 17:24:09
 # u...@host: rt_support[rt_support] @ localhost []
 # Query_time: 57.722237  Lock_time: 0.000183 Rows_sent: 1  Rows_examined: 
 122794
 SET timestamp=1291742649;
 SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN Transactions 
 Transactions_1  ON ( Transactions_1.ObjectId = main.id ) JOIN Attachments 
 Attachments_2  ON ( Attachments_2.TransactionId = Transactions_1.id )  WHERE 
 (Transactions_1.ObjectType = 'RT::Ticket') AND (main.Status != 'deleted') AND 
 (main.Created  '2010-01-01 00:00:00' AND main.Queue = '4' AND 
 Attachments_2.Content LIKE '%testing%') AND (main.Type = 'ticket') AND 
 (main.EffectiveId = main.id);
 
 # Time: 101207 17:24:38
 # u...@host: rt_support[rt_support] @ localhost []
 # Query_time: 28.780620  Lock_time: 0.000510 Rows_sent: 1  Rows_examined: 
 122794
 SET timestamp=1291742678;
 SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN Transactions 
 Transactions_1  ON ( Transactions_1.ObjectId = main.id ) JOIN Attachments 
 Attachments_2  ON ( Attachments_2.TransactionId = Transactions_1.id )  WHERE 
 (Transactions_1.ObjectType = 'RT::Ticket') AND (main.Status != 'deleted') AND 
 (main.Created  '2010-01-01 00:00:00' AND main.Queue = '4' AND 
 Attachments_2.Content LIKE '%testing%') AND (main.Type = 'ticket') AND 
 (main.EffectiveId = main.id);
 
 # Time: 101207 17:24:42
 # u...@host: rt_support[rt_support] @ localhost []
 # Query_time: 4.492875  Lock_time: 0.000175 Rows_sent: 50  Rows_examined: 
 100799
 SET timestamp=1291742682;
 SELECT DISTINCT main.* FROM Tickets main JOIN Transactions Transactions_1  ON 
 ( Transactions_1.ObjectId = main.id ) JOIN Attachments Attachments_2  ON ( 
 Attachments_2.TransactionId = Transactions_1.id )  WHERE 
 (Transactions_1.ObjectType = 'RT::Ticket') AND (main.Status != 'deleted') AND 
 (main.Created  '2010-01-01 00:00:00' AND main.Queue = '4' AND 
 Attachments_2.Content LIKE '%testing%') AND (main.Type = 'ticket') AND 
 (main.EffectiveId = main.id)  ORDER BY main.id ASC  LIMIT 50;
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 


Re: [rt-users] Content searching takes a long time and runs multiple queries

2010-12-07 Thread Kenneth Marshall
Hi Justin,

In the wiki, there are fulltext index modifications for Oracle and
PostgreSQL. I based the PostgreSQL version on the Oracle version
and we use it here. It works very well indeed. It looks like the
pre version rt-4, a.k.a rt-3.9.6 support Oracle and PostgreSQL
using their fulltext support and MySQL using sphinx, pretty cool.

Regards,
Ken

On Tue, Dec 07, 2010 at 05:49:12PM +, Justin Hayes wrote:
 Hi Ken,
 
 I was just thinking the same about the counts - it has to do that for 
 pagination. Though I guess it could have been written to run 1 query for all 
 the data, and just display the first 50 etc.
 
 Which DB backend would work faster?
 
 Thanks,
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Dec 2010, at 17:40, Kenneth Marshall wrote:
 
  You need to use a DB backend that supports fulltext indexing for
  content searchs to be fast. The actual query that you stated runs
  quickly, is only for the first 50 tickets. I do agree that running
  the same count() query twice for the same search is sub-optimal. I
  do not see how you could avoid the count query totally if you are
  paginating the results.
  
  Cheers,
  Ken
  
  On Tue, Dec 07, 2010 at 05:31:17PM +, Justin Hayes wrote:
  Guys,
  
  Searching for ticket content takes forever. I've done a bit of digging and 
  for a single search in one of my queues over the last year, RT spawned 3 
  separate queries.
  
  2 are counts (which appear to be identical), and 1 gets the actual content.
  
  Is there anyway round this? Losing loads of time just to get counts seems 
  rather counter-productive? The final select was actually pretty quick.
  
  I've added the queries below.
  
  Many thanks,
  
  Justin
  
  # Time: 101207 17:24:09
  # u...@host: rt_support[rt_support] @ localhost []
  # Query_time: 57.722237  Lock_time: 0.000183 Rows_sent: 1  Rows_examined: 
  122794
  SET timestamp=1291742649;
  SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN Transactions 
  Transactions_1  ON ( Transactions_1.ObjectId = main.id ) JOIN Attachments 
  Attachments_2  ON ( Attachments_2.TransactionId = Transactions_1.id )  
  WHERE (Transactions_1.ObjectType = 'RT::Ticket') AND (main.Status != 
  'deleted') AND (main.Created  '2010-01-01 00:00:00' AND main.Queue = '4' 
  AND Attachments_2.Content LIKE '%testing%') AND (main.Type = 'ticket') AND 
  (main.EffectiveId = main.id);
  
  # Time: 101207 17:24:38
  # u...@host: rt_support[rt_support] @ localhost []
  # Query_time: 28.780620  Lock_time: 0.000510 Rows_sent: 1  Rows_examined: 
  122794
  SET timestamp=1291742678;
  SELECT COUNT(DISTINCT main.id) FROM Tickets main JOIN Transactions 
  Transactions_1  ON ( Transactions_1.ObjectId = main.id ) JOIN Attachments 
  Attachments_2  ON ( Attachments_2.TransactionId = Transactions_1.id )  
  WHERE (Transactions_1.ObjectType = 'RT::Ticket') AND (main.Status != 
  'deleted') AND (main.Created  '2010-01-01 00:00:00' AND main.Queue = '4' 
  AND Attachments_2.Content LIKE '%testing%') AND (main.Type = 'ticket') AND 
  (main.EffectiveId = main.id);
  
  # Time: 101207 17:24:42
  # u...@host: rt_support[rt_support] @ localhost []
  # Query_time: 4.492875  Lock_time: 0.000175 Rows_sent: 50  Rows_examined: 
  100799
  SET timestamp=1291742682;
  SELECT DISTINCT main.* FROM Tickets main JOIN Transactions Transactions_1  
  ON ( Transactions_1.ObjectId = main.id ) JOIN Attachments Attachments_2  
  ON ( Attachments_2.TransactionId = Transactions_1.id )  WHERE 
  (Transactions_1.ObjectType = 'RT::Ticket') AND (main.Status != 'deleted') 
  AND (main.Created  '2010-01-01 00:00:00' AND main.Queue = '4' AND 
  Attachments_2.Content LIKE '%testing%') AND (main.Type = 'ticket') AND 
  (main.EffectiveId = main.id)  ORDER BY main.id ASC  LIMIT 50;
  
  -
  Justin Hayes
  OpenBet Support Manager
  justin.ha...@openbet.com
  
  
 
 


Re: [rt-users] RT and mySQL cluster?

2010-11-19 Thread Kenneth Marshall
On Fri, Nov 19, 2010 at 10:03:53AM -0700, Thierry Thelliez wrote:
 Hello all,
 
 Has anyone some experience running RT  on top of MySQL Cluster?
 Feasible? Overkill? Any issues?
 
 We think that with our application we will see peaks/burts of tickets
 submissions. We want to be able to absorb these peaks safely.
 
 Cheers,
 Thierry
 

Are you sure the bottle-neck is the database backend. It seems
to me that most of the processing is in the webserver front-ends.
If that is the case, point a second front-end to the same backend
database and you will be able to handle more tickets. It is worth
testing, but is your database I/O even close to 100%?

Cheers,
Ken


Re: [rt-users] Branded Queues and Privacy

2010-11-09 Thread Kenneth Marshall
Yes, you can assign the appropriate permissions to the queues.
We had to remove so overly permissive global permission settings
to get this to work correctly. You can use the RightsMatix module
to help you track down problems. RT is pretty granular in its ACL
design. We currently have several compartmentalized systems with
their own SPAM systems and dedicated Email address working very
smoothly.

Cheers,
Ken

On Tue, Nov 09, 2010 at 03:58:54PM -0600, Peter Barton wrote:
 I have recently set up a branded queue for my company's Payroll
 department.  We are still using the RT system for IT Helpdesk purposes
 as well.  Is there a way to completely block access to the Payroll queue
 from everyone who is not a member of the Payroll Group?
 
 Thanks
 
 -
 Peter Barton
 


Re: [rt-users] Why I am recommending 3.6 over 3.8 to my boss

2010-11-05 Thread Kenneth Marshall
On Fri, Nov 05, 2010 at 09:04:07AM -0400, Vick Khera wrote:
 On Nov 5, 2010, at 8:59 AM, Josh Narins wrote:
 
  They are never clobbered with:
  
  ./configure --prefix=/opt/local
 
 so now you need your own private copy of perl in /opt/local as well else 
 the package system may clobber your perl modules installed by hand too.  It 
 becomes a very tangled web when you have some stuff manually installed and 
 some by packages, were the manual stuff is intermixed with the packages, like 
 CPAN installation of modules.

No, you can use the system perl and put the modules that you/RT needs
in the /opt/local area. We do that for many different packages already
to isolate them from auto-updates of vendor packages.

Cheers,
Ken


Re: [rt-users] Unread messages

2010-10-19 Thread Kenneth Marshall
Can you do a search with tickets that are last updated by someone
who isn't you?

Ken

On Tue, Oct 19, 2010 at 03:14:41PM -0500, Kristofer Pettijohn wrote:
 Kenneth, 
 
 I'm sorry, I may have not been clear on my request. I do want it to show the 
 unread message notification. My issue with RT is that it doesn't have a 
 dashboard showing only Tickets that have unread messages so I can quickly go 
 to them. I find myself going into individual tickets to look for that Unread 
 message notification, which seems wasteful of time. 
 
 
 From: Kenneth Crocker kfcroc...@lbl.gov 
 To: rt-users@lists.bestpractical.com 
 Sent: Tuesday, October 19, 2010 2:14:04 PM 
 Subject: Re: [rt-users] Unread messages 
 
 Kristopher, 
 
 You can set that to whatever you want as a Global default, but you can 
 reverse that on an individual basis in Preferences. 
 
 Kenn 
 LBNL 
 
 
 On Tue, Oct 19, 2010 at 12:12 PM, Kenneth Crocker  kfcroc...@lbl.gov  
 wrote: 
 
 
 Kristofer, 
 
 Change your RT_SiteConfig.pm file in /opt/rt3/etc to include this setting: 
 
 
 
 Set($ShowUnreadMessageNotifications, 0); # turn off notice 
 
 
 
 
 You'll need to bounce/restart Apache or your VM environment. 
 
 
 
 
 Kenn 
 
 LBNL 
 
 
 
 
 
 
 On Tue, Oct 19, 2010 at 11:26 AM, Kristofer Pettijohn  
 kristo...@cybernetik.net  wrote: 
 
 
 
 
 Hello, 
 
 I am fairly new to RT, and am trying to get used to using it in my 
 environment. 
 
 Is there an easy way for me to view which of my tickets have emails that are 
 unread? I find myself going into the main dashboard, and then checking 
 tickets multiple times a day to see if they have the header at the top saying 
 that there are unread messages. There must be an easier way to see this from 
 the dashboard? 
 
 Thanks, 
 Kris 
 
 


Re: [rt-users] memory leak after search

2010-10-12 Thread Kenneth Marshall
On Tue, Oct 12, 2010 at 01:58:14PM +0100, Raed El-Hames wrote:
 Hi:
 
 RT-3.8.7
 Apache2
 Mysql
 perl5 (revision 5 version 8 subversion 8)
 
 mod_perl2 v2.04;
 
 DBIx::SearchBuilder v1.56;
 
 DBD::mysql v4.005;
 
 DBI v1.605;
 
 
 
 When a user run a search that returns  5 tickets , the search runs fine 
 and results back fairly quickly ( 10 seconds).
 
 However if a user subsequently opens a ticket -even a small ticket- , it 
 takes a long time to open and an apache process start growing and grows 
 further with every click during that session, until the user delete the 
 cookie and the apache process have to be killed  ...
 
 
 
 I have googled for this issue and could n't find any threads relates to this, 
 I have removed all customisations , so I know its any local work done here,
 
 Have any one else come across this? And is there a fix??
 
 Regards;
 Roy

Hi Roy,

There was a thread in the mailing list about this issue. Basically
RT pulls a set of information for every ticket that the search returns
when opening one of the searched for tickets. I think this was fixed
in 3.8.8. The only work-around that I recall is don't do that. :)
I think the thread was about memory use in RT if you want to look
at it.

Regards,
Ken

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Slow PostgreSQL perf with 3.8.7

2010-09-22 Thread Kenneth Marshall
Hi Jeff,

Wow, is that version of PostgreSQL old. Certainly there have
been many, many performance improvements since v8.1.x. While
upgrading would help, you really need to run an EXPLAIN ANALYZE
for your slow queries to see if there is a problem area. Also,
you should check to wiki to see if you have all of the recommended
PostgreSQL indexes.

Some things to check.
Ken

On Wed, Sep 22, 2010 at 12:12:59PM -0400, Jeff Blaine wrote:
 Please bear with my ignorance on this topic.  I realize
 this isn't a PostgreSQL tuning forum, but since it's RT-related
 I thought I'd ask here.

 RT 3.8.7 (and RTFM) with PostgreSQL 8.1.18 via RHELv5 running
 as a VM.

 We're experiencing significant delays today with various
 PostgreSQL statements taking longer than 1000ms to complete.

 We have 10,000 tickets, 1300 of which are 'open'

 Can anyone throw out any ideas, things to check, etc?
 Is this just

 Viewing a single ticket results in the following, showing
 only those longer than 1000ms:

 LOG:  duration: 1496.023 ms
 LOG:  duration: 1496.023 ms  statement: EXECUTE unnamed  [PREPARE: SELECT 
 DISTINCT main.Id AS id, main.Filename AS filename, main.Headers AS headers, 
 main.Subject AS subject, main.Parent AS parent, main.ContentEncoding AS 
 contentencoding, main.ContentType AS contenttype, main.TransactionId AS 
 transactionid, main.Created AS created FROM Attachments main JOIN 
 Transactions Transactions_1  ON ( Transactions_1.id = main.TransactionId ) 
 JOIN Tickets Tickets_2  ON ( Tickets_2.id = Transactions_1.ObjectId )  
 WHERE (Tickets_2.EffectiveId = '35803') AND (Transactions_1.ObjectType = 
 'RT::Ticket')  ORDER BY main.id ASC ]
 LOG:  duration: 2207.968 ms
 LOG:  duration: 2207.968 ms  statement: EXECUTE unnamed  [PREPARE: SELECT 
 DISTINCT main.* FROM Users main CROSS JOIN ACL ACL_4 JOIN Principals 
 Principals_1  ON ( Principals_1.id = main.id ) JOIN CachedGroupMembers 
 CachedGroupMembers_2  ON ( CachedGroupMembers_2.MemberId = Principals_1.id 
 ) JOIN Groups Groups_3 ON ( Groups_3.id = CachedGroupMembers_2.GroupId )  
 WHERE (Principals_1.Disabled = '0') AND (ACL_4.PrincipalType = 
 Groups_3.Type) AND (Principals_1.id != '1') AND (Principals_1.PrincipalType 
 = 'User') AND (ACL_4.RightName = 'OwnTicket' OR ACL_4.RightName = 
 'SuperUser') AND (Groups_3.Domain = 'RT::Queue-Role' AND Groups_3.Instance 
 = '1') AND ((ACL_4.ObjectType = 'RT::Queue' AND ACL_4.ObjectId = 1) OR 
 (ACL_4.ObjectType = 'RT::System'))  ORDER BY main.Name ASC ]
 LOG:  duration: 3363.967 ms
 LOG:  duration: 3363.967 ms  statement: EXECUTE unnamed  [PREPARE: SELECT 
 DISTINCT main.* FROM Users main CROSS JOIN ACL ACL_2 JOIN Principals 
 Principals_1  ON ( Principals_1.id = main.id ) JOIN CachedGroupMembers 
 CachedGroupMembers_3  ON ( CachedGroupMembers_3.MemberId = Principals_1.id 
 )  WHERE (Principals_1.Disabled = '0') AND (ACL_2.PrincipalId = 
 CachedGroupMembers_3.GroupId) AND (Principals_1.id != '1') AND 
 (ACL_2.PrincipalType = 'Group') AND (Principals_1.PrincipalType = 'User') 
 AND (ACL_2.RightName = 'OwnTicket' OR ACL_2.RightName = 'SuperUser') AND 
 ((ACL_2.ObjectType = 'RT::Queue' AND ACL_2.ObjectId   = 1) OR 
 (ACL_2.ObjectType = 'RT::System'))  ORDER BY main.Name ASC ]
 LOG:  duration: 1482.014 ms
 LOG:  duration: 1482.014 ms  statement: EXECUTE unnamed  [PREPARE: SELECT 
 DISTINCT main.id AS id, main.Content AS content, main.ContentType AS 
 contenttype, main.TransactionId AS transactionid, main.ContentEncoding AS 
 contentencoding FROM Attachments main JOIN Transactions Transactions_1  ON 
 ( Transactions_1.id = main.TransactionId ) JOIN Tickets Tickets_2  ON ( 
 Tickets_2.id = Transactions_1.ObjectId )  WHERE (Tickets_2.EffectiveId = 
 '35803') AND (Transactions_1.ObjectType = 'RT::Ticket') AND 
 (main.ContentType = 'text/plain' OR main.ContentType LIKE 'message/%' OR 
 main.ContentType = 'text')  ORDER BY main.id ASC ]
 LOG:  duration: 1329.789 ms
 LOG:  duration: 1329.789 ms  statement: EXECUTE unnamed  [PREPARE: SELECT 
 DISTINCT main.* FROM Transactions main JOIN Tickets Tickets_1  ON ( 
 Tickets_1.id = main.ObjectId )  WHERE (main.ObjectType = 'RT::Ticket') AND 
 (Tickets_1.EffectiveId = '35803')  ORDER BY main.Created ASC, main.id ASC ]


 # /sbin/sysctl kernel.shmmax kernel.shmall kernel.shmmni kernel.sem
 kernel.shmmax = 4294967296
 kernel.shmall = 2097152
 kernel.shmmni = 4096
 kernel.sem = 25032000   100 128
 # cat /proc/cpuinfo
 processor   : 0
 vendor_id   : GenuineIntel
 cpu family  : 6
 model   : 15
 model name  : Intel(R) Xeon(R) CPU   X5365  @ 3.00GHz
 stepping: 1
 cpu MHz : 2992.499
 cache size  : 4096 KB
 fpu : yes
 fpu_exception   : yes
 cpuid level : 10
 wp  : yes
 flags   : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca 
 cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss syscall nx lm 
 constant_tsc up pni ssse3 cx16 lahf_lm
 bogomips: 5984.99
 clflush size: 64
 

Re: [rt-users] Slow PostgreSQL perf with 3.8.7

2010-09-22 Thread Kenneth Marshall
Hi Jeff,

Just a quick glance at your plan seems to indicate that there is
a fairly wide discrepency between how many results a query returns
and what the planner thinks the query should return. Have you already
bumped the planner statistics target to 100 or 200 and then re-analyzed
the database. I do not think that 8.1 had autovacuum enabled by default
so you should enable it to keep the statistics updated and run a full
database-wide re-analyze to update the stats. Then try your query again.

Regards,
Ken

On Wed, Sep 22, 2010 at 12:57:58PM -0400, Jeff Blaine wrote:
 We have this in place:

 CREATE INDEX ObjectCustomFieldValues3 ON ObjectCustomFieldValues 
 (ObjectId,ObjectType);

 And I don't see any other suggested indexes in the wiki.
 Maybe I am missing a certain page?  Should I add these:

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

 Here's the EXPLAIN for one of the slow statements:

 rt3=# EXPLAIN ANALYZE SELECT DISTINCT main.id AS id, main.Content AS 
 content, main.ContentType AS contenttype, main.TransactionId AS 
 transactionid, main.ContentEncoding AS contentencoding FROM Attachments 
 main JOIN Transactions Transactions_1  ON ( Transactions_1.id = 
 main.TransactionId ) JOIN Tickets Tickets_2  ON ( Tickets_2.id = 
 Transactions_1.ObjectId )  WHERE (Tickets_2.EffectiveId = '35339') AND 
 (Transactions_1.ObjectType = 'RT::Ticket') AND (main.ContentType = 
 'text/plain' OR main.ContentType LIKE 'message/%' OR main.ContentType = 
 'text') ORDER BY main.id ASC;

  QUERY PLAN
 --
  Unique  (cost=1033.85..1033.86 rows=1 width=396) (actual 
 time=3720.579..3720.579 rows=1 loops=1)
-  Sort  (cost=1033.85..1033.85 rows=1 width=396) (actual 
 time=3720.373..3720.373 rows=1 loops=1)
  Sort Key: main.id, main.content, main.contenttype, 
 main.transactionid, main.contentencoding
  -  Nested Loop  (cost=17.77..1033.84 rows=1 width=396) (actual 
 time=3569.107..3719.649 rows=1 loops=1)
-  Nested Loop  (cost=14.13..383.55 rows=1 width=4) (actual 
 time=3562.353..3717.041 rows=28 loops=1)
  -  Bitmap Heap Scan on transactions transactions_1  
 (cost=14.13..154.48 rows=38 width=8) (actual time=159.630..1185.953 
 rows=75440 loops=1)
Recheck Cond: ((objecttype)::text = 
 'RT::Ticket'::text)
-  Bitmap Index Scan on transactions1 
 (cost=0.00..14.13 rows=38 width=0) (actual time=156.409..156.409 
 rows=133079 loops=1)
  Index Cond: ((objecttype)::text = 
 'RT::Ticket'::text)
  -  Index Scan using tickets4 on tickets tickets_2  
 (cost=0.00..6.02 rows=1 width=4) (actual time=0.026..0.026 rows=0 
 loops=75440)
Index Cond: (tickets_2.id = outer.objectid)
Filter: (effectiveid = 35339)
-  Bitmap Heap Scan on attachments main (cost=3.63..648.02 
 rows=181 width=396) (actual time=0.078..0.082 rows=0 loops=28)
  Recheck Cond: (outer.id = main.transactionid)
  Filter: (((contenttype)::text = 'text/plain'::text) OR 
 ((contenttype)::text ~~ 'message/%'::text) OR ((contenttype)::text = 
 'text'::text))
  -  Bitmap Index Scan on attachments2 (cost=0.00..3.63 
 rows=181 width=0) (actual time=0.011..0.011 rows=1 loops=28)
Index Cond: (outer.id = main.transactionid)
  Total runtime: 3722.252 ms
 (18 rows)

 rt3=#


 On 9/22/2010 12:24 PM, Kenneth Marshall wrote:
 Hi Jeff,

 Wow, is that version of PostgreSQL old. Certainly there have
 been many, many performance improvements since v8.1.x. While
 upgrading would help, you really need to run an EXPLAIN ANALYZE
 for your slow queries to see if there is a problem area. Also,
 you should check to wiki to see if you have all of the recommended
 PostgreSQL indexes.

 Some things to check.
 Ken

 On Wed, Sep 22, 2010 at 12:12:59PM -0400, Jeff Blaine wrote:
 Please bear with my ignorance on this topic.  I realize
 this isn't a PostgreSQL tuning forum, but since it's RT-related
 I thought I'd ask here.

 RT 3.8.7 (and RTFM) with PostgreSQL 8.1.18 via RHELv5 running
 as a VM.

 We're experiencing significant delays today with various
 PostgreSQL statements taking longer than 1000ms to complete.

 We have 10,000 tickets, 1300 of which are 'open'

 Can anyone throw out any ideas, things to check, etc?
 Is this just

 Viewing a single ticket results in the following, showing
 only those longer than 1000ms:

 LOG:  duration: 1496.023 ms
 LOG:  duration: 1496.023 ms  statement: EXECUTEunnamed   [PREPARE: 
 SELECT
 DISTINCT main.Id AS id, main.Filename AS filename, main.Headers AS 
 headers,
 main.Subject AS subject, main.Parent AS parent, main.ContentEncoding AS
 contentencoding, main.ContentType

Re: [rt-users] Slow PostgreSQL perf with 3.8.7

2010-09-22 Thread Kenneth Marshall
Did you performance problem go away? You may want to run a
REINDEX on your tables to clear out any bloat which will
degrade lookup performance, though.

Ken

On Wed, Sep 22, 2010 at 04:29:40PM -0400, Jeff Blaine wrote:
 On 9/22/2010 4:16 PM, Kenneth Marshall wrote:
 It should be called default_statistics_target according to
 the PostgreSQL 8.1 documentation. I would set it to 100 like
 the current 8.4 default and re-analyze the database:

 vacuumdb -a -z

 You could add a '-v' for more information while it is running.
 You may not have heeded the VACUUM documentation, but you should
 almost never use VACUUM FULL but just a simple VACUUM. The
 FULL variant can cause serious index bloating which can only
 be fixed by running REINDEX. Good luck.

 Hm, I don't see such a warning here:

 http://www.postgresql.org/docs/8.1/static/sql-vacuum.html

 Maybe it's officially-undocumented knowledge of yours from
 experience?

 The Notes do say the following, but from what I can tell the
 only hangup on FULL is that it takes longer and exclusively
 locks.

 The FULL option is not recommended for routine use, but
 may be useful in special cases. An example is when you
 have deleted most of the rows in a table and would like
 the table to physically shrink to occupy less disk space.
 VACUUM FULL will usually shrink the table more than a
 plain VACUUM would.

 We *did* in fact RT-Shredder-ify 50% of the tickets 4
 weeks ago (bogus tickets from the user's misconfigured code).

 At any rate, VACUUM FULL ANALYZE solved the problem, which
 should be addressed going forward by auto-vacuum.

 Thanks again

 Cheers,
 Ken

 On Wed, Sep 22, 2010 at 04:08:08PM -0400, Jeff Blaine wrote:
 Ken,

 Thanks for the replies.

 I don't see any planner settings in postgresql.conf (so
 no I've not changed that).

 I've turned on autovacuum as well as log_planner_stats (on
 a whim that it might provide useful info based on your lead).

 Hmm... given how long 'VACUUM FULL;' is taking now,
 maybe I was connected to the default database when I
 ran it before starting this thread instead of 'rt3'

 *fingers crossed*

 On 9/22/2010 3:25 PM, Kenneth Marshall wrote:
 Hi Jeff,

 Just a quick glance at your plan seems to indicate that there is
 a fairly wide discrepency between how many results a query returns
 and what the planner thinks the query should return. Have you already
 bumped the planner statistics target to 100 or 200 and then re-analyzed
 the database. I do not think that 8.1 had autovacuum enabled by default
 so you should enable it to keep the statistics updated and run a full
 database-wide re-analyze to update the stats. Then try your query again.

 Regards,
 Ken

 On Wed, Sep 22, 2010 at 12:57:58PM -0400, Jeff Blaine wrote:
 We have this in place:

   CREATE INDEX ObjectCustomFieldValues3 ON ObjectCustomFieldValues
 (ObjectId,ObjectType);

 And I don't see any other suggested indexes in the wiki.
 Maybe I am missing a certain page?  Should I add these:

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

 Here's the EXPLAIN for one of the slow statements:

 rt3=# EXPLAIN ANALYZE SELECT DISTINCT main.id AS id, main.Content AS
 content, main.ContentType AS contenttype, main.TransactionId AS
 transactionid, main.ContentEncoding AS contentencoding FROM Attachments
 main JOIN Transactions Transactions_1  ON ( Transactions_1.id =
 main.TransactionId ) JOIN Tickets Tickets_2  ON ( Tickets_2.id =
 Transactions_1.ObjectId )  WHERE (Tickets_2.EffectiveId = '35339') AND
 (Transactions_1.ObjectType = 'RT::Ticket') AND (main.ContentType =
 'text/plain' OR main.ContentType LIKE 'message/%' OR main.ContentType =
 'text') ORDER BY main.id ASC;

QUERY PLAN
 --
Unique  (cost=1033.85..1033.86 rows=1 width=396) (actual
 time=3720.579..3720.579 rows=1 loops=1)
  -Sort  (cost=1033.85..1033.85 rows=1 width=396) (actual
 time=3720.373..3720.373 rows=1 loops=1)
Sort Key: main.id, main.content, main.contenttype,
 main.transactionid, main.contentencoding
-Nested Loop  (cost=17.77..1033.84 rows=1 width=396)
 (actual
 time=3569.107..3719.649 rows=1 loops=1)
  -Nested Loop  (cost=14.13..383.55 rows=1 width=4)
 (actual
 time=3562.353..3717.041 rows=28 loops=1)
-Bitmap Heap Scan on transactions
 transactions_1
 (cost=14.13..154.48 rows=38 width=8) (actual time=159.630..1185.953
 rows=75440 loops=1)
  Recheck Cond: ((objecttype)::text =
 'RT::Ticket'::text)
  -Bitmap Index Scan on transactions1
 (cost=0.00..14.13 rows=38 width=0) (actual time=156.409..156.409
 rows=133079 loops=1)
Index Cond: ((objecttype)::text =
 'RT::Ticket'::text)
-Index Scan using

Re: [rt-users] Question about On Queue Change Scrip Condition

2010-09-20 Thread Kenneth Marshall
You need to have a global scrip that check for a queue change
and if the previous queue was the queue that you want to track
or react to exits.

Cheers,
Ken

On Mon, Sep 20, 2010 at 01:19:32PM -0400, David Moreau Simard wrote:
  Hi,

 We're running RT 3.8.8 and we need to fire a scrip when a ticket is 
 transferred away from a queue (to any possible destination).

 The condition built into RT On queue change only seems to fire when a 
 ticket is transferred in but not when a ticket is transferred out.

 I've tried various possible workarounds in custom conditions and even 
 changing the stage of the transaction but to no avail.

 Does anyone have a clue as to what kind of condition I could use to trigger 
 my scrip when a ticket is transferred out ?
 These possible conditions do not work:

 my $transaction = $self-TransactionObj;
 return($transaction-Type = Set  $transaction-Field = Queue  
 $transaction-OldValue eq queuename);
 return($transaction-Type = Set  $transaction-Field = Queue  
 $transaction-NewValue ne queuename);

 Thanks,

 - David

 RT Training in Washington DC, USA on Oct 25  26 2010
 Last one this year -- Learn how to get the most out of RT!


RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] can i see all tickets posted by my group?

2010-09-14 Thread Kenneth Marshall
I believe you will need to enumerate the members of your
group in your query.

Cheers,
Ken

On Tue, Sep 14, 2010 at 01:01:07PM +0200, peceka wrote:
 Hi,
 
 if there is a possibility to see all tickets which were created by
 members of group which i belong too?
 i tried to search such option in group rights but couldn't find.
 
 please help me with resolving this problem.
 
 TIA,
 p.
 
 RT Training in Washington DC, USA on Oct 25  26 2010
 Last one this year -- Learn how to get the most out of RT!
 

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Need help with RT-SQL on days calculation

2010-09-13 Thread Kenneth Marshall
On Mon, Sep 13, 2010 at 10:38:54AM -0700, Kenneth Crocker wrote:
 To list,
 
 I've been to the wiki and did some googling but no joy. Most likely my
 inexperience with both.
 
 I'm trying to run a query in RT that will give me all open tickets that
 are due within the next 30 days. Simple enough, but I can't seem to get the
 syntax right. I have:
 
 (  Status != 'resolved' AND Status != 'rejected' ) AND Due  (today + 30
 days). I've tried variations of 'Today' and no joy.
 
 Help please?
 
 Thanks.
 
 Kenn
 LBNL

What about something like:

Due  '30 days from now'
AND Due  'today'

with the additional list of statuses?

Regards,
Ken

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Need help with RT-SQL on days calculation

2010-09-13 Thread Kenneth Marshall
That should also be:

Due  '1 day ago'

and not:

Due  'today'

Ken

On Mon, Sep 13, 2010 at 12:47:11PM -0500, Kenneth Marshall wrote:
 On Mon, Sep 13, 2010 at 10:38:54AM -0700, Kenneth Crocker wrote:
  To list,
  
  I've been to the wiki and did some googling but no joy. Most likely my
  inexperience with both.
  
  I'm trying to run a query in RT that will give me all open tickets that
  are due within the next 30 days. Simple enough, but I can't seem to get the
  syntax right. I have:
  
  (  Status != 'resolved' AND Status != 'rejected' ) AND Due  (today + 30
  days). I've tried variations of 'Today' and no joy.
  
  Help please?
  
  Thanks.
  
  Kenn
  LBNL
 
 What about something like:
 
 Due  '30 days from now'
 AND Due  'today'
 
 with the additional list of statuses?
 
 Regards,
 Ken
 
 RT Training in Washington DC, USA on Oct 25  26 2010
 Last one this year -- Learn how to get the most out of RT!
 

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Slow Ticket History 3.8.8

2010-09-09 Thread Kenneth Marshall
One big win with enabling compression was that pages loaded in bigger
pieces and you have less problems with users trying to type in an
page that is unfinished with unpredictable results. With the DEFLATE
on, the page all decompresses on the fast client instead of dribbling
out from the server.

Cheers,
Ken

On Thu, Sep 09, 2010 at 08:13:28AM +0100, Justin Hayes wrote:
 Aren't those options just compressing the page to send out to the browser and 
 caching the output?
 
 We're on an internal gigabit network so seems unlikely that would help. All 
 our time goes on the server actually building the page to send out I think.
 
 Can try it though :)
 
 Justin
 
 -
 Justin Hayes
 OpenBet Support Manager
 justin.ha...@openbet.com
 
 On 7 Sep 2010, at 12:45, Torsten Brumm wrote:
 
  Hi Justin,
  just created inside a RT Test VM (slow one with 500mb ram) a single ticket 
  with around 60 replies and some comments. Tested the speed with different 
  users
  
  1. root user to open this ticket: around 26 sec - 870 single sql queries 
  in around 4 sec! (Queries: http://pastebin.com/7Yekfx2Y)
  2. user with full access (take, own, modify etc): around same time and 
  queries like root (Queries: http://pastebin.com/U0HnPcJL)
  3. user with less rights (no take, no own, only showticket, seequeue): time 
  around 15 sec and 600 sql queries in around 2 sec! (Queries: 
  http://pastebin.com/fXDHu6im)
  
  After this the apache starts to render the page from the results and push 
  them to the browser. The page is for my few comments/replies already 206KB 
  without any apache optimizations
  
  After adding: 
  
  SetOutputFilter DEFLATE
  SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$  no-gzip dont-vary
  SetEnvIfNoCase Request_URI \.pdf$ no-gzip dont-vary
  ExpiresActive On
  ExpiresByType text/css A604800
  
  ExpiresByType image/x-icon A31536000
  ExpiresByType image/gif A604800
  ExpiresByType image/jpg A604800
  ExpiresByType image/jpeg A604800
  
  ExpiresByType image/png A604800
  ExpiresByType application/x-javascript A3600
  Header set Cache-Control must-revalidate
  to the rt vhost, the page load time goes down from 26 sec to 8 sec and from 
  206 kb to 10kb
  
  you should try.
  
  Torsten
  
  2010/9/7 Justin Hayes justin.ha...@openbet.com
  Well we've captured the time for all the queries run for our long ticket 
  (which takes ~20secs to generate).
  
  Total query time is 0.871493s
  
  So it's not the DB.
  
  Justin
  
  -
  Justin Hayes
  OpenBet Support Manager
  justin.ha...@openbet.com
  
  On 7 Sep 2010, at 11:13, Torsten Brumm wrote:
  
  Hi Justin,
  just found this threat, sounds interessting.
  
  What i read so far: You have 1 quad core system with 8GB RAM, running both 
  WEB and DB, correct?
  
  Think you should follow Raed's hints first to log the queries generated 
  with RT
  
  In terms of debug; if you have not done this yet enable 
  DBIx-SearchBuilder StatementLog
  Set($StatementLog,?debug?);  in your etc/RT_SiteConfig.
  I'm sure you will find some funny queries. Normally the Query Log of 
  default MySQL can only log queries taking longer than a second, but in 
  your case i think, you will have several much faster queries but in 
  summary they take longer - but you can't find in mysql-slow log.
  
  Some more question regarding your hardware and setup.
  
  1. One Server / quad core (hyper threating) - how many threats for 
  Mysql/Postgresql? / 8 GB Ram 
  2. Hard Disk Setup? (logfiles and db storred on different HDD's? Any I/O 
  Problems?)
  3. RT Rights Setup, does the user performance is faster or slower than the 
  performance with root user?
  
  Some more information?
  
  We're running also a larger RT Instance with dedicated hardware for DB and 
  Webservers with no huge perferomance bottlenacks.
  
  Tob
  
  2010/9/7 Justin Hayes justin.ha...@openbet.com
  I *think* we're just CPU bound. Roy's webservers are 3.6ghz so quite a bit 
  faster than ours. We're going to try it on a faster server and that should 
  drop our times. Guess we just wanted to explore all avenues before 
  throwing hardware at the problem.
  
  Justin
  
  -
  Justin Hayes
  OpenBet Support Manager
  justin.ha...@openbet.com
  
  On 7 Sep 2010, at 10:30, Justin Hayes wrote:
  
  Tried Centos last night, and no difference at all.
  
  -
  Justin Hayes
  OpenBet Support Manager
  justin.ha...@openbet.com
  
  On 6 Sep 2010, at 20:49, Justin Hayes wrote:
  
  Hi Ruslan,
  
  Sorry looks like I shrunk the image too much. The thing I find odd is 
  that there are others with similar hardware who don't get the problem. 
  It'll be great if 3.10 fixes it for me, but I'd love to get to the 
  bottom of it first. I'm 

Re: [rt-users] Mandatory Subject - EMail

2010-09-08 Thread Kenneth Marshall
On Wed, Sep 08, 2010 at 09:16:11AM -0500, Peter Barton wrote:
  
  I have seen the RT-Extension-MandatorySubject plugin and this is
 great for
  opening tickets via the web interface.  However, my company opens at
 least
  90% of its tickets via email.  Is there anything out that can enforce
  mandatory subjects on tickets opened via email?
  
 
 
 How would you do that? Sending a bounce back? -- which is not
 convenient?
 What you can do is write a scrip on create to look for empty subject
 and then insert one based on whatever criteria you want, eg requestor /
 sender email address or the first line of the content etc ..
 
 Regards;
 Roy  
 
 I would actually like to bounce the email back notifying the sender that
 the subject is required.
 
 
 --
 Peter Barton
 
In order to prevent problems caused by back-scatter, you may want to
consider returning a 5xx error to the mail message with an informative
message. You could use header_checks with postfix and most other MTA's
support similar functionality.

Cheers,
Ken

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Mandatory Subject - EMail

2010-09-08 Thread Kenneth Marshall
On Wed, Sep 08, 2010 at 11:19:35AM -0400, Jason A. Smith wrote:
 On 09/08/2010 10:48 AM, Kenneth Marshall wrote:

 In principle, an informative bounce is okay. Unfortunately, it can
 be taken advantage of by unscrupulous mailers to send SPAM messages
 to other E-mail addresses with the consequent impact to your mail
 reputation and ability to send E-mail from your domain to others.
 If you restrict such bounces to local authenticated E-mail, then
 you can minimize the risk through the use of accountability.

 Cheers,
 Ken

 True, but if your RT is setup to accept email tickets from anywhere, 
 because there is no central directory of known email addresses and a need 
 for many people to be able to submit tickets, then it doesn't matter since 
 the sender (real or fake) will either get the no subject bounce or the rt 
 ticket created auto-reply.

 Also, in our procmail, the no subject check is the last filter before the 
 queue check rules.  Before these are several other rules to filter out 
 spam, and emails from mailers, lists, daemons, etc...

 ~Jason


True, these sorts of attacks are caught in our situation by the
anti-spam filter before submitting the message to RT. The same
setup could help ameleorate this back-scatter problem of a no-
subject bounce as well.

Cheers,
Ken

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Move ticket queue on date expiry

2010-09-02 Thread Kenneth Marshall
On Thu, Sep 02, 2010 at 08:03:08AM -0700, Gareth Tupper wrote:
 Hallo
 
 Wonder if anyone can point me in the right direction.  I'm using RT 3.8.6.  
 I'd like to move tickets to a new queue if the 'updated' date is older than 3 
 days.
 The intention is to stop tickets getting lost  languishing untouched.
 
 Can RT do this?
 
 
 Cheers,
 
 Gareth

Hi Gareth,

You should be able to use the rt-crontool command to do this
via a cronjob on your system. Generally, if the due date for
a ticket is set correctly, the ticket will show up closer to
the top in the 10 highest priority tickets I own window of
the dashboard.

Another way would be to simply add another window to your
dashboard, using a saved search, the display your tickets
that have not been updated in 3 days. That would be my
preferred solution, if the normal ticket order change as
the due date approaches will not work.

Regards,
Ken

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] Using Sphinx with RT

2010-08-30 Thread Kenneth Marshall
On Mon, Aug 30, 2010 at 04:21:51PM +0200, Guadagnino Cristiano wrote:
 Hi all,
 is there anybody already using Sphinx with RT to implement fast and efficient 
 full-text search?
 
 For RT developers: are there plans for implementing better full-text search 
 in RT in the (near) future? What about RT 4?
 
 I just want to know before I spend considerable time and efforts trying to 
 integrate Sphinx in our RT setup.
 
 TIA
 
 Bye
 Cris
 

I have not seen anything in the RT4 discussions about updating
or including a full-text search function. The easiest way is to
use one of the existing database backends with full-text support,
either PostgreSQL or Oracle currently. It would be great if you
could get a more general full-text index support into RT with
Sphinx, since it can use ODBC to access the backend data for
indexing. The need to use a second SQL connection to Sphinx and
the ODBC backend interconnect to the RT datastore really
complicates the interface.

Good luck,
Ken

RT Training in Washington DC, USA on Oct 25  26 2010
Last one this year -- Learn how to get the most out of RT!


Re: [rt-users] 3.2.1 - 3.8.8 any major data schema changes?

2010-08-10 Thread Kenneth Marshall
The UPGRADING file covers all previous releases. Look at the
version in the release to which you are upgrading.

Cheers,
Ken

On Tue, Aug 10, 2010 at 09:41:52AM -0400, Mike Johnson wrote:
 Is there anywhere on the wiki that documents which releases can be upgraded
 to from each?
 
 I guess basically what Im looking for is the shortest line from 3.2.1 ---
 3.8.8
 
 Is there a general rule of thumb? like every 3.x I should look at the
 UPGRADING? or would I have to dig into the point point releases?
 
 Thanks for the insight.  I attempted to search the wiki, but I had a hard
 time even trying to figure out what that is called
 
 Mike.

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


Re: [rt-users] ExternalAuth workaround? while waiting for 0.9

2010-08-03 Thread Kenneth Marshall
Every E-mail address passes through this function first. This
is why the clean-up/fix-up works.

Ken

On Tue, Aug 03, 2010 at 11:15:50AM -0400, Mike Johnson wrote:
 Ah, so this is called everytime a new user emails the system? (sorry, still
 learning how RT even works :P never mind how it's coded hehe)
 
 On Tue, Aug 3, 2010 at 11:08 AM, Kenneth Marshall k...@rice.edu wrote:
 
  On Tue, Aug 03, 2010 at 10:59:15AM -0400, Mike Johnson wrote:
   Would this also ensure that when LDAP finds the matching email in RT's
   users, it'll update the other info to what LDAP has?(essentially
  overwriting
   the email address as username that was set when a non-user emails RT)
  
 
  The function looks up the E-mail address in the LDAP directory
  and if it is found looks up the corresponding primary E-mail
  address and uses that instead. Then the rest of the ExternAuth
  piece populates the other information for the user from the
  directory using that E-mail address.
 
  Cheers,
  Ken
 
 
 
 
 -- 
 Mike Johnson
 Datatel Programmer/Analyst
 Northern Ontario School of Medicine
 955 Oliver Road
 Thunder Bay, ON   P7B 5E1
 Phone: (807) 766-7331
 Email: mike.john...@nosm.ca

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


Re: [rt-users] Email Priority.

2010-08-03 Thread Kenneth Marshall
What about something like:

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

Cheers,
Ken

On Tue, Aug 03, 2010 at 11:22:45AM -0700, Kenneth Crocker wrote:
 Mark,
 
 Priority is a number field in the DataBase and if you use the CBM command
 Priority: Urgent, RT will kick it out as the wrong format for that field.
 However, we have a Custom Field (we have urgent as one of the values) and
 you could do the same. That way your email could have CF{whatever}: Urgent
 in it and then a scrip that sets the priority when that CF value is changed.
 
 Just a thought. Hope it helps.
 
 Kenn
 LBNL
 
 On Tue, Aug 3, 2010 at 11:17 AM, Mark Jenks
 mark.je...@iodincorporated.comwrote:
 
   Is there a way to set a ticket priority to 50 if the user sets the Email
  from outlook to Urgent?
 
 
 
  Inside of the headers of the email exists ?Priority: Urgent?.
 
 
 
  Can that be checked and acted on when a ticket gets created?
 
 
 
  
 
  Mark Jenks
 
  Network Administrator
 
  *iod incorporated*
 
  mark.je...@iodincorporated.com
 
  920-406-3702
 
 
   CONFIDENTIALITY NOTICE: The information contained in this email message,
  including any attachments, may be privileged, confidential and otherwise
  protected from disclosure. If the reader of this message is not the intended
  recipient, you are hereby notified that any use, dissemination, distribution
  or copying of this message, including any attachments, is strictly
  prohibited. If you have received this email message in error, please notify
  the sender by reply email and delete/destroy the email message, including
  attachments, and any copies thereof. Although we have taken precautions to
  minimize the risk of transmitting viruses via email and attachments thereto,
  we do not guarantee that either is virus-free, and we accept no liability
  for any damages sustained as a result of any such viruses.
 
 
  Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
  Buy a copy at http://rtbook.bestpractical.com
 

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

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


Re: [rt-users] ExternalAuth workaround? while waiting for 0.9

2010-07-29 Thread Kenneth Marshall
On Thu, Jul 29, 2010 at 09:36:33AM -0400, Mike Johnson wrote:
 Greetings all,
 
 Has anyone that is using ExternalAuth developed a workaround for the new
 user creation issue with ExternalAuth?
 
 The issue was outlined in another rt-user message(I can't seem to find
 now).  It relates to when non-privleged users are created through the
 creation of a ticket from an email, and then they login using LDAP.  The
 email generates a user with username and email address as their email
 address.  ExternalAuth throws an error when it attempts to create the new
 user, as a user already exists with the same email address.
 
 I need ExternalAuth to find the user that has the same email address, and
 change that user's info to the info it grabs from LDAP.
 
 If I was a perl programmer, I'd figure out how to customize it myself, but
 unfortunately, I'm just stepping into that world... most perl stuff i use,
 I've borrowed from the web :P
 Has anyone developed a workaround?
 
 The only thing I can think of, is taking all LDAP users, and loading them
 into RT with their info, and everytime a new user is created in LDAP, they
 get created in RT... but that seems like a fair amount of work
 
 Thanks!
 
 -- 
 Mike Johnson
 Datatel Programmer/Analyst
 Northern Ontario School of Medicine
 955 Oliver Road
 Thunder Bay, ON   P7B 5E1
 Phone: (807) 766-7331
 Email: mike.john...@nosm.ca


Hi Mike,

We use a customized version of the CanonicalizeEmailAddress() function
which looks up the E-mail address in the LDAP directory and maps it to
their primary E-mail address before creating the account. Then it does
not conflict with the ExternalAuth process which will then pull the
same information. Here is our version which should give you some ideas:


sub CanonicalizeEmailAddress {
my $self = shift;
my $email = shift;

# Leave some addresses intact
if ( $email =~ /[\w-...@mysafe1.rice.edu$/ ) {
return ($email);
}
if ( $email =~ /[\w-...@mysafe2.rice.edu$/ ) {
return ($email);
}

# Example: the following rule would treat all email
# coming from a subdomain as coming from second level domain
# foo.com
if ( my $match   = RT-Config-Get('CanonicalizeEmailAddressMatch') and
 my $replace = RT-Config-Get('CanonicalizeEmailAddressReplace') )
{
$email =~ s/$match/$replace/gi;
}
$email .= '@rice.edu' if ($email =~ /^[\w-]+$/);

#
# Now we should have an Email address that is of the form a...@rice.edu
# Use LDAP to map this to the primary vanity Email alias.

my $params = ( Name = undef,
   EmailAddress = undef);

my $ldap = new Net::LDAP($RT::LdapServer)
  or $RT::Logger-critical(CanonicalizeEmailAddress: Cannot connect to 
LDAP\n),
return ($email);

my $mesg = $ldap-bind();

if ($mesg-code != LDAP_SUCCESS) {
  $RT::Logger-critical(CanonicalizeEmailAddress: Unable to bind to 
$RT::LdapServer: ,
ldap_error_name($mesg-code), \n);

  return ($email);
}

# First check to see if the E-mail address uniquely characterizes the
# user. If so, update the information with the LDAP query results.
my $filter = (mailAlternateAddress=$email);
$mesg = $ldap-search(base   = $RT::LdapBase,
  filter = $filter,
  attrs  = [ $RT::LdapMailAttr ]);

if ($mesg-code != LDAP_SUCCESS and $mesg-code != LDAP_PARTIAL_RESULTS)  {
  $RT::Logger-critical(Unable to search in LDAP: , 
ldap_error_name($mesg-code), \n);

  return ($email);
}

# The search succeeded with just one match
if ($mesg-count == 1) {
  $email = ($mesg-first_entry-get_value($RT::LdapMailAttr))[0];
}

$mesg = $ldap-unbind();
if ($mesg-code != LDAP_SUCCESS) {
  $RT::Logger-critical(Could not unbind from LDAP: , 
ldap_error_name($mesg-code), \n);

}
undef $ldap;
undef $mesg;
return ($email);
}


You will also need these somewhere ahead of there use:

use Net::LDAP;
use Net::LDAP::Constant qw(LDAP_SUCCESS LDAP_PARTIAL_RESULTS);
use Net::LDAP::Util qw (ldap_error_name);
use Net::LDAP::Filter;

We have them at the top under use strict.

Cheers,
Ken

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


Re: [rt-users] Mysql queries slow

2010-07-22 Thread Kenneth Marshall
On Wed, Jul 21, 2010 at 06:19:51PM -0700, William Graboyes wrote:
 Hi List,
 
 As an example of what I  am talking about the query `select count(id) from
 Attachments;`  The returned result is 174039, but it takes 39.1549 seconds
 to return that simple query.  The Transactions table returns 343259 in .4358
 seconds.  Does anyone have some optimization tips beyond what is already on
 the wiki.
 
 After a little more of my own tweaking I have the Attachments query down to
 24.9559 seconds.
 
 Has anyone successfully integrated RT3 with memcached?  Would I be better
 off moving the mysql server to it's own server?
 
 Running version:
 RT 3.8.7
 MySQL 5.0.67
 
 Total tickets as of this writing:
 7282
 
 Total time on RT:
 1yr 3m
 
 Thanks in advance for any help that can be provided.
 
 
 Thanks,
 Bill


Hi Bill,

You mentioned your version of the software but no details of your
actual hardware. To provide the answer to the count(*) query, the
entire table concerned needs to be read from disk. For your 
Attachments result off 39s for 174039, is that the value for the
first time the query is run or the value after multiple runs when
the table is cached in memory? We use PostgreSQL as the backend
and the first time the select query is run:

# select count(*) from attachments;
  count  
-
 2807604
(1 row)

Time: 16707.404 ms

But the second time, the result is much faster because of caching:

# select count(*) from attachments;
  count  
-
 2807622
(1 row)

Time: 2909.343 ms

Similarly for the transactions table:

# select count(*) from transactions;
  count  
-
 6468511
(1 row)

Time: 4030.046 ms

And for the 2nd run with caching:

# select count(*) from transactions;
  count  
-
 6468511
(1 row)

Time: 1094.672 ms

It does seem like your times are slower, but it could easily
be the hardware setup that you are using for RT.

Cheers,
Ken

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


Re: [rt-users] Mysql queries slow

2010-07-22 Thread Kenneth Marshall
On Thu, Jul 22, 2010 at 09:52:14AM -0700, William Graboyes wrote:
 Hi Ken,
 
 I do not have the full hardware specs.  It is a hosted RT system.  The specs
 that I do have access to are as follows:
 
 Probably a dual core single CPU system, speed unknown
 2gb of ram
 80 gb hd space they are using md but I do not know the configuration
 particulars.
 
 I know it is not much help.  I have applied all the mysql tuning tricks I
 know to it.
 
 Thanks,
 Bill
 

Hi Bill,

It looks like you are being constrained by your hardware. The rows
in the Transactions table are much, much smaller than those in the
Attachments table. This means that on a system such as yours with
only 2GB of memory, pretty much the entire Transactions table can
be cached in memory. Unless you have very small attachments, this
will not be the case for the Attachments table. I suspect that the
lookups are quick but retrieving all the attachments via effectively
random I/O on a single disk is holding you back.

Cheers,
Ken

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


Re: [rt-users] Quick Syntax check for $RTAddressRegexp setting

2010-07-22 Thread Kenneth Marshall
On Thu, Jul 22, 2010 at 03:32:13PM -0400, Mike Johnson wrote:
 Hi everyone,
 
 I just want to make sure i'm understanding the wiki properly...
 
 If I want to make sure RT doesn't create tickets using the following email
 addresses,
 
 helpd...@here.ca
 myhelpd...@here.ca
 helpd...@there.ca
 myhelpd...@there.ca
 
 My config file setting should look like this,
 
 Set($RTAddressRegexp,'^(helpdesk | myhelpdesk)\@(here | there)\.ca$');
 
 right?
 
I think spaces count so you need something like:

Set($RTAddressRegexp,'^(helpdesk|myhelpdesk)\@(here|there)\.ca$');

Cheers,
Ken

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


Re: [rt-users] 10 newest unowned tickets

2010-07-21 Thread Kenneth Marshall
You will need to enable using SQL for ACLs in RT_SiteConfig.pm.
It is beta/testing so buyer beware...

Ken

On Wed, Jul 21, 2010 at 10:45:48AM -0500, Mark Jenks wrote:
 I have an issue I am trying to figure out.
 
  
 
 The default search for unowned tickets is:
 
 Owner = 'Nobody'
 
 AND (
 
 Status = 'new'
 
Or Status = 'open')
 
  
 
 But it doesn't show everything for non system-admins.  (i.e. people that
 can't see all of the queues)
 
  
 
 If I specify a queue, it works fine.
 
  
 
 It seems that it searches all the tickets, shows the top 10, and only
 displays the tickets that the user has access to the queues. 
 
 So, if the user only has access to 1 out of 10 queues, there is a chance
 it will show nothing in it, because there are none in the top 10 that he
 as access to view.
 
  
 
 Sounds like a logic bug in the code?  I am on 3.8.8.
 
  
 
 -Mark
 
 
 
 
 
 
 
 Mark Jenks
 
 Network Administrator
 
 iod incorporated
 
 mark.je...@iodincorporated.com mailto:mark.je...@iodincorporated.com 
 
 920-406-3702
 
  
 
 
 CONFIDENTIALITY NOTICE:  The information contained in this email message, 
 including any attachments, may be 
 privileged, confidential and otherwise protected from disclosure.  If the 
 reader of this message is not the 
 intended recipient, you are hereby notified that any use, dissemination, 
 distribution or copying of this 
 message, including any attachments, is strictly prohibited.  If you have 
 received this email message in 
 error, please notify the sender by reply email and delete/destroy the email 
 message, including attachments, 
 and any copies thereof.  Although we have taken precautions to minimize the 
 risk of transmitting viruses via 
 email and attachments thereto, we do not guarantee that either is virus-free, 
 and we accept no liability for 
 any damages sustained as a result of any such viruses.

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

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


  1   2   3   4   >