Re: [rt-users] A few small changes I'd like to make to our RT....

2009-10-23 Thread Natxo Asenjo
On Fri, Oct 23, 2009 at 12:36 AM, Gary Greene
ggre...@minervanetworks.comwrote:

 On 10/22/09 3:04 PM, Jerrad Pierce jpie...@cambridgeenergyalliance.org
 wrote:
  The thing here is that the interface is presenting far too much
 information
  for my users (both admin and self service UIs), thus why I'm trying to
  I'd recommend just getting used to it.

 If I had to just get used to it as you put it, we'd never move over to
 using RT. The corporate culture here is very non-forgiving of IT if we
 don't
 give them exactly what they want. Thankfully, I've managed to do everything
 I want with only a couple of small items left on my plate for testing with
 more users here.


Bestpractical has consultants that can help you streamline your RT
installation to your users' wishes:
http://bestpractical.com/services/development.html

I mean, it's open source, but it does not have to cost zero, does it? Other
solutions cost a lot and you don't even get the chance to change the
functionality.

That is the typical solution for other software solution in environments
like yours anyway, I am surprised I even have to point it to you :-)

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

[rt-users] RT-IR IP lookup slow

2009-10-23 Thread Laas Toom

Hello!

We have RT with ca 50 000 tickets in it, which, I think,  has been  
running since 3.2 and upgraded lately to 3.8.5. After that I added RT- 
IR to it and everything seems to be fine except the Lookup IP query.  
First of all it takes ages. MySQL slow log reports query_time in order  
of 500 to 800 seconds and rows examined 3 to 4 millions.


And after I wait through it I get irrelevant data - Incident Reports  
and Incidents, which do not have this IP nowhere in them.


Before I upgraded the RT and installed RTIR to it, I copied the whole  
database for testing (that means all the same content in it except  
newer tickets) and played around with RTIR a bit. I did not notice the  
slowness in the test database and IIRC the virgin production RTIR was  
fast also. But search results were irrelevant in test too (though at  
the time I hoped it was my testing that messed things up). And lookup  
in the production DB seems to grow slower with every Incident Report  
added.


Can somebody take a look at this query (taken from slow log) if this  
seems correct and why does RT join ObjectCustomFieldValues to itself 4  
times and perform WHERE lookup on different fields in all of them.


Below are the query and it's explain from phpMyAdmin.

Best,
Laas


SELECT DISTINCT main.* FROM Tickets main JOIN ObjectCustomFieldValues  
ObjectCustomFieldValues_3  ON ( ObjectCustomFieldValues_3.CustomField  
= '14' ) AND ( ObjectCustomFieldValues_3.Disabled = '0' ) AND  
( ObjectCustomFieldValues_3.ObjectType = 'RT::Ticket' ) AND (
ObjectCustomFieldValues_3.ObjectId = main.id ) JOIN  
ObjectCustomFieldValues ObjectCustomFieldValues_4  ON  
( ObjectCustomFieldValues_4.Disabled = '0' ) AND  
( ObjectCustomFieldValues_4.ObjectType = 'RT::Ticket' ) AND  
( ObjectCustomFieldValues_4.CustomField = '14' )
AND ( ObjectCustomFieldValues_4.ObjectId = main.id ) JOIN  
ObjectCustomFieldValues ObjectCustomFieldValues_1  ON  
( ObjectCustomFieldValues_1.CustomField = '14' ) AND  
( ObjectCustomFieldValues_1.ObjectType = 'RT::Ticket' ) AND  
( ObjectCustomFieldValues_1.Disabled =
'0' ) AND ( ObjectCustomFieldValues_1.ObjectId = main.id ) JOIN  
Transactions Transactions_5  ON ( Transactions_5.ObjectId = main.id
) JOIN ObjectCustomFieldValues ObjectCustomFieldValues_2  ON  
( ObjectCustomFieldValues_2.Disabled = '0' ) AND  
( ObjectCustomFieldValues_2.ObjectId = main.id ) AND  
( ObjectCustomFieldValues_2.ObjectType = 'RT::Ticket' ) AND  
( ObjectCustomFieldValues_2.CustomField =
 '14' )  WHERE (main.Status != 'deleted') AND  
(Transactions_5.ObjectType = 'RT::Ticket') AND  
( (  (  (  (  ( ObjectCustomFieldValues_1.Content = '193.040.010.218'  
OR  (  ( ObjectCustomFieldValues_1.Content = '' OR  
ObjectCustomFieldValues_1.Content IS NULL )  AND
ObjectCustomFieldValues_1.LargeContent =  
'193.040.010.218' )  )  )  )  AND   
(  (  ( ObjectCustomFieldValues_2.LargeContent =  
'193.040.010.218' )  )  )  AND   
(  (  ( ObjectCustomFieldValues_3.Content = '000.000.000.000' OR   
(  ( ObjectCustomFieldValues_3.Content
 = '' OR ObjectCustomFieldValues_3.Content IS NULL )  AND  
ObjectCustomFieldValues_3.LargeContent =  
'000.000.000.000' )  )  )  )  AND   
(  (  ( ObjectCustomFieldValues_4.LargeContent =  
'255.255.255.255' )  )  )  )  )  AND  ( Transactions_5.Created   
'2009-08-08 10:56:21' ) ) AND (main.Type = 'ticket') AND  
(main.EffectiveId = main.id)


id  select_type table   typepossible_keys   key key_len ref 
rowsExtra
1	SIMPLE	ObjectCustomFieldValues_1	ref	 
TicketCustomFieldValues1,TicketCustomFieldValues2,...	 
ObjectCustomFieldValues3	263	const,const,const	3832	Using where; Using  
temporary
1	SIMPLE	ObjectCustomFieldValues_3	ref	 
TicketCustomFieldValues1,TicketCustomFieldValues2,...	 
TicketCustomFieldValues1	8	 
const,rt3.ObjectCustomFieldValues_1.ObjectId	1	Using where
1	SIMPLE	ObjectCustomFieldValues_4	ref	 
TicketCustomFieldValues1,TicketCustomFieldValues2,...	 
TicketCustomFieldValues1	8	 
const,rt3.ObjectCustomFieldValues_1.ObjectId	1	Using where
1	SIMPLE	ObjectCustomFieldValues_2	ref	 
TicketCustomFieldValues1,TicketCustomFieldValues2,...	 
TicketCustomFieldValues1	8	 
const,rt3.ObjectCustomFieldValues_1.ObjectId	1	Using where
1	SIMPLE	main	eq_ref	PRIMARY,Tickets3,Tickets4,Tickets5,Tickets6	 
PRIMARY	4	rt3.ObjectCustomFieldValues_2.ObjectId	1	Using where
1	SIMPLE	Transactions_5	ref	Transactions1	Transactions1	70	 
const,rt3.ObjectCustomFieldValues_1.ObjectId	1	Using where; Distinct


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

[rt-users] 3.8.x serious security issue with mixing sessions

2009-10-23 Thread Arkadiusz Miskiewicz

I have a very serious security problem with 3.8 installation (3.8.6 
currently). 

Logged User sessions are being mixed up. One logged user is becoming another 
logged user as seen by rt. It happens in different moments. 

For example I'm user A and after clicking to view some ticket I become user B. 

Or I'm logged in into user A but suddently I get monit about need to log in 
and after loging in with user A data I'm becoming user C (in this case 
Successful login for .. isn't logged into logs).

Tried using default settings (session keept in mysql) but also 
Apache::Session::File. Problem happens in both cases. I'm using mod_perl to 
run rt.

Happens with different browsers, firefox, opera.

Any ideas on how to debug it?

perl packages are in fresh versions:

apache-mod_perl-2.0.4-3.i686   
openssl-tools-perl-0.9.8k-2.i686   
perl-AI-DecisionTree-0.08-2.i686   
perl-AnyData-0.10-4.noarch 
perl-Apache-DBI-1.06-1.noarch  
perl-Apache-Scoreboard-2.08-7.i686 
perl-Apache-Session-1.88-1.noarch  
perl-Apache-Session-Wrapper-0.33-1.noarch
perl-Apache-VMonitor-2.06-1.noarch   
perl-AppConfig-1.66-1.noarch 
perl-Authen-SASL-2.13-1.noarch   
perl-base-5.10.1-2.i686  
perl-Bit-Vector-7.1-1.i686   
perl-BSD-Resource-1.2901-2.i686  
perl-Cache-DB_File-0.2-7.noarch  
perl-Cache-Simple-TimedExpiry-0.27-1.noarch
perl-Calendar-Simple-1.19-1.noarch 
perl-Carp-Assert-0.20-2.noarch 
perl-Carp-Assert-More-1.12-3.noarch
perl-Carp-Clan-6.00-1.noarch   
perl-CGI-3.48-1.noarch 
perl-CGI-LogCarp-1.12-10.noarch
perl-CGI-SpeedyCGI-2.22-15.i686
perl-Chart-PNGgraph-1.21-7.noarch  
perl-Class-Accessor-0.34-1.noarch  
perl-Class-Accessor-Chained-0.01-2.noarch  
perl-Class-Container-0.12-2.noarch 
perl-Class-Data-Inheritable-0.08-1.noarch  
perl-Class-Inspector-1.24-1.noarch 
perl-Class-MakeMethods-1.01-2.noarch   
perl-Class-MethodMaker-2.11-2.i686 
perl-Class-MixinFactory-0.92-2.noarch  
perl-Class-ReturnValue-0.55-1.noarch   
perl-Class-Singleton-1.4-1.noarch  
perl-Clone-0.31-1.i686 
perl-Config-Tiny-2.12-2.noarch 
perl-Convert-ASN1-0.21-2.noarch
perl-Convert-Recode-1.04-2.noarch  
perl-CSS-Squish-0.07-1.noarch  
perl-Curses-1.26-2.i686
perl-Curses-Forms-1.997-1.noarch   
perl-Curses-Widgets-1.997-5.noarch 
perl-Data-Flow-0.09-3.noarch   
perl-Data-ICal-0.13-5.noarch   
perl-Data-Library-0.1-1.noarch 
perl-Date-Calc-6.0-1.i686  
perl-DateTime-0.50-1.i686  
perl-DateTime-Event-ICal-0.09-2.noarch 
perl-DateTime-Event-Recurrence-0.16-4.noarch
perl-DateTime-Format-ICal-0.09-1.noarch 
perl-DateTime-Format-Mail-0.3001-1.noarch   
perl-DateTime-Format-Strptime-1.0701-1.noarch
perl-DateTime-Format-W3CDTF-0.04-1.noarch
perl-DateTime-Locale-0.44-1.noarch   
perl-DateTime-Set-0.25-3.noarch  
perl-DateTime-TimeZone-0.72-1.noarch 
perl-DBD-AnyData-0.09-1.noarch   
perl-DBD-Chart-0.82-2.noarch 
perl-DBD-CSV-0.22-3.noarch   
perl-DBD-LDAP-0.10-1.i686
perl-DBD-mysql-4.013-1.i686  
perl-DBD-ODBC-1.23-1.i686
perl-DBD-Pg-2.15.1-3.i686
perl-DBD-SQLite-1.25-1.i686  
perl-DBD-Sybase-1.09-2.i686  
perl-DBD-XBase-0.241-3.noarch
perl-DB_File-1.820-2.i686
perl-DBI-1.608-1.i686
perl-DBI-ProfileDumper-Apache-1.608-1.i686   
perl-DBIx-Abstract-1.006-2.noarch
perl-DBIx-AbstractLite-0.02-5.noarch 
perl-DBIx-AnyDBD-2.01-4.noarch   
perl-DBIx-BLOB-Handle-0.2-6.noarch   
perl-DBIx-CGI-0.06-9.noarch  
perl-DBIx-ContextualFetch-1.03-2.noarch  
perl-DBIx-Copy-0.02-5.noarch 
perl-DBIx-Cursor-0.14-4.noarch   
perl-DBIx-DataLookup-0.03-5.noarch   
perl-DBIx-DataSource-0.02-5.noarch   
perl-DBIx-DBSchema-0.36-1.noarch 
perl-DBIx-Easy-1.40-2.noarch 
perl-DBIx-FetchLoop-0.41-1.noarch
perl-DBIx-HTMLView-0.9-7.noarch  
perl-DBIx-Librarian-0.6-2.noarch 
perl-DBIx-Recordset-0.26-2.noarch
perl-DBIx-SearchBuilder-1.56-1.noarch
perl-DBIx-SQLEngine-0.93-3.noarch
perl-DBIx-Table-0.04-5.noarch
perl-DBIx-TableHash-1.04-4.noarch
perl-DBIx-TextIndex-0.27-2.i686  
perl-DBIx-XML_RDB-0.05-8.noarch  
perl-devel-5.10.1-2.i686 
perl-Devel-StackTrace-1.22-1.noarch  
perl-Devel-Symdump-2.0602-2.noarch   
perl-Digest-HMAC-1.01-12.noarch  

[rt-users] Searching on CF's not working with RT3.8.6

2009-10-23 Thread Alex Young
We have just upgraded from 3.8.2 to 3.8.6 and everything has been fine,
but we have ran into our first problem; when searching on custom fields
it's ignoring the CF and returning all results.

 

This is one of the searches we are trying:

Queue = 'Client Support' AND Subject LIKE 'schedule' AND 'CF.{Client}'
LIKE 'ClientName' AND 'CF.{Client category}' LIKE 'Core Client'

 

Have also tried similar searches without the category. It just returns
all results from the Client support queue with schedule in the subject.

 

I have just gone through the UPGRADE docs again, and I'm not seeing any
steps I could have missed, so what's happened?

 

Thanks,

Alex

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Re: [rt-users] RT-Users Digest, Vol 67, Issue 53

2009-10-23 Thread Martyn Haynes
Hi,

We have RT 3.6.6 running which for some unknown reason has stopped
sending replies via email.  Auto responders are working but replies
are added (and can be viewed via RT) but not emailed out.   We're not
aware of any configuration change that may have caused this.

Does anyone have any idea on where to start to debug this issue?

any help much appreciated.
Martyn
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


[rt-users] incoming mail lost after possible httpd crash

2009-10-23 Thread Marcus Better
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hi,

today we almost lost an incoming e-mail that was processed by rt-mailgate 
but never appeared in RT as a ticket. The only thing I can see in the web 
server logs around the time of the event is the following line:

[Fri Oct 23 08:41:31 2009] [notice] child pid 21284 exit signal Segmentation 
fault (11)

So it looks like the Apache process crashed, and the ticket was never 
created. We only noticed because we copy all mail to another mailbox for 
manual inspection.

Now my questions:

* How can I avoid future web server crashes, or at least get better 
diagnostics when it happens?

* Can rt-mailgate be configured not to drop the mail on the floor if the 
reception fails? I would like the mail delivery to be retried by the mail 
system.

System details: RT 3.8.5 installed from the Debian package (request-
tracker3.8 3.8.5-1), Debian amd64, 4 GB RAM, Apache 2.2.9-10+lenny4 with 
prefork mpm and mod-perl2 2.0.4.

Cheers,

Marcus
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.10 (GNU/Linux)

iEYEARECAAYFAkrhpywACgkQXjXn6TzcAQmGYQCfXRWvQXnU57FrIH3OYVSN5ll0
KN0AoPl73tg1pmlww8dhnOgudQ6a2t/j
=o5Zs
-END PGP SIGNATURE-


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


[rt-users] RT::Date used date::parse to make 1970-01-01

2009-10-23 Thread Mauricio Tavares
I am finding a lot of those entries in my log:

Oct 23 11:40:58 tickets fetchmail[18602]: awakened at Fri 23 Oct 2009
11:40:58 AM EDT
Oct 23 11:40:58 tickets fetchmail[18602]: sleeping at Fri 23 Oct 2009
11:40:58 AM EDT for 90 seconds
Oct 23 11:41:49 tickets RT: RT::Date used date::parse to make 1970-01-01
18000
Oct 23 11:42:29 tickets fetchmail[18602]: awakened at Fri 23 Oct 2009
11:42:29 AM EDT
Oct 23 11:42:29 tickets fetchmail[18602]: sleeping at Fri 23 Oct 2009
11:42:29 AM EDT for 90 seconds
Oct 23 11:42:51 tickets RT: RT::Date used date::parse to make 1970-01-01
18000
Oct 23 11:43:30 tickets RT: RT::Date used date::parse to make 1970-01-01
18000
Oct 23 11:43:59 tickets fetchmail[18602]: awakened at Fri 23 Oct 2009
11:43:59 AM EDT

What are they trying to tell me? That I forgot to setup something?

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] RT::Date used date::parse to make 1970-01-01

2009-10-23 Thread Jesse Vincent



On Fri, Oct 23, 2009 at 12:17:51PM -0400, Mauricio Tavares wrote:
   I am finding a lot of those entries in my log:
 
 Oct 23 11:41:49 tickets RT: RT::Date used date::parse to make 1970-01-01
 18000

Can you tell me what version of RT you're running?
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Searching on CF's not working with RT3.8.6

2009-10-23 Thread Jesse Vincent



On Fri, Oct 23, 2009 at 10:47:02AM +0100, Alex Young wrote:
 We have just upgraded from 3.8.2 to 3.8.6 and everything has been fine,
 but we have ran into our first problem; when searching on custom fields
 it's ignoring the CF and returning all results.
 
  
 
 This is one of the searches we are trying:
 
 Queue = 'Client Support' AND Subject LIKE 'schedule' AND 'CF.{Client}'
 LIKE 'ClientName' AND 'CF.{Client category}' LIKE 'Core Client'


Can you turn on database logging and capture the SQL RT is generating?
(In an ideal world, you could also bring up a copy of your old 3.8.2
instance and do the same thing, but I understand how hard that is)

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Searching on CF's not working with RT3.8.6

2009-10-23 Thread Jerrad Pierce
 We have just upgraded from 3.8.2 to 3.8.6 and everything has been fine, but
 we have ran into our first problem; when searching on custom fields it’s
 ignoring the CF and returning all results.
Works for me, although I've not run the upgrade scripts yet since I
have a 3.8.6
running concurrently with 3.8.1 for testing.

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] 3.8.x serious security issue with mixing sessions

2009-10-23 Thread Jesse Vincent



On Fri, Oct 23, 2009 at 11:24:01AM +0200, Arkadiusz Miskiewicz wrote:
 
 I have a very serious security problem with 3.8 installation (3.8.6 
 currently). 
 
 Logged User sessions are being mixed up. One logged user is becoming another 
 logged user as seen by rt. It happens in different moments. 
 
 For example I'm user A and after clicking to view some ticket I become user 
 B. 
 
 Or I'm logged in into user A but suddently I get monit about need to log in 
 and after loging in with user A data I'm becoming user C (in this case 
 Successful login for .. isn't logged into logs).
 
 Tried using default settings (session keept in mysql) but also 
 Apache::Session::File. Problem happens in both cases. I'm using mod_perl to 
 run rt.

I don't think I've ever seen this wtih RT, but I have seen it with other 
applications
- the cause is _usually_ an HTTP proxy that's caching RT's pages. Do you
  have any sort of HTTP proxy between your browsers and your server?

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] RT-IR IP lookup slow

2009-10-23 Thread Jesse Vincent



On Fri, Oct 23, 2009 at 12:00:05PM +0300, Laas Toom wrote:
 Hello!
 
 We have RT with ca 50 000 tickets in it, which, I think,  has been  
 running since 3.2 and upgraded lately to 3.8.5. After that I added RT- 
 IR to it and everything seems to be fine except the Lookup IP query.  
 First of all it takes ages. MySQL slow log reports query_time in order  
 of 500 to 800 seconds and rows examined 3 to 4 millions.
 
 What sorts of tuning have you done to mysql to date?
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] Fun with CF order (3.8)

2009-10-23 Thread Jerrad Pierce
On Thu, Oct 22, 2009 at 12:57, Jerrad Pierce
jpie...@cambridgeenergyalliance.org wrote:
 On Thu, Oct 22, 2009 at 12:46, Ruslan Zakirov ruslan.zaki...@gmail.com 
 wrote:
 I believe there is a fix either in recent RT or DBIx::SB. Heavily
 depends on DB, RT and DBIx::SB versions combination, tricky SQL.
 I'm running the latest SearchBuilder (1.56), a somewhat stale RT
 (3.8.1, will upgrade to 3.8.6 after it's been out awhile) and unfortunately
 my distribution's older MySQL  (4.1.22)...
Problem persists in 3.8.6; updated codebase, have not yet upgraded db.

I'm not sure I understand how it's configuration dependent though,
when the UI provides
a mechanism for explicitly dictating the order of custom fields.
-- 
Cambridge Energy Alliance: Save money. Save the planet.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] CPAN's RT::Crypt::SMIME installation fails

2009-10-23 Thread Jesse Vincent



On Wed, Oct 21, 2009 at 07:08:12PM -0700, Behzad Mahini wrote:
 I have been forced to do a manual installation of RT::Crypt::SMIME (as  

For RT extensions, you're always going to have to do them manually 

 
 Results of Manual installation:
 
 
 1) Makefile.PL
 
 sudo ./RUN_rt_crypt_smime.sh
 Cannot determine perl version info from lib/RT/Crypt/SMIME.pm
 Using RT configuration from /ngs/app/rt/oppresso/rt-3.8.4/lib/RT.pm:
 ./etc = /ngs/app/rt/oppresso/rt-3.8.4/local/plugins/RT-Crypt-SMIME/etc
 ./html= /ngs/app/rt/oppresso/rt-3.8.4/local/plugins/RT-Crypt-SMIME/ 
 html
 ./lib = /ngs/app/rt/oppresso/rt-3.8.4/local/plugins/RT-Crypt-SMIME/lib
 For first-time installation, type 'make initdb'.
 Writing Makefile for RT::Crypt::SMIME
 
 2)make step
 
 sudo make
 Skip blib/lib/RT/Crypt/sign_and_encrypt.pl (unchanged)
 Skip blib/lib/RT/Crypt/SMIME.pm (unchanged)
 Skip blib/lib/RT/Interface/Email/Auth/SMIME.pm (unchanged)
 Skip blib/lib/RT/Interface/Email/Auth/StrictSMIME.pm (unchanged)
 Manifying blib/man3/RT::Interface::Email::Auth::StrictSMIME.3pm
 Manifying blib/man3/RT::Interface::Email::Auth::SMIME.3pm
 Manifying blib/man3/RT::Crypt::SMIME.3pm
 
 
 
 
 3) make test step
 ---
 

The test suite for RT::Crypt::SMIME is realy intended for a development
environment. It's unfortunate, but I wouldn't expect it to work on your
live RT instance. 

As a heads up, we last qualified it for a customer on 3.6. I don't know
for sure that it works on 3.8.  We could certainly bring it up to date
(or take a patch)

Best,
Jesse
 

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] RT-IR IP lookup slow

2009-10-23 Thread Ruslan Zakirov
Laas,
This SQL is too heavy and incorrect, RT 3.8.6 has a fix.

On Fri, Oct 23, 2009 at 1:00 PM, Laas Toom laas.t...@eenet.ee wrote:

 Hello!

 We have RT with ca 50 000 tickets in it, which, I think,  has been running
 since 3.2 and upgraded lately to 3.8.5. After that I added RT-IR to it and
 everything seems to be fine except the Lookup IP query. First of all it
 takes ages. MySQL slow log reports query_time in order of 500 to 800 seconds
 and rows examined 3 to 4 millions.

 And after I wait through it I get irrelevant data - Incident Reports and
 Incidents, which do not have this IP nowhere in them.

 Before I upgraded the RT and installed RTIR to it, I copied the whole
 database for testing (that means all the same content in it except newer
 tickets) and played around with RTIR a bit. I did not notice the slowness in
 the test database and IIRC the virgin production RTIR was fast also. But
 search results were irrelevant in test too (though at the time I hoped it
 was my testing that messed things up). And lookup in the production DB seems
 to grow slower with every Incident Report added.

 Can somebody take a look at this query (taken from slow log) if this seems
 correct and why does RT join ObjectCustomFieldValues to itself 4 times and
 perform WHERE lookup on different fields in all of them.

 Below are the query and it's explain from phpMyAdmin.

 Best,
 Laas


 SELECT DISTINCT main.* FROM Tickets main JOIN ObjectCustomFieldValues
 ObjectCustomFieldValues_3  ON ( ObjectCustomFieldValues_3.CustomField = '14'
 ) AND ( ObjectCustomFieldValues_3.Disabled = '0' ) AND (
 ObjectCustomFieldValues_3.ObjectType = 'RT::Ticket' ) AND (
 ObjectCustomFieldValues_3.ObjectId = main.id ) JOIN
 ObjectCustomFieldValues ObjectCustomFieldValues_4  ON (
 ObjectCustomFieldValues_4.Disabled = '0' ) AND (
 ObjectCustomFieldValues_4.ObjectType = 'RT::Ticket' ) AND (
 ObjectCustomFieldValues_4.CustomField = '14' )
 AND ( ObjectCustomFieldValues_4.ObjectId = main.id ) JOIN
 ObjectCustomFieldValues ObjectCustomFieldValues_1  ON (
 ObjectCustomFieldValues_1.CustomField = '14' ) AND (
 ObjectCustomFieldValues_1.ObjectType = 'RT::Ticket' ) AND (
 ObjectCustomFieldValues_1.Disabled =
 '0' ) AND ( ObjectCustomFieldValues_1.ObjectId = main.id ) JOIN
 Transactions Transactions_5  ON ( Transactions_5.ObjectId = main.id
 ) JOIN ObjectCustomFieldValues ObjectCustomFieldValues_2  ON (
 ObjectCustomFieldValues_2.Disabled = '0' ) AND (
 ObjectCustomFieldValues_2.ObjectId = main.id ) AND (
 ObjectCustomFieldValues_2.ObjectType = 'RT::Ticket' ) AND (
 ObjectCustomFieldValues_2.CustomField =
  '14' )  WHERE (main.Status != 'deleted') AND (Transactions_5.ObjectType =
 'RT::Ticket') AND ( (  (  (  (  ( ObjectCustomFieldValues_1.Content =
 '193.040.010.218' OR  (  ( ObjectCustomFieldValues_1.Content = '' OR
 ObjectCustomFieldValues_1.Content IS NULL )  AND
 ObjectCustomFieldValues_1.LargeContent = '193.040.010.218' )  )  )  )  AND
  (  (  ( ObjectCustomFieldValues_2.LargeContent = '193.040.010.218' )  )  )
  AND  (  (  ( ObjectCustomFieldValues_3.Content = '000.000.000.000' OR  (
  ( ObjectCustomFieldValues_3.Content
  = '' OR ObjectCustomFieldValues_3.Content IS NULL )  AND
 ObjectCustomFieldValues_3.LargeContent = '000.000.000.000' )  )  )  )  AND
  (  (  ( ObjectCustomFieldValues_4.LargeContent = '255.255.255.255' )  )  )
  )  )  AND  ( Transactions_5.Created  '2009-08-08 10:56:21' ) ) AND
 (main.Type = 'ticket') AND (main.EffectiveId = main.id)

 idselect_typetabletypepossible_keyskeykey_lenrefrowsExtra1SIMPLE
 ObjectCustomFieldValues_1ref
 TicketCustomFieldValues1,TicketCustomFieldValues2,...
 ObjectCustomFieldValues3263const,const,const3832Using where; Using
 temporary1SIMPLEObjectCustomFieldValues_3ref
 TicketCustomFieldValues1,TicketCustomFieldValues2,...
 TicketCustomFieldValues18const,rt3.ObjectCustomFieldValues_1.ObjectId1Using
 where1SIMPLEObjectCustomFieldValues_4ref
 TicketCustomFieldValues1,TicketCustomFieldValues2,...
 TicketCustomFieldValues18const,rt3.ObjectCustomFieldValues_1.ObjectId1Using
 where1SIMPLEObjectCustomFieldValues_2ref
 TicketCustomFieldValues1,TicketCustomFieldValues2,...
 TicketCustomFieldValues18const,rt3.ObjectCustomFieldValues_1.ObjectId1Using
 where1SIMPLEmaineq_refPRIMARY,Tickets3,Tickets4,Tickets5,Tickets6PRIMARY4
 rt3.ObjectCustomFieldValues_2.ObjectId1Using where1SIMPLETransactions_5ref
 Transactions1Transactions170const,rt3.ObjectCustomFieldValues_1.ObjectId1Using
 where; Distinct


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

 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com


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




-- 
Best regards, Ruslan.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com

Re: [rt-users] 3.8.x serious security issue with mixing sessions

2009-10-23 Thread Arkadiusz Miskiewicz
On Friday 23 of October 2009, Jesse Vincent wrote:
 On Fri, Oct 23, 2009 at 11:24:01AM +0200, Arkadiusz Miskiewicz wrote:
  I have a very serious security problem with 3.8 installation (3.8.6
  currently).
 
  Logged User sessions are being mixed up. One logged user is becoming
  another logged user as seen by rt. It happens in different moments.
 
  For example I'm user A and after clicking to view some ticket I become
  user B.
 
  Or I'm logged in into user A but suddently I get monit about need to log
  in and after loging in with user A data I'm becoming user C (in this case
  Successful login for .. isn't logged into logs).
 
  Tried using default settings (session keept in mysql) but also
  Apache::Session::File. Problem happens in both cases. I'm using mod_perl
  to run rt.
 
 I don't think I've ever seen this wtih RT, but I have seen it with other
  applications - the cause is _usually_ an HTTP proxy that's caching RT's
  pages. Do you have any sort of HTTP proxy between your browsers and your
  server?

No proxy. Also rt is served over https. The session is really changing user 
because when trying to do something that user A has access to I get permission 
denied due to B/C not having that access.

Something else is going on.

 -jesse

-- 
Arkadiusz MiśkiewiczPLD/Linux Team
arekm / maven.plhttp://ftp.pld-linux.org/
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Re: [rt-users] incoming mail lost after possible httpd crash

2009-10-23 Thread Jesse Vincent



 today we almost lost an incoming e-mail that was processed by rt-mailgate 
 but never appeared in RT as a ticket. The only thing I can see in the web 
 server logs around the time of the event is the following line:
 
 [Fri Oct 23 08:41:31 2009] [notice] child pid 21284 exit signal Segmentation 
 fault (11)
 
 So it looks like the Apache process crashed, and the ticket was never 
 created. We only noticed because we copy all mail to another mailbox for 
 manual inspection.
 
 Now my questions:
 
 * How can I avoid future web server crashes, or at least get better 
 diagnostics when it happens?

That's a segfault inside apache. Dealing with apache segfaults is...not
really RT specific. One option here is to switch to fastcgi. If RT is
making Perl crash, that's much more our problem and much easier for us
to track down and fix.

 * Can rt-mailgate be configured not to drop the mail on the floor if the 
 reception fails? I would like the mail delivery to be retried by the mail 
 system.

..it should already be doing this.  rt-mailgate only tells your MTA that
it has dealt successfully with a message after the server comes back and
says that it's written the message into the database.  Otherwise, it
will tell the MTA tempfail and the MTA will try again. 


 System details: RT 3.8.5 installed from the Debian package (request-
 tracker3.8 3.8.5-1), Debian amd64, 4 GB RAM, Apache 2.2.9-10+lenny4 with 
 prefork mpm and mod-perl2 2.0.4.


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] 3.8.x serious security issue with mixing sessions

2009-10-23 Thread Jesse Vincent

 No proxy. Also rt is served over https. The session is really changing user 
 because when trying to do something that user A has access to I get 
 permission 
 denied due to B/C not having that access.
 
 Something else is going on.

* Can you capture the cookies on User A, User B, and User C's systems
  for each HTTP hit to see if 1) they change and 2) they are the same?

  A tool like the firefox developer toolbar is an easy way to do this.

* Did this also happen with 3.8.5? There's a change to session handling in 
3.8.6.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] 3.8.x serious security issue with mixing sessions

2009-10-23 Thread Arkadiusz Miskiewicz
On Friday 23 of October 2009, Jesse Vincent wrote:
  No proxy. Also rt is served over https. The session is really changing
  user because when trying to do something that user A has access to I get
  permission denied due to B/C not having that access.
 
  Something else is going on.
 
 * Can you capture the cookies on User A, User B, and User C's systems
   for each HTTP hit to see if 1) they change and 2) they are the same?
 
   A tool like the firefox developer toolbar is an easy way to do this.

That will be hard to do but will try to get some info (in reality it happens 
here for different users which I don't control but it also happened for me and 
my coworker).

 * Did this also happen with 3.8.5? 

I had this in 3.6.6, whatever was current in march 2008, april 2008  (looking 
at irc logs on when I tried to get some help at #rt), 3.8.2 and now 3.8.6. 
Maybe other too, don't remember versions.

Note that the issue was gone for some time (3.8.5 for sure, 3.8.4, too afaik) 
but it's back after I upgraded to 3.8.6. I also upgraded system, so some perl* 
packages were updated, too.

Now why it was gone for some time it's unknown thing.

 There's a change to session handling in
  3.8.6.

Which git commit is that?

-- 
Arkadiusz MiśkiewiczPLD/Linux Team
arekm / maven.plhttp://ftp.pld-linux.org/
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Re: [rt-users] 3.8.x serious security issue with mixing sessions

2009-10-23 Thread Jerrad Pierce
   A tool like the firefox developer toolbar is an easy way to do this.
HTTPFox might be a good solution too. You can simply tell it to start tracking
as you use RT, and stop it once you encounter the problem. Examine the
results, debug, and or sanitize and share.

Everyone experiencing the problem doesn't have to install the add-on,
just someone who has the issue.
-- 
Cambridge Energy Alliance: Save money. Save the planet.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] 3.8.x serious security issue with mixing sessions

2009-10-23 Thread Matthew Keller
Arkadiusz Miskiewicz wrote:
 I have a very serious security problem with 3.8 installation (3.8.6 
 currently). 
 
 Logged User sessions are being mixed up. One logged user is becoming another 
 logged user as seen by rt. It happens in different moments. 

Are you using HTTP authentication or RT's built-in login page? If the 
former, it's likely a leaky apache process, squid or auth_cache problem 
(not RT); if the latter, then most likely a caching issue or possibly RT 
bug.

-- 
Matthew Keller
Information Security Officer
Computing  Technology Services
State University of New York @ Potsdam
Potsdam, NY, USA
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] 3.8.x serious security issue with mixing sessions

2009-10-23 Thread Jesse Vincent

 I had this in 3.6.6, whatever was current in march 2008, april 2008  (looking 
 at irc logs on when I tried to get some help at #rt), 3.8.2 and now 3.8.6. 
 Maybe other too, don't remember versions.
 
 Note that the issue was gone for some time (3.8.5 for sure, 3.8.4, too afaik) 
 but it's back after I upgraded to 3.8.6. I also upgraded system, so some 
 perl* 
 packages were updated, too.
 
 Now why it was gone for some time it's unknown thing.
 
  There's a change to session handling in
   3.8.6.
 
 Which git commit is that?

Far more than a single commit. We significantly overhauled all the logic
that used to be in the autohandler.

But, if this is something you've seen before and not a new issue, I'd
not point the finger at the refactoring just yet. 

Once you are logged in and see RT's home screen, does _your_ session
change as you refresh and become someone else?

How many RT instances do you have in this one apache?

Which of the apache multiprocess models are you using? Maybe there's
something weird going on with multithreading...

If you switch to fastcgi does this go away?

Are you using apache authentication with RT?

Can you send the contents of the Configuration-Global-Tools-System 
Configuration page?

Have you made any local changes?
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] CPAN's RT::Crypt::SMIME installation fails

2009-10-23 Thread Behzad Mahini


The test suite for RT::Crypt::SMIME is realy intended for a  
development
environment. It's unfortunate, but I wouldn't expect it to work on  
your

live RT instance.


So, if I do a force install and ignore the failing  tests, I should  
not have any worries about this module performing its functions  
properly (i.e., signing, encrypting/decrypting emails encapsulated in  
MIME, etc.)?


As a heads up, we last qualified it for a customer on 3.6. I don't  
know

for sure that it works on 3.8.  We could certainly bring it up to date
(or take a patch)


I would truly appreciate it if you would be able to update this module  
to work with RT 3.8, as we were hoping  to use SMIME features of RT.  
Incidentally, if this upgrade is not feasible, what do you suggest as  
an alternative?


Thanks  Regards,
Behzad



Best,
Jesse


--


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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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

Re: [rt-users] CPAN's RT::Crypt::SMIME installation fails

2009-10-23 Thread Jesse Vincent



On Fri, Oct 23, 2009 at 11:09:57AM -0700, Behzad Mahini wrote:
 
 The test suite for RT::Crypt::SMIME is realy intended for a  
 development
 environment. It's unfortunate, but I wouldn't expect it to work on  
 your
 live RT instance.
 
 So, if I do a force install and ignore the failing  tests, I should  
 not have any worries about this module performing its functions  
 properly (i.e., signing, encrypting/decrypting emails encapsulated in  
 MIME, etc.)?

Absent the caveats I mentioned in my previous message about having not
tested it at all on 3.8 and not knowing if it works, nope. 

 As a heads up, we last qualified it for a customer on 3.6. I don't  
 know
 for sure that it works on 3.8.  We could certainly bring it up to date
 (or take a patch)
 
 I would truly appreciate it if you would be able to update this module  
 to work with RT 3.8, as we were hoping  to use SMIME features of RT.  

Sure. Shoot sa...@bestpractical.com a note and I'll make sure that we
get an estimate of the work's cost to you out to you ASAP.

 Incidentally, if this upgrade is not feasible, what do you suggest as  
 an alternative?

The native PGP support in 3.8 might be an option.

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] RT : Apache Resource Usage

2009-10-23 Thread Jesse Vincent



On Thu, Oct 22, 2009 at 10:45:20AM +0530, Varun wrote:
 Hello All
 
  
 
 I have RT 3.6.3 with fast cgi implemented and apache 2.0 with 8GB of
 physical RAM. My problem is that after every 3 days my physical ram gets
 fully utilized and apache starts using swap memory. So my machine gets on
 its knees. I have no other application running on my machine where I have
 apache installed and no other process is using memory when I see in top
 command its just my 30 fastcgi processes takes significant amount of RAM i.e
 nearly 98% and I cant cut this 30 process to low level as by doing this,
 performance will degrade on concurrent request of RT users. Can any one
 suggest me how I can get best of both the worlds i.e giving good performance
 plus limiting memory consumption also. I have RHEL 4 and its kernel version
 is 2.6.9-42 

We've certainly done a fair bit of work on memory utilization in more
recent versions of RT. I know that recent 3.8 releases include fixes for
a number of memory leaks we've managed to track down.  30 concurrent
FastCGI processes suggests that you need to be able to handle 30 people
making requests of RT at exactly the same instant. If that's true,
you'll definitely want to come up to a more recent RT as there are a
fair number of performance improvements in addition to memory efficiency
improvements.

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] RT::Date used date::parse to make 1970-01-01

2009-10-23 Thread Mauricio Tavares
Jesse Vincent wrote:
 
 
 On Fri, Oct 23, 2009 at 12:17:51PM -0400, Mauricio Tavares wrote:
  I am finding a lot of those entries in my log:

 Oct 23 11:41:49 tickets RT: RT::Date used date::parse to make 1970-01-01
 18000
 
 Can you tell me what version of RT you're running?

Unfortunately still 3.6.7 (waiting on ubuntu 9.10 so I can do 3.8).
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] RT::Date used date::parse to make 1970-01-01

2009-10-23 Thread Jesse Vincent



On Fri, Oct 23, 2009 at 02:57:28PM -0400, Mauricio Tavares wrote:
 Jesse Vincent wrote:
  
  
  On Fri, Oct 23, 2009 at 12:17:51PM -0400, Mauricio Tavares wrote:
 I am finding a lot of those entries in my log:
 
  Oct 23 11:41:49 tickets RT: RT::Date used date::parse to make 1970-01-01
  18000
  
  Can you tell me what version of RT you're running?


Ah yes, change your LogToSyslog up from 'debug' to 'error' or so.

Best,

Jesse

 
   Unfortunately still 3.6.7 (waiting on ubuntu 9.10 so I can do 3.8).
 ___
 http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
 
 Community help: http://wiki.bestpractical.com
 Commercial support: sa...@bestpractical.com
 
 
 Discover RT's hidden secrets with RT Essentials from O'Reilly Media. 
 Buy a copy at http://rtbook.bestpractical.com
 

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] CustomField sort order with Global CustomFields

2009-10-23 Thread Jerrad Pierce
We recently updated from RT 3.6.4 to RT 3.8.1. Our users have noticed
that the order of CustomFields has changed on the Basics page. Prior to
upgrading, Global CustomFields were listed first with queue specific
ones listed next. It seems to be reversed now, with all the queue
specific fields being listed first and global CustomFields being listed
at the end.

Everything sorts correctly inside of its own list (ie, queue specific
fields sort correctly amongst themselves). I didn't see this after
searching the archive and I'm lost as to where to start looking for a
solution.

I just noticed the somewhat illogical placement myself*, it's specified
in RT::CustomFields_Overlay::LimitToGlobalOrObjectId. Change the order

$self-OrderByCols(
{ ALIAS = $self-_OCFAlias, FIELD = 'ObjectId', ORDER = 'DESC' },
{ ALIAS = $self-_OCFAlias, FIELD = 'SortOrder' },
);

to

$self-OrderByCols(
{ ALIAS = $self-_OCFAlias, FIELD = 'ObjectId', ORDER = 'ASC' },
{ ALIAS = $self-_OCFAlias, FIELD = 'SortOrder' },
);

in an overlay.

While there, you might simplify the body to remove the unnecessary $global_only

 sub LimitToGlobalOrObjectId {
my $self = shift;

foreach my $id (@_ ? @_ : 0 ) {
$self-Limit( ALIAS   = $self-_OCFAlias,
FIELD   = 'ObjectId',
OPERATOR= '=',
VALUE   = $id || 0,
ENTRYAGGREGATOR = 'OR' );
}


* After all, globals come first on the Queue Ticket Custom Fields page.
-- 
Cambridge Energy Alliance: Save money. Save the planet.
___
http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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


Re: [rt-users] CustomField sort order with Global CustomFields

2009-10-23 Thread Jerrad Pierce
 While there, you might simplify the body to remove the unnecessary 
 $global_only
Sorry, should have stuck with my original there:

my $self = shift;

$self-Limit( ALIAS   = $self-_OCFAlias,
  FIELD   = 'ObjectId',
  OPERATOR= '=',
  VALUE   = 0,
  ENTRYAGGREGATOR = 'OR' );

foreach my $id (@_) {
$self-Limit( ALIAS   = $self-_OCFAlias,
FIELD   = 'ObjectId',
OPERATOR= '=',
VALUE   = $id,
ENTRYAGGREGATOR = 'OR' );
}

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

Community help: http://wiki.bestpractical.com
Commercial support: sa...@bestpractical.com


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