Re: [rt-users] moving from global scrips to per-queue scrips

2008-09-17 Thread Emmanuel Lacour
On Tue, Sep 16, 2008 at 12:25:28PM -0400, [EMAIL PROTECTED] wrote:
 At the moment, we have a set of global scrips that apply to all queues.  We
 want to migrate to using per-queue scrips since many of the queues have
 different needs.  Is there an easy way to take the existing global scrips and
 apply them to all queues (and then delete the global scrips)?


here is a script I used a while ago to do this, you should adjust path
at top on the script and also add unwanted queues in @queues_blacklist
if needed.

should works fine but ... test it on test RT instance before your
production RT maybe ;)

#!/usr/bin/perl -w
# Convert global scrips to per-queue scrips

use strict;
use lib /opt/rt/rt/local/lib;
use lib /opt/rt/rt/lib;
use lib /opt/rt/rt/etc;
use RT;
use RT::Interface::CLI qw( CleanEnv GetCurrentUser );
use RT::User;

# Disable STDOUT buffering
$| = 1;

# Set locales
$ENV{'LANG'} = 'POSIX';
$ENV{'LC_ALL'} = 'POSIX';

my $code;
my $msg;
my @queues_blacklist = qw(___Approvals);

# RT CLI initialization
CleanEnv();
RT::LoadConfig();
RT::Init();

# Get the current user all loaded
our $CurrentUser = GetCurrentUser();

unless( $CurrentUser-Id )
{
	print STDERR No RT user found. Please consult your RT administrator.\n;
	exit 1;
}

# Get queues
my @queues;
my $QueuesObj = RT::Queues-new($CurrentUser);
$QueuesObj-UnLimit();
while ( my $queue = $QueuesObj-Next )
{
	next if (grep {$queue-Name eq $_} @queues_blacklist);
	push @queues, $queue-id;
}

my $Scrips = RT::Scrips-new($CurrentUser);
$Scrips-LimitToGlobal();
while ( my $scrip = $Scrips-Next )
{
	next if (($scrip-Id != 3)  ($scrip-Id != 6));
	my $scrip_full_description = $scrip-ConditionObj-Name. .$scrip-ActionObj-Name. with template .$scrip-TemplateObj-Name;
	foreach my $queue (@queues)
	{
		print Create scrip .$scrip-id. (.$scrip_full_description.) for queue .$queue.\n;
		my $queue_scrip = RT::Scrip-new($CurrentUser);
		($code,$msg) = $queue_scrip-Create(
			Queue  = $queue,
			ScripAction= $scrip-ScripAction,
			ScripCondition = $scrip-ScripCondition,
			Template   = $scrip-Template,
			Description= $scrip-Description,
			CustomPrepareCode  = $scrip-CustomPrepareCode,
			CustomCommitCode   = $scrip-CustomCommitCode,
			CustomIsApplicableCode = $scrip-CustomIsApplicableCode,
	);
		if (!$code) {
			warn Error creating scrip: $msg\n;
			warn Skipping global scrip deletion\n;
			next;
		}
	}
	print Delete Global scrip .$scrip-id.(.$scrip_full_description.)\n;
	($code,$msg) = $scrip-Delete;
	warn Unable to delete scrip: $msg\n if (!$code);
}
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] Spreeadsheet, utf-8 and ms excel

2008-09-17 Thread Emmanuel Lacour
On Tue, Sep 16, 2008 at 04:46:25PM +0200, Emmanuel Lacour wrote:
 
 I just uploaded a new version (0.03) to CPAN with updated
 Module::Install and updated Results.xls with new features of 3.8
 Results.tsv.
 Should be available soon on mirrors.
 
 
 Thought, in 3.8, the XLS link appears with action buttons at the bottom
 of the page, not easy to find for users, but it's there.
 I'm waiting for a new callback in RT source code to be able to add the
 link along other  export links (iCal, RSS, ...) on the top.
 

The new callback is now in svn, so I just uploaded a new release 0.04
which uses this callback.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


[rt-users] Performance problems with 3.8.1

2008-09-17 Thread Sahlberg Mauri
Hi,

Just upgraded from 3.6 to 3.8.1 (via 3.8) and at the same time moved the 
database to it's own server. We also removed all closed tickets from the 
database. The move and upgrade was done as our old installation got too slow. 
Unfortunately the new installation is also very slow despite the ticket removal 
and dedicated database server. Especially search building view and ticket view 
take time to open.

We have:

-  Checked that weI have newest DBIx:search builder installed

-  Checked that both our database server (CentOS 5.2 final) and web 
server (CentOS 5.2 final)  fulfill the minimum shared memory settings suggested 
at the wiki

-  Have FastCGI installed on Apache 2.2.3, standard CentOS 5.2 final 
binary (standard CentOS 5.2 perl 5.8.8 with make fixdeps installed modules)

-  Our Postgresql 8.1.11 (Centos 5.2 standard binary) has more 
shared_buffers and temp_buffers than suggested at the wiki

-  Installed pg_top and tried to isolate the query that hogs the machine

Any suggestions what we could yet do to speed things up?
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] Performance problems with 3.8.1

2008-09-17 Thread Sven Sternberger
try if it is faster with MS IE, firefox has problems
with the new CSS

regards

sven

On Mi, 2008-09-17 at 13:13 +0300, Sahlberg Mauri wrote:
 Hi,
 
  
 
 Just upgraded from 3.6 to 3.8.1 (via 3.8) and at the same time moved
 the database to it’s own server. We also removed all closed tickets
 from the database. The move and upgrade was done as our old
 installation got too slow. Unfortunately the new installation is also
 very slow despite the ticket removal and dedicated database server.
 Especially search building view and ticket view take time to open. 
 
  
 
 We have:
 
 - Checked that weI have newest DBIx:search builder installed
 
 - Checked that both our database server (CentOS 5.2 final) and
 web server (CentOS 5.2 final)  fulfill the minimum shared memory
 settings suggested at the wiki
 
 - Have FastCGI installed on Apache 2.2.3, standard CentOS 5.2
 final binary (standard CentOS 5.2 perl 5.8.8 with make fixdeps
 installed modules)
 
 - Our Postgresql 8.1.11 (Centos 5.2 standard binary) has more
 shared_buffers and temp_buffers than suggested at the wiki
 
 - Installed pg_top and tried to isolate the query that hogs
 the machine
 
  
 
 Any suggestions what we could yet do to speed things up?
 
 
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: [EMAIL PROTECTED]
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] Problem viewing All My Open Tickets

2008-09-17 Thread Chris Nelson
Very weird - today it works. Yesterday, the link was taking me to a blank
page.

It is asking me to login - which is strange. I've been seeing several places
where it prompts me to login - and I saw several posts about this. I added
the line:

Set($WebSessionClass , 'Apache::Session::File');

To /opt/rt3/bin/RT_SiteConfig.pm when I installed (hoping the problem would
go away).

Anyway, thanks,
-Chris

On Tue, Sep 16, 2008 at 5:47 PM, Ruslan Zakirov [EMAIL PROTECTED]wrote:

 On Tue, Sep 16, 2008 at 9:31 PM, Chris Nelson [EMAIL PROTECTED] wrote:
  For those following the continuing saga of the complete reinstall, it's
 been
  a LONG time coming, but I'm FINALLY up and running. To give back to the
  community a bit (if such a thing is really possible for such a newbie),
 I've
  created an exhaustive document covering the COMPLETE, end to end
  installation of RT3.8.1 on Ubuntu 8.04 on a Virtual Server spun up on the
  free vmware. I'm not quite done, but when I am, I'll post it here if
 there's
  any interest.
 That will be interesting.

 
  In the mean time, here is a problem I'm currently having:
 
  The link on the home page is:
 
 
 http://mrs-stanwyk.corp.delivra.com/rt/Search/Results.html?Format=%27%20%20%20%3Cb%3E%3Ca%20href%3D%22%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C%0A%27%3Csmall%3E__Requestors__%3C%2Fsmall%3E%27%2C%0A%27%3Cb%3E%3Ca%20href%3D%22%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject%27%2C%0A%27__Status__%27%2C%0A%27__QueueName__%27%2C%0A%27__Priority__%27Order=ASC%7CASC%7CASC%7CASCOrderBy=Status%7CPriority%7C%7CQuery=%20Owner%20%3D%20%27cnelson%27%20AND%20Status%20!%3D%20%27resolved%27RowsPerPage=0SearchType=Tickethttp://mrs-stanwyk.corp.delivra.com/rt/Search/Results.html?Format=%27%20%20%20%3Cb%3E%3Ca%20href%3D%22%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C%0A%27%3Csmall%3E__Requestors__%3C%2Fsmall%3E%27%2C%0A%27%3Cb%3E%3Ca%20href%3D%22%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject%27%2C%0A%27__Status__%27%2C%0A%27__QueueName__%27%2C%0A%27__Priority__%27Order=ASC%7CASC%7CASC%7CASCOrderBy=Status%7CPriority%7C%7CQuery=%20Owner%20%3D%20%27cnelson%27%20AND%20Status%20%21%3D%20%27resolved%27RowsPerPage=0SearchType=Ticket
 
  I'm not sure what I'm doing wrong. Any help is appreciated.
 Where is the problem you're talking about? I see nothing terribly
 wrong with the link.

  -Chris
 
  ___
  http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
  Community help: http://wiki.bestpractical.com
  Commercial support: [EMAIL PROTECTED]
 
 
  Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
  Buy a copy at http://rtbook.bestpractical.com
 



 --
 Best regards, Ruslan.

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] Problem viewing All My Open Tickets

2008-09-17 Thread Chris Nelson
Now that I think about it - I did clear my cache and related cookies late
yesterday, I'll bet it was just a cached page or something.

On Wed, Sep 17, 2008 at 8:33 AM, Chris Nelson [EMAIL PROTECTED] wrote:

 Very weird - today it works. Yesterday, the link was taking me to a blank
 page.

 It is asking me to login - which is strange. I've been seeing several
 places where it prompts me to login - and I saw several posts about this. I
 added the line:

 Set($WebSessionClass , 'Apache::Session::File');

 To /opt/rt3/bin/RT_SiteConfig.pm when I installed (hoping the problem would
 go away).

 Anyway, thanks,
 -Chris


 On Tue, Sep 16, 2008 at 5:47 PM, Ruslan Zakirov [EMAIL PROTECTED]wrote:

 On Tue, Sep 16, 2008 at 9:31 PM, Chris Nelson [EMAIL PROTECTED]
 wrote:
  For those following the continuing saga of the complete reinstall, it's
 been
  a LONG time coming, but I'm FINALLY up and running. To give back to
 the
  community a bit (if such a thing is really possible for such a newbie),
 I've
  created an exhaustive document covering the COMPLETE, end to end
  installation of RT3.8.1 on Ubuntu 8.04 on a Virtual Server spun up on
 the
  free vmware. I'm not quite done, but when I am, I'll post it here if
 there's
  any interest.
 That will be interesting.

 
  In the mean time, here is a problem I'm currently having:
 
  The link on the home page is:
 
 
 http://mrs-stanwyk.corp.delivra.com/rt/Search/Results.html?Format=%27%20%20%20%3Cb%3E%3Ca%20href%3D%22%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C%0A%27%3Csmall%3E__Requestors__%3C%2Fsmall%3E%27%2C%0A%27%3Cb%3E%3Ca%20href%3D%22%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject%27%2C%0A%27__Status__%27%2C%0A%27__QueueName__%27%2C%0A%27__Priority__%27Order=ASC%7CASC%7CASC%7CASCOrderBy=Status%7CPriority%7C%7CQuery=%20Owner%20%3D%20%27cnelson%27%20AND%20Status%20!%3D%20%27resolved%27RowsPerPage=0SearchType=Tickethttp://mrs-stanwyk.corp.delivra.com/rt/Search/Results.html?Format=%27%20%20%20%3Cb%3E%3Ca%20href%3D%22%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__id__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3A%23%27%2C%0A%27%3Csmall%3E__Requestors__%3C%2Fsmall%3E%27%2C%0A%27%3Cb%3E%3Ca%20href%3D%22%2Frt%2FTicket%2FDisplay.html%3Fid%3D__id__%22%3E__Subject__%3C%2Fa%3E%3C%2Fb%3E%2FTITLE%3ASubject%27%2C%0A%27__Status__%27%2C%0A%27__QueueName__%27%2C%0A%27__Priority__%27Order=ASC%7CASC%7CASC%7CASCOrderBy=Status%7CPriority%7C%7CQuery=%20Owner%20%3D%20%27cnelson%27%20AND%20Status%20%21%3D%20%27resolved%27RowsPerPage=0SearchType=Ticket
 
  I'm not sure what I'm doing wrong. Any help is appreciated.
 Where is the problem you're talking about? I see nothing terribly
 wrong with the link.

  -Chris
 
  ___
  http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
  Community help: http://wiki.bestpractical.com
  Commercial support: [EMAIL PROTECTED]
 
 
  Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
  Buy a copy at http://rtbook.bestpractical.com
 



 --
 Best regards, Ruslan.



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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] scrips/template issue

2008-09-17 Thread Stephen Turner
On Tue, 16 Sep 2008 13:54:25 -0400, Robert Keidel [EMAIL PROTECTED]  
wrote:

 Content:
 Your request has been completed 
 If you have any further questions or concerns, please respond to this
 message.

 The IT Service Team


Robert,

You need a blank line at the beginning of the template. Also, if you check  
the RT log you should see error messages in this case.

Steve

-- 
Stephen Turner
Senior Programmer/Analyst - SAIS
MIT IST
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] Performance problems with 3.8.1

2008-09-17 Thread Curtis Bruneau
For FastCGI, I changed my configuration to allow multiple processes so 
other requests aren't getting queued up when big queries are hitting the 
server. Without this setting the site was pretty slow to respond but 
once the request got in it was fast. I've also changed the default idle 
timeout to something similar to mod_perl2, the default was triggering on 
normal stuff, some un-indexed fields in search were causing really slow 
count()s..

FastCgiServer /opt/rt3/bin/mason_handler.fcgi -idle-timeout 300 -processes 4

Also the recommended shared buffers would be tailored to your instance, 
in our case we have nearly 1GB in indexes alone so ours is set fairly 
high. Generally you want it high enough so it doesn't have to swap out 
indexes all the time.

Curtis

Sahlberg Mauri wrote:

 Hi,

 Just upgraded from 3.6 to 3.8.1 (via 3.8) and at the same time moved 
 the database to it’s own server. We also removed all closed tickets 
 from the database. The move and upgrade was done as our old 
 installation got too slow. Unfortunately the new installation is also 
 very slow despite the ticket removal and dedicated database server. 
 Especially search building view and ticket view take time to open.

 We have:

 - Checked that weI have newest DBIx:search builder installed

 - Checked that both our database server (CentOS 5.2 final) and web 
 server (CentOS 5.2 final) fulfill the minimum shared memory settings 
 suggested at the wiki

 - Have FastCGI installed on Apache 2.2.3, standard CentOS 5.2 final 
 binary (standard CentOS 5.2 perl 5.8.8 with make fixdeps installed 
 modules)

 - Our Postgresql 8.1.11 (Centos 5.2 standard binary) has more 
 shared_buffers and temp_buffers than suggested at the wiki

 - Installed pg_top and tried to isolate the query that hogs the machine

 Any suggestions what we could yet do to speed things up?

 

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

 Community help: http://wiki.bestpractical.com
 Commercial support: [EMAIL PROTECTED]


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

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


[rt-users] RT 3.8.1 Rich Text Editor is not enabled

2008-09-17 Thread Daniel Tougas

Hi All,

I have installed RT 3.8.1 on a new machine and migrated the database from 
version 3.4.4.   RT works fine except that I can't see the little triangle to 
view the RichText toolbar when composing a new ticket.

The MessageBoxRichText  configuration variable is set to 1, which I think, 
should enable this feature.

I have upgraded from 3.6 to RT 3.8.0 on another system and the toolbar is 
accessible.

Any ideas?

Thanks a lot.


This email and any files transmitted with it are confidential and intended 
solely for the use of the individual or entity to whom they are addressed. If 
you have received this email in error please notify the system manager. 
 
Afin de combattre les pourriels, DALSA ne retournera plus d'avis d'echec 
d'envoi pour les adresses invalides. Ce courriel ainsi que ses pieces jointes 
sont strictement reserves a l'usage de la ou du destinataire et peut contenir 
de l'information privilegiee et confidentielle. Si vous avez recu cette 
correspondance par erreur, veuillez supprimer le message. Merci.___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] No attachments when replying from the webinterface

2008-09-17 Thread Joop
Joop wrote:
 Dear all,

 A coworker of mine noticed that replies don't contain attachments 
 anymore since upgrading to rt-3.8.1 and after testing in my test 
 instance I can't find where it is coming from. I upgraded from rt-3.6.6 
 to rt-3.8.1 and I'm using Oracle as a backend database. So I'm not 
 bitten by the mysql update gone wrong. Attachments make it into the 
 database fine but it looks like the mimeobject isn't build correctly. 
 Make fixdeps finds everything OK.
 The following sequence is interesting:
 - /etc/init.d/apache2 stop
 - mv /opt/rt3 /opt/rt381
 - mv /opt/rt366 /opt/rt3
 - /etc/init.d/apache2 start
 - login into RT
 - send a reply and attach a config file
 - email arrives correctly WITH attachment.
 ???
 Switch back and email arrives WITHOUT attachment.
 Conclusion from this is that it is in the code of rt-3.8.1 and NOT in 
 the database since that is a constant factor.
 And yes my template Correspondence contains the line RT-Attach-Message: yes
 and contains 2 blank lines after the last (in this case one) header.

 Anyone seen this before?
   
 From the lack of response I would say that no one has noticed yet there 
there is a slight problem with 3.8.1 in combination with Oracle that is.

The fact that the same db works with 3.6.6 gave me some clue that it had 
to be in the code of 3.8.1 and after trying all kind of things I tracked 
it down to Action/Sendmail.pm
I diffed the 3.8.1 version against the 3.6.6 one and one thing that is 
new is LimitNotEmpty which tries to exclude empty attachments but fails 
on Oracle because of a 'logic bug'.
This is what gets build by LimitNotEmpty for Oracle:

SELECT   main.*
FROM attachments main
   WHERE  (main.content IS NOT NULL AND main.content NOT LIKE '')
 AND (main.transactionid = '313815')
 AND (main.ID != '204666') -- exlude the content itself
ORDER BY main.ID ASC;

The first part of the where is the same for all databases (main.content 
is not null) the second part is added by LimitNotEmpty (main.content not 
like '') which is wrong

The following test demonstrates that logic:

create table t (
id number,
t  clob
);

insert into t values(1,'test');
insert into t values(2,'');
insert into t values(3,null);

select * from t where t is not null;  -- id=1 t=test
select * from t where t not like '%' -- no rows returned
select * from t where t is null; -- returns both row 2 and 3

So inserting an empty string and null into a CLOB column in Oracle are 
equivalent and the second part doesn't work on NULL. Probably not if its 
a BLOB!

My proposal is to recode the LimitNotEmpty function so that for Oracle 
nothing is added.

Regards,

Joop





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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


[rt-users] custom field value from arbitrary SQL select

2008-09-17 Thread Mathieu Longtin
Is there a way to create a select one value custom field that gets its
valid values from some SQL query, rather than build the list manually?

Thanks

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] Performance problems with 3.8.1

2008-09-17 Thread Kenneth Marshall
On Wed, Sep 17, 2008 at 01:13:31PM +0300, Sahlberg Mauri wrote:
 Hi,
 
 Just upgraded from 3.6 to 3.8.1 (via 3.8) and at the same time moved the 
 database to it's own server. We also removed all closed tickets from the 
 database. The move and upgrade was done as our old installation got too slow. 
 Unfortunately the new installation is also very slow despite the ticket 
 removal and dedicated database server. Especially search building view and 
 ticket view take time to open.
 
 We have:
 
 -  Checked that weI have newest DBIx:search builder installed
 
 -  Checked that both our database server (CentOS 5.2 final) and web 
 server (CentOS 5.2 final)  fulfill the minimum shared memory settings 
 suggested at the wiki
 
 -  Have FastCGI installed on Apache 2.2.3, standard CentOS 5.2 final 
 binary (standard CentOS 5.2 perl 5.8.8 with make fixdeps installed modules)
 
 -  Our Postgresql 8.1.11 (Centos 5.2 standard binary) has more 
 shared_buffers and temp_buffers than suggested at the wiki
 
 -  Installed pg_top and tried to isolate the query that hogs the 
 machine
 
 Any suggestions what we could yet do to speed things up?

I just checked the latest DBIx::SearchBuilder and the fix that I
thought had been incorporated into the Handle/Pg.pm has not as of
yet. The problem line is line number 245:

  $$statementref = SELECT DISTINCT main.* FROM $$statementref;

If you replace it with a line like the one in the Oracle.pm at
line number 279:

  $$statementref = SELECT main.* FROM ( SELECT DISTINCT main.id FROM 
$$statementref ) distinctquery, $table main WHERE (main.id = distinctquery.id) 
;

you should see a nice performance boost on the page loads. I have sent
this change in before, but it has not been adopted even though it is
being used in the Oracle.pm file. I examined the query used by mysql.pm
for this query, and the Oracle.pm version of the line duplicates the
query used by mysql.pm exactly. The query as currently written spends
a lot of sorting fields that are not used. The alternate query is
much faster. Maybe BP can re-examine this suggestion again.

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] custom field value from arbitrary SQL select

2008-09-17 Thread Jerrad Pierce
On Wed, Sep 17, 2008 at 10:19, Mathieu Longtin [EMAIL PROTECTED] wrote:
 Is there a way to create a select one value custom field that gets its
 valid values from some SQL query, rather than build the list manually?

You could create a web interface that exposes your values, and uses
the external API
provided. Though that seems to dynamically load values, and you seem
to want to do
it once only?

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] custom field value from arbitrary SQL select

2008-09-17 Thread Jesse Vincent



On Wed, Sep 17, 2008 at 10:19:06AM -0400, Mathieu Longtin wrote:
 Is there a way to create a select one value custom field that gets its
 valid values from some SQL query, rather than build the list manually?


In RT 3.8, have a look at lib/RT/CustomFieldValues/External.pm (And
Groups.pm for an example of its use)

 
 Thanks
 
 --
 Mathieu Longtin
 1-514-803-8977

 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: [EMAIL PROTECTED]
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] custom field value from arbitrary SQL select

2008-09-17 Thread Mathieu Longtin
Thanks, that looks exactly like what I wanted.

--
Mathieu Longtin
1-514-803-8977


On Wed, Sep 17, 2008 at 10:39 AM, Jesse Vincent [EMAIL PROTECTED]wrote:




 On Wed, Sep 17, 2008 at 10:19:06AM -0400, Mathieu Longtin wrote:
  Is there a way to create a select one value custom field that gets its
  valid values from some SQL query, rather than build the list manually?


 In RT 3.8, have a look at lib/RT/CustomFieldValues/External.pm (And
 Groups.pm for an example of its use)

 
  Thanks
 
  --
  Mathieu Longtin
  1-514-803-8977

  ___
  http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
  Community help: http://wiki.bestpractical.com
  Commercial support: [EMAIL PROTECTED]
 
 
  Discover RT's hidden secrets with RT Essentials from O'Reilly Media.
  Buy a copy at http://rtbook.bestpractical.com

 --

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] custom field value from arbitrary SQL select

2008-09-17 Thread Emmanuel Lacour
On Wed, Sep 17, 2008 at 10:39:25AM -0400, Jesse Vincent wrote:
 
 
 
 On Wed, Sep 17, 2008 at 10:19:06AM -0400, Mathieu Longtin wrote:
  Is there a way to create a select one value custom field that gets its
  valid values from some SQL query, rather than build the list manually?
 
 
 In RT 3.8, have a look at lib/RT/CustomFieldValues/External.pm (And
 Groups.pm for an example of its use)
 

Also perldoc docs/creating_external_custom_fields.pod to understand
how to enable your new CFV source.

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] Combobox broken in IE?

2008-09-17 Thread Jesse Vincent



On Wed, Sep 17, 2008 at 04:59:33PM +0200, Hoogstraten, Ton wrote:
 HI,
 
  
 
 In RT 3.6.6 if I have an custom field with a combobox the box does not
 display properly with IE. Anybody know what is causing this and how to
 resolve it? Firefox does not have this problem. Only IE 7 as I tested. I
 think it has something to do with the 3.6 theme. The rt 3.8 theme does
 not have this problem and is displaying the field properly. Only problem
 is that my production server is still at 3.6 at this stage L
 

That's definitely something I spent a bunch of time improving for RT 3.8

  
 
 Regards,
 
  
 
 Ton
 

 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: [EMAIL PROTECTED]
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] Combobox broken in IE?

2008-09-17 Thread Emmanuel Lacour
On Wed, Sep 17, 2008 at 04:59:33PM +0200, Hoogstraten, Ton wrote:
 HI,
 
  
 
 In RT 3.6.6 if I have an custom field with a combobox the box does not
 display properly with IE. Anybody know what is causing this and how to
 resolve it? Firefox does not have this problem. Only IE 7 as I tested. I
 think it has something to do with the 3.6 theme. The rt 3.8 theme does
 not have this problem and is displaying the field properly. Only problem
 is that my production server is still at 3.6 at this stage L
 
  

Should be fixed in 3.6.7, if you can't upgrade, just take the css file
to fix this.

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] Disable fulltext search on simple search

2008-09-17 Thread Paulo Filipe Andrade
Here is another vote for that patch!

On Sep 11, 2008, at 4:32 PM, Kenneth Marshall wrote:

 Currently, the wiki
 has a patch for Oracle and we will be submiting a similar patch for
 use with PostgreSQL 8.3 and later.

Paulo F. Andrade
[EMAIL PROTECTED]




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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] Performance problems with 3.8.1

2008-09-17 Thread Jesse Vincent


On Sep 17, 2008, at 6:13 AM, Sahlberg Mauri wrote:


Hi,

Just upgraded from 3.6 to 3.8.1 (via 3.8) and at the same time moved  
the database to it’s own server. We also removed all closed tickets  
from the database. The move and upgrade was done as our old  
installation got too slow. Unfortunately the new installation is  
also very slow despite the ticket removal and dedicated database  
server. Especially search building view and ticket view take time to  
open.


So, _what_ is slow and _how_ slow is it?

Also, what can you tell us about your hardware specs?

I've worked with users for whom slow was 1.2s to load RT's  
homepage and with users for whom slow was 10 minutes to load a  
ticket page. It used to be five and that was ok. but 10 is too long.___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] Performance problems with 3.8.1 [firefox and rounded corners]

2008-09-17 Thread Jesse Vincent

On Sep 17, 2008, at 7:01 AM, Sven Sternberger wrote:

 try if it is faster with MS IE, firefox has problems
 with the new CSS

As far as we can figure it out, the issue you're referring to is  
pretty rare. A very few Linux+Firefox+X Server combinations run into  
trouble with the rounded corners. Any brilliant discoveries would be  
hugely appreciated.

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] scrips/template issue

2008-09-17 Thread Kenneth Crocker
Robert,


Here is a template we use and it works fine. It includes different 
ticket data so you will have an example of the kind of things you can 
do. Remember the blank line after the Header (Subject line):

Subject: Request Titled: {$Ticket-Subject} has been Resolved!

This ticket has been resolved. DO NOT REPLY to this message!
-
TICKET INFORMATION:
Queue  : {$Ticket-QueueObj-Name}
Number : {$Ticket-Id}
Subject: {$Ticket-Subject}
Priority is: {$Ticket-Priority}
Requestor  : {$Ticket-Requestors-UserMembersObj-First-Name}
Created  by: {$Ticket-CreatorObj-Name}
Created  on: {substr($Ticket-Created, 0, 10)}
Ownedby: {$Ticket-OwnerObj-Name}
Development Started on: {substr($Ticket-Started, 0, 10)}
-
Description of Issue:
  {$Ticket-FirstCustomFieldValue('Description')}

-
Resolution comment:
  {
   my $Resolution_Comment;
   my $Transactions;
   my $CommentObj;

   $Transactions = $Ticket-Transactions;
   $Transactions-Limit( FIELD = 'Type', VALUE = 'Comment' );
   $Transactions-OrderByCols(
   { FIELD = 'Created',  ORDER = 'DESC' },
   { FIELD = 'id', ORDER = 'DESC' },
   );

   $CommentObj = $Transactions-First;

   if  ($CommentObj  $CommentObj-id)
   {
$Resolution_Comment = $CommentObj-Content;
   }
   else
   {
$Resolution_Comment = No comment.
   }

   return $Resolution_Comment;
  }
-
To view ticket information, enter URL:

 {$RT::WebURL}Ticket/Display.html?id={$Ticket-id}


Hope this helps.


Kenn
LBNL

On 9/16/2008 10:54 AM, Robert Keidel wrote:
 Hello,
 
 I have an issue with the scrip/template on resolve. I changed the 
 original template of that scrip with a template I wanted to use. 
 Unfortunately it did not work, it did not send out an email on 
 resolve. So I went back to the template what worked before just fine, 
 but RT is still not sending out any email when I resolve a ticket. What 
 did I do wrong? I hope you guys understand what I try to explain here. I 
 also tried to enable logging in RT_SiteConfig.pm to see what is going 
 on, but that did not work either. I am running on Ubuntu 8.04 server; 
 mysql5; apache2; fastcgi and the RT version is 3.6.6. http://3.6.6. 
 Thank you for any clue you can give me.
 
 The scrip and template:
 
 Description: empty
 Condition: On Resolve
 Action: Notify Requestors
 Template: Global template: Resolved
 Stage: TransactionCreate
 
 The template:
 Name: Resolved
 Description: Ticket Resolved
 Content:
 Your request has been completed 
 If you have any further questions or concerns, please respond to this 
 message.
 
 The IT Service Team
 
 
 
 
 Robert Keidel
 
 IRIS International
 9158 Eton Ave
 Chatsworth, CA 91311
 818-709-1244 x 7353
 
 
 
 
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: [EMAIL PROTECTED]
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


[rt-users] can't change a user's email address

2008-09-17 Thread Gary Wilson Jr.
In the user configuration, I'm trying to update a user's email address 
that has a typo.  I correct the email address and click 'Save Changes', 
but the email address does not update.  I do, however, get presented a 
'Results' box that reads:

User sobrien: 0 hours

When I try adding an email address to a user that has no defined email 
address already, I get the same error.

Anyone know what's going on here?  I've tried changing a few other 
fields (Real Name, Nickname, etc.) and those update fine.

I'm using RT 3.6.1.

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


[rt-users] On Correspond Notify Ccs if no owner

2008-09-17 Thread Lamers, Dan
Hello all,
 
On occasion we receive tickets which are not immediately taken by a staff
member.  While unowned, the requestor can send additional correspondence on
the ticket, but there is no indication anywhere that information has been
added.  I'd like to e-mail all of the queue watchers (Ccs) with the new
correspondence as long as the ticket remains unowned.
 
Any ideas?
 
Thanks,
Dan


DISCLAIMER: The information in this message is confidential and may be
legally privileged. It is intended solely for the addressee.  Access to this
message by anyone else is unauthorized.  If you are not the intended
recipient, any disclosure, copying, or distribution of the message, or any
action or omission taken by you in reliance on it, is prohibited and may be
unlawful.  Please immediately contact the sender if you have received this
message in error. Thank you. 


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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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


Re: [rt-users] RT::Authen::ExternalAuth insall issue on RT3.8.0

2008-09-17 Thread David Kirk
Helmuth's suggestion helped, once I figured out you have to fill in the 
disabled filter option in the RT_SiteConfig.pm for the LDAP settings.

I set it to:
'd_filter'  =  '((objectCategory=person)(objectClass=user) 
(userAccountControl:1.2.840.113556.1.4.803:=2))',

(For Microsoft Active Directory's disabled users)


  David J Kirk

  System Administrator
  Center 7

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] scrips/template issue

2008-09-17 Thread Robert Keidel
Hi Ken,

thank you for that example. I was looking for something like that. I was
wandering how I could include some of the fields you have listed in your
example. Again thanks to everyone for the fast help.

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

[rt-users] Simple Search Problem

2008-09-17 Thread Smith, Cameron J
Hello all,

 

Running 3.6.5 here with MySQL 5.0.38.

 

We have multiple queues and multiple groups - generally there's a 1:1
relationship between user group and queue.  For instance GroupA has the
following permissions set for QueueA :

 

CommentOnTicket

DeleteTicket

ModifyTicket

OwnTicket

ReplyToTicket

SeeQueue

ShowOutgoingEmail

ShowTicket

ShowTicketComments

StealTicket

TakeTicket

 

Our Everyone role has :

 

CommentOnTicket

CreateTicket

ReplyToTicket

 

GroupB:QueueB has the same permissions as GroupA:QueueA above ... so on
and so forth.

 

Question : When a user in GroupB searches for a term like test a total
of 43 results appear, but only 4 are visible to that user.  In some
instances, this is causing pagination problems whereby a user must
scroll through pages of empty results (showing something like Found 437
tickets in the results header) to finally arrive at a page that
contains a result that he can see.  Has anyone else encountered this
problem - have I set the permissions incorrectly - is there  a patch -
any recommendations?

 

Thanks!

 

Cameron

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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

Re: [rt-users] On Correspond Notify Ccs if no owner

2008-09-17 Thread Kenneth Crocker
Dan,


Create a scrip that specifies User-Defined for the condition and in 
that condition check to see if there is correspondence and if the ticket 
owner = Nobody. Return 1 if true and for action, notify CC's and set up 
a template.


Kenn
LBNL

On 9/17/2008 1:20 PM, Lamers, Dan wrote:
 Hello all,
  
 On occasion we receive tickets which are not immediately taken by a staff
 member.  While unowned, the requestor can send additional correspondence on
 the ticket, but there is no indication anywhere that information has been
 added.  I'd like to e-mail all of the queue watchers (Ccs) with the new
 correspondence as long as the ticket remains unowned.
  
 Any ideas?
  
 Thanks,
 Dan
 
 
 DISCLAIMER: The information in this message is confidential and may be
 legally privileged. It is intended solely for the addressee.  Access to this
 message by anyone else is unauthorized.  If you are not the intended
 recipient, any disclosure, copying, or distribution of the message, or any
 action or omission taken by you in reliance on it, is prohibited and may be
 unlawful.  Please immediately contact the sender if you have received this
 message in error. Thank you. 
 
 
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: [EMAIL PROTECTED]
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com
 

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

Community help: http://wiki.bestpractical.com
Commercial support: [EMAIL PROTECTED]


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