Re: [rt-users] Urgent help on multi-stage approvals

2008-07-29 Thread Hong Fai Leong
Dear Jesse,

The setup only uses a single script and template. The setup works out of the
box as described in "RT Essentials".  In the  v3.6.3,  the  email to the
director  won't fire off until the manager approves his ticket. This was
achieved using the "Depends-On" directive in the director's template. In
3.6.7, both  manager and  director  will get the emails  as soon as the
approval  tickets are created.  The  director  won't be able to  resolve
his  ticket though  if the manager hasn't  approve his.  Any idea?


On Mon, Jul 28, 2008 at 9:19 PM, Jesse Vincent <[EMAIL PROTECTED]>
wrote:

>
> On Jul 28, 2008, at 2:41 AM, Hong Fai Leong wrote:
>
> Hi Jesse,
>
> Thanks for answering my mail.
>
> Here's my workflow setup. The idea here is to use the multi-stage approvals
> for the request which requires the manager approval before redirecting it to
> the director for approval.
>
> That basically looks right.  Which scrips fire when the ticket is created?
> When does the "notify the director" scrip fire?
>
>
> Templates:
>
> ===Create-Ticket: manager-endorsement
> Subject: Recruitment Request Endorsement::{$Tickets{'TOP'}->Subject}
> Depended-On-By: TOP
> Queue: ___Approvals
> Type: approval
> Owner: {
> return $Tickets{'TOP'}->FirstCustomFieldValue('Approving
> Requester/Manager Id');
> }
> Content: Manager endorsement is needed for this request.
> Please see the parent ticket for details.
> ENDOFCONTENT
>
> ===Create-Ticket: director-endorsement
> Subject: Recruitment Request Endorsement::{$Tickets{'TOP'}->Subject}
> Depends-On: manager-endorsement
> Depended-On-By: TOP
> Queue: ___Approvals
> Type: approval
> Owner: ccelhf
> Content: Director endorsement is needed for this request.
> Please see the parent ticket for details.
> ENDOFCONTENT
>
> Scrips:
>
> On Create, Create ticket with the above template.
>
>
> Hong-Fai
>
>
> On Sun, Jul 27, 2008 at 8:37 AM, Jesse Vincent <[EMAIL PROTECTED]>wrote:
>
>>
>> On Jul 24, 2008, at 9:51 PM, Hong Fai Leong wrote:
>>
>> I've followed the example in "RT Essentials" on configuring a multistage
>> approval. It worked beautifully in v3.6.3. It fails to work after I've
>> upgraded RT to v3.6.7.
>>
>> In 3.6.3, the second approver will only receive an email upon the first
>> approval resolution of the approving ticket.
>>
>> In 3.6.7, both approvers will receive emails at the same time.
>>
>> Can someone confirm this behaviour? I would really like to have back the
>> behaviour found in 3.6.3. Can anyone out there who can help me on this.
>> This is really important in what I'm going to do in my organization. Any
>> advice is much appreciated. Thanks.
>>
>>
>> With the information you've given us so far, it's fairly hard to debug. RT
>> 3.6.3 was..quite a long time ago and we've fixed a fair number of bugs. It
>> may well be the case that one of those fixes has unintended consequences.
>> If you can share your workflow configuration with the list, someone might be
>> able to spot something.
>>
>> Best,
>> Jesse Vincent
>> Best Practical
>>
>>
>>  ___
>> 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] New install of RT 3.8.0 - Another Logo Issue

2008-07-29 Thread Greg Petras
I guess I didn't search hard enough (well, specifically I did not search
rt-devel). Here's the solution to the problem:

http://lists.bestpractical.com/pipermail/rt-devel/2008-July/009967.html

Changed "header_out" to "headers_out->add" in /opt/rt3/share/html/dhandler
and that problem went away.

Greg

On Tue, Jul 29, 2008 at 2:17 PM, Greg Petras <[EMAIL PROTECTED]> wrote:

> I'm having a similar issue. I get the same exact error, after upgrading to
> 3.8.0 from 3.6.2. But, in my situation it comes up when I click the
> Statistics link. I don't see anything of use in rt.log, or Apache2's
> error_log.
>
> Anyone have ideas here? I searched the archives as well as the wiki and
> didn't see anything related. Any help would be appreciated.
>
> Thanks,
>
> Greg
>
>
> On Wed, Jul 16, 2008 at 5:43 AM, brokenshadows <[EMAIL PROTECTED]>wrote:
>
>>
>> I'm having the same issue.  I get that error when I try to go to
>> http://www.mywebaddress.com/rt/install/index.htm  When I go to
>> www.mywebaddress.com/rt I get the "You're almost there" message telling
>> me I
>> need to configure my server to use mod_perl, fastcgi, etc...
>>
>> this thing is giving me a headache...
>>
>>
>> Wayne Richardson wrote:
>> >
>> > When I attempt to access the logo directly at
>> > http://localhost/rt/NoAuth/images/bplogo.gif, I get this error:
>> > Can't locate object method "header_out" via package
>> > "Apache2::RequestRec" at /opt/rt3/share/html/dhandler line 53.
>> >
>> > Line 53 it is refering to:
>> > $r->header_out( Status => '404 File not found' );
>> >
>> > Mind you, this is a *brand* new OS installation, installed from
>> > source, perl modules installed, etc.  If I add PerlModule
>> > Apache2::compat into my apache2 config, it actually displays a
>> > "proper" 404, but is
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/New-install-of-RT-3.8.0---Another-Logo-Issue-tp1846p18486616.html
>> Sent from the Request Tracker - User mailing list archive at Nabble.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
>>
>
>
___
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] New install of RT 3.8.0 - Another Logo Issue

2008-07-29 Thread Greg Petras
I'm having a similar issue. I get the same exact error, after upgrading to
3.8.0 from 3.6.2. But, in my situation it comes up when I click the
Statistics link. I don't see anything of use in rt.log, or Apache2's
error_log.

Anyone have ideas here? I searched the archives as well as the wiki and
didn't see anything related. Any help would be appreciated.

Thanks,

Greg

On Wed, Jul 16, 2008 at 5:43 AM, brokenshadows <[EMAIL PROTECTED]>wrote:

>
> I'm having the same issue.  I get that error when I try to go to
> http://www.mywebaddress.com/rt/install/index.htm  When I go to
> www.mywebaddress.com/rt I get the "You're almost there" message telling me
> I
> need to configure my server to use mod_perl, fastcgi, etc...
>
> this thing is giving me a headache...
>
>
> Wayne Richardson wrote:
> >
> > When I attempt to access the logo directly at
> > http://localhost/rt/NoAuth/images/bplogo.gif, I get this error:
> > Can't locate object method "header_out" via package
> > "Apache2::RequestRec" at /opt/rt3/share/html/dhandler line 53.
> >
> > Line 53 it is refering to:
> > $r->header_out( Status => '404 File not found' );
> >
> > Mind you, this is a *brand* new OS installation, installed from
> > source, perl modules installed, etc.  If I add PerlModule
> > Apache2::compat into my apache2 config, it actually displays a
> > "proper" 404, but is
> >
>
> --
> View this message in context:
> http://www.nabble.com/New-install-of-RT-3.8.0---Another-Logo-Issue-tp1846p18486616.html
> Sent from the Request Tracker - User mailing list archive at Nabble.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
>
___
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 running slowly... Caused by RTx-Shredder indexes

2008-07-29 Thread Ruslan Zakirov
Known issue with mysql's optimizer. Either drop index or upgrade mysql
to 5.0.45 and newer. Mysql 5.1.x have some optmiser issues as well.

On Thu, May 22, 2008 at 10:08 AM, David Hobley
<[EMAIL PROTECTED]> wrote:
> All,
>
> I ran an explain on the query in MySQL and noticed that it was using one of
> the RTx-Shredder indexes. After I deleted all those indexes things went back
> to normal. Phew.
>
> In case this is useful:
>
> mysql> explain 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')
> AND ((ACL_4.ObjectType = 'RT::Queue') OR (ACL_4.ObjectType = 'RT::System'))
> AND ((Groups_3.Domain = 'RT::Queue-Role') OR (Groups_3.Domain =
> 'RT::System-Role')) ORDER BY main.Name ASC;
> ++-+--++--+---+-+-+---+--+
> | id | select_type | table| type   |
> possible_keys| key   | key_len |
> ref | rows  |
> Extra|
> ++-+--++--+---+-+-+---+--+
> |  1 | SIMPLE  | main | range  |
> PRIMARY  | PRIMARY   | 4   |
> NULL| 28920 | Using where; Using temporary; Using
> filesort |
> |  1 | SIMPLE  | Groups_3 | range  |
> PRIMARY,Groups1,Groups2  | Groups1   | 67  |
> NULL|   119 | Using where; Using index;
> Distinct   |
> |  1 | SIMPLE  | Principals_1 | eq_ref |
> PRIMARY  | PRIMARY   | 4   |
> rt3.main.id | 1 | Using where;
> Distinct|
> |  1 | SIMPLE  | CachedGroupMembers_2 | ref|
> DisGrouMem,SHREDDER_CGM1 | SHREDDER_CGM1 | 10  |
> rt3.main.id,rt3.Groups_3.id | 1 | Using where; Using index;
> Distinct   |
> |  1 | SIMPLE  | ACL_4| range  |
> ACL1 | ACL1  | 54  |
> NULL|45 | Using where; Using index;
> Distinct   |
> ++-+--++--+---+-+-+---+--+
>
> Cheers,
> David
> - Original Message -
> From: "David Hobley" <[EMAIL PROTECTED]>
> To: "rt-users" 
> Sent: Thursday, 22 May, 2008 3:30:21 PM GMT +10:00 Brisbane
> Subject: [rt-users] RT running slowly...
>
> Hello,
>
> Our RT has been running slowly for a while; having turned on mysql slow
> query logging, it appears to only be a single query which is causing grief.
> Anyone any suggestions as to what can be done to fix this?
>
> # Time: 080522 15:32:21
> # [EMAIL PROTECTED]: rt[rt] @ localhost []
> # Query_time: 40  Lock_time: 0  Rows_sent: 0  Rows_examined: 6888927
> 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') AND ((ACL_4.ObjectType =
> 'RT::Queue') OR (ACL_4.ObjectType = 'RT::System')) AND ((Groups_3.Domain =
> 'RT::Queue-Role') OR (Groups_3.Domain = 'RT::System-Role'))  ORDER BY
> main.Name ASC;
>
> --
> Cheers,
> David
>
> ___
> 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
>
> --
> Cheers,
> David Hobley
>
> IT Manager
> Creators of Miessence, MiVitality and MiEnviron
>
> Phone: +61 (7) 5582 7020
> Fax: +61 (7) 5539 6719
> USA Fax 1800 840 0827
> Email : [EMAIL PROTECTED]
> Website: www.mionegroup.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 se

Re: [rt-users] RIP tickets

2008-07-29 Thread Ruslan Zakirov
Use rt-crontool utility. Look for help about its actions in archives
and on the wiki.

On Mon, May 26, 2008 at 9:09 PM, Dominic Lepiane
<[EMAIL PROTECTED]> wrote:
> We don't want to remove the data from old tickets, so I don't think 
> RTx::Shredder will work in our case.
>
> We could try moving old tickets to an archive queue that doesn't email out 
> and preferrably doesn't allow closed tickets to be opened.  How can we go 
> about doing this?
>
> Thanks in advance,
>
> Dominic Lepiane
>
>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
>> Sent: Sunday, May 25, 2008 5:14 PM
>> To: RT Users
>> Cc: Dominic Lepiane
>> Subject: Re: [rt-users] RIP tickets
>>
>> How about moving all tickets of a certain age to a separate
>> (archive) queue which has reply to requestor scrips disabled.
>>
>> Gordon
>>
>>
>> Dominic Lepiane wrote:
>> > Hi,
>> >
>> > We've been using RT for many years now and an issue has
>> recently come to my attention regarding old tickets being
>> re-opened.  Specifically, when dealing with RMAs, we have
>> both an RT ticket number and an separate tracking number for
>> another system.  As it turns out, the RT ticket numbers are
>> all 5 digits these days (going on 6) and the other number is
>> 4 digits.  What happened was that by human error, the numbers
>> can be mixed up whereby an arbitrary and very old RT ticket
>> gets reopened when someone tries to update the RMA ticket.
>> Which is not a problem per se, support staff just close the
>> ticket again, however, RT then emails out this customer from
>> 5 years ago.
>> >
>> > So we were wondering if we can somehow catch emails
>> referring to very old closed tickets and do something else
>> with them.  Either email them to someone in particular, open
>> up a new ticket, drop them altogether or possibly find the
>> correct ticket based on the custom field which contains the
>> 4-digit ticket number from the other system.
>> >
>> > Can we do this and what are we looking at doing to do this?
>> >
>> > If nothing else, I would like to intercept all messages to
>> tickets < 1 and redirect those emails to a separate
>> mailbox which I can probably do in procmail (if my fu is strong).
>> >
>> > Thanks in advance
>> >
>> > Dominic Lepiane
>> > Network Administrator
>> > Point Grey Research
>>
>>
> ___
> 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] RT running slowly... Caused by RTx-Shredder

2008-07-29 Thread Ruslan Zakirov
It's know issue of mysql, here is reference to a description on
request-tracker.ru site http://request-tracker.ru/node/65 (in russian)

On Thu, May 29, 2008 at 1:14 AM, Boris Lytochkin
<[EMAIL PROTECTED]> wrote:
>
> After adding this key:
> ALTER TABLE CachedGroupMembers Add KEY `SHREDDER_CGM1` 
> (`GroupId`,`MemberId`,`Disabled`);
> - MemberId & GroupId swapped comparing to original SHREDDER_CGM1 - explain 
> (and query too :) ) is OK.
>
> mysql> explain extended SELECT DISTINCT main.* FROM Users main
> mysql>   CROSS JOIN ACL ACL_4
> mysql>   JOIN Principals Principals_1  ON ( Principals_1.id = main.id )
> mysql>   JOIN CachedGroupMembers CachedGroupMembers_2  ON ( 
> CachedGroupMembers_2.MemberId = Principals_1.id )
> mysql>   JOIN Groups Groups_3  ON ( Groups_3.id = 
> CachedGroupMembers_2.GroupId )
> mysql>WHERE (Principals_1.Disabled = '0') AND (ACL_4.PrincipalType = 
> Groups_3.Type)
> mysql> AND (Principals_1.id != '1')AND (Principals_1.PrincipalType = 
> 'User')
> mysql> AND (ACL_4.RightName = 'OwnTicket')AND (Groups_3.Domain = 
> 'RT::System-Role')
> mysql> AND ((ACL_4.ObjectType = 'RT::Ticket' AND ACL_4.ObjectId = 147792) 
> OR (ACL_4.ObjectType = 'RT::Queue' AND ACL_4.ObjectId = 10) OR 
> (ACL_4.ObjectType = 'RT::System'))
> mysql>ORDER BY main.Name ASC;
> ++-+--++--+---+-+--+---++
> | id | select_type | table| type   | possible_keys
> | key   | key_len | ref  | rows  | Extra  
> |
> ++-+--++--+---+-+--+---++
> |  1 | SIMPLE  | main | ALL| PRIMARY  
> | NULL  |NULL | NULL | 39464 | Using 
> temporary; Using filesort|
> |  1 | SIMPLE  | Principals_1 | eq_ref | PRIMARY  
> | PRIMARY   |   4 | rt3.main.id  | 1 | Using 
> where; Distinct  |
> |  1 | SIMPLE  | CachedGroupMembers_2 | ref| DisGrouMem,SHREDDER_CGM1 
> | SHREDDER_CGM1 |   5 | rt3.Principals_1.id  | 1 | Using 
> where; Using index; Distinct |
> |  1 | SIMPLE  | ACL_4| range  | ACL1 
> | ACL1  |  54 | NULL | 5 | Using 
> where; Using index; Distinct |
> |  1 | SIMPLE  | Groups_3 | eq_ref | PRIMARY,Groups1,Groups2  
> | PRIMARY   |   4 | rt3.CachedGroupMembers_2.GroupId | 1 | Using 
> where; Distinct  |
> ++-+--++--+---+-+--+---++
>
> After dropping SHREDDER_CGM1:
> ++-+--++-++-+---+--+---+
> | id | select_type | table| type   | possible_keys   
> | key| key_len | ref   | rows | Extra 
> |
> ++-+--++-++-+---+--+---+
> |  1 | SIMPLE  | Groups_3 | ref| PRIMARY,Groups1,Groups2 
> | Groups1|  65 | const |4 | Using 
> where; Using index; Using temporary; Using filesort |
> |  1 | SIMPLE  | CachedGroupMembers_2 | ref| DisGrouMem  
> | DisGrouMem |   5 | rt3.Groups_3.id   |1 | Using 
> where; Using index  |
> |  1 | SIMPLE  | Principals_1 | eq_ref | PRIMARY 
> | PRIMARY|   4 | rt3.CachedGroupMembers_2.MemberId |1 | Using 
> where   |
> |  1 | SIMPLE  | ACL_4| range  | ACL1
> | ACL1   |  54 | NULL  |5 | Using 
> where; Using index  |
> |  1 | SIMPLE  | main | eq_ref | PRIMARY 
> | PRIMARY|   4 | rt3.Principals_1.id   |1 |   
> |
> ++-+--++-++-+---+--+---+
>
> SHREDDER_CGM1:
> my

Re: [rt-users] Shrink CGM Table option?

2008-07-29 Thread Ruslan Zakirov
Try attached patch.

On Tue, Jul 29, 2008 at 5:50 PM, Curtis Bruneau <[EMAIL PROTECTED]> wrote:
> Is there any way to get etc/upgrade/shrink_cgm_table.pl to do it's thing
> in pieces? I believe we have many rows in the cgm table and it's causing
> perl to take up to 2gb of memory eventually causing oom to invoke
> killing mysql or simply just crashing before it can.
>
> Thanks for your time,
> Curtis
> ___
> 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.


RT-3.8.0-less_memory_hungry_shrink_cgm_script.patch
Description: Binary data
___
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] ExtractCustomFieldValues with attachments.

2008-07-29 Thread Jean-Sebastien Morisset
On Tue, Jul 29, 2008 at 03:22:15PM -0400, Roy Sowa wrote:
> JS, I spoke too soon...
>  The issue now is that I extract fine from the attachment, but now if the 
> matchstring is in the first attachment it is not found...

What's the MIME Type of your first attachment?

Line #100 might be skipping the first attachment:

97  while (my $Message = $Attachments->Next) {
98  $AttachNumber++;
99  $RT::Logger->info("considering attachment 
#".$AttachNumber." of type ".$Message->ContentType);
   100  next unless $Message->ContentType =~ 
m!^(text/plain|message|text$)!i;
   101  next unless $Message->Content;

js.
-- 
Jean-Sebastien Morisset, Sr. UNIX Administrator <[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] ExtractCustomFieldValues with attachments.

2008-07-29 Thread Roy Sowa
JS, I spoke too soon...
 The issue now is that I extract fine from the attachment, but now if the 
matchstring is in the first attachment it is not found...
So I have put back the original file, and am back to not being able to extract 
from attachments ..
So between the two files is the solution...
I want to extract the MatchString if it is in either.
Off to review the diffs and logicbut if anyone can help me out of the weeds 

>>> Jean-Sebastien Morisset <[EMAIL PROTECTED]> 29/07/2008 1:30 pm >>>
The problem is with the FindMatch function. It only checks the first
attachment. I overhauled this perl module quite a bit. Here's my version
attached. Diff this one to yours to see the differences. :-)

js.

On Tue, Jul 29, 2008 at 01:01:49PM -0400, Roy Sowa wrote:
> I am currently using RT 3.6.5 and ECFV 1.2.b3
> 
> I cannot get the extract to work if the MatchString is not in the first 
> attachment.
> I have been using ECFV for a while on basic standard type email tickets, but 
> now I have the requirement
> to extract the MatchString from an attachment. 
> 
> It does not seem to matter if the ticket is created via GUI or email.
> The simplest test being;
>1. Create ticket using GUI with a description that has the MatchString 
>  ( this works  CF get populated)
>2. Create ticket using GUI without any description and attach text file 
> that contains MatchString  ( this works  Cf gets populated)
>3. Create ticket using GUI with general desc and attach text file with 
> MatchString . ( this fails  No CF populated ) 
> 
>  Questions:
>  Does ExtractCustomFieldValues work with multi part messages if the 
> matchstring is in the second attachment?
> 
> Where did I go wrong ?
> 
>I have read the list , and  ContentObj is what is being used.  
>   Any hints or guidance would be much appreciated. 
> 
>  Thanks in advance.
> 
>  Roy
> 
> 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 
> 

-- 
Jean-Sebastien Morisset, Sr. UNIX Administrator <[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] ExtractCustomFieldValues with attachments.

2008-07-29 Thread Roy Sowa
JS, 
  There was/is a big diff between the two , so I copied your version over  to 
test...
   Cleared the mason stop/started the web and  repeated my tests...
Works 
I will now go through the diffs and try an understand it all ;-)

Many thanks for your quick help   ( this list rocks )
Roy

>>> Jean-Sebastien Morisset <[EMAIL PROTECTED]> 29/07/2008 1:30 pm >>>
The problem is with the FindMatch function. It only checks the first
attachment. I overhauled this perl module quite a bit. Here's my version
attached. Diff this one to yours to see the differences. :-)

js.

On Tue, Jul 29, 2008 at 01:01:49PM -0400, Roy Sowa wrote:
> I am currently using RT 3.6.5 and ECFV 1.2.b3
> 
> I cannot get the extract to work if the MatchString is not in the first 
> attachment.
> I have been using ECFV for a while on basic standard type email tickets, but 
> now I have the requirement
> to extract the MatchString from an attachment. 
> 
> It does not seem to matter if the ticket is created via GUI or email.
> The simplest test being;
>1. Create ticket using GUI with a description that has the MatchString 
>  ( this works  CF get populated)
>2. Create ticket using GUI without any description and attach text file 
> that contains MatchString  ( this works  Cf gets populated)
>3. Create ticket using GUI with general desc and attach text file with 
> MatchString . ( this fails  No CF populated ) 
> 
>  Questions:
>  Does ExtractCustomFieldValues work with multi part messages if the 
> matchstring is in the second attachment?
> 
> Where did I go wrong ?
> 
>I have read the list , and  ContentObj is what is being used.  
>   Any hints or guidance would be much appreciated. 
> 
>  Thanks in advance.
> 
>  Roy
> 
> 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 
> 

-- 
Jean-Sebastien Morisset, Sr. UNIX Administrator <[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] ExtractCustomFieldValues with attachments.

2008-07-29 Thread Jean-Sebastien Morisset
The problem is with the FindMatch function. It only checks the first
attachment. I overhauled this perl module quite a bit. Here's my version
attached. Diff this one to yours to see the differences. :-)

js.

On Tue, Jul 29, 2008 at 01:01:49PM -0400, Roy Sowa wrote:
> I am currently using RT 3.6.5 and ECFV 1.2.b3
> 
> I cannot get the extract to work if the MatchString is not in the first 
> attachment.
> I have been using ECFV for a while on basic standard type email tickets, but 
> now I have the requirement
> to extract the MatchString from an attachment. 
> 
> It does not seem to matter if the ticket is created via GUI or email.
> The simplest test being;
>1. Create ticket using GUI with a description that has the MatchString 
>  ( this works  CF get populated)
>2. Create ticket using GUI without any description and attach text file 
> that contains MatchString  ( this works  Cf gets populated)
>3. Create ticket using GUI with general desc and attach text file with 
> MatchString . ( this fails  No CF populated ) 
> 
>  Questions:
>  Does ExtractCustomFieldValues work with multi part messages if the 
> matchstring is in the second attachment?
> 
> Where did I go wrong ?
> 
>I have read the list , and  ContentObj is what is being used.  
>   Any hints or guidance would be much appreciated. 
> 
>  Thanks in advance.
> 
>  Roy
> 
> 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
> 

-- 
Jean-Sebastien Morisset, Sr. UNIX Administrator <[EMAIL PROTECTED]>
package RT::Action::ExtractCustomFieldValues;
require RT::Action::Generic;

use strict;
use vars qw/@ISA/;
@ISA=qw(RT::Action::Generic);

our $VERSION = 1.3;

sub Describe  {
  my $self = shift;
  return (ref $self );
}

sub Prepare {
  return (1);
}

sub Commit {
my $self = shift;
my $Transaction = $self->TransactionObj;
my $FirstAttachment = $Transaction->Attachments->First;
unless ( $FirstAttachment ) { return 1; }

my $Ticket = $self->TicketObj;
my $TmplText = $self->TemplateObj->Content;
my $Queue = $Ticket->QueueObj->Id;
my $Separator = '\|';

for (split(/[\n\r]+/, $TmplText)) {
chomp;
next if (/^#/);
next if (/^\s*$/);
if (/^Separator=(.*)$/) {
$Separator=$1;
next;
}
my ($CustomFieldName,$InspectField,$MatchString,$PostEdit,$Options) = 
split(/$Separator/);

my $cf;
if ($CustomFieldName) {
$cf = LoadCF( Field => $CustomFieldName, Queue => $Queue );
}

my $match = FindMatch( Field => $InspectField, 
Match => $MatchString,
Transaction => $Transaction,
FirstAttachment => $FirstAttachment );

if ($cf) {
$RT::Logger->debug("running ProcessCF...");
ProcessCF ( PostEdit => $PostEdit,
Ticket  => $Ticket,
Options => $Options,
CustomField => $cf,
Match   => $match );
} else {
$RT::Logger->debug("running ProcessMatch...");
ProcessMatch( PostEdit => $PostEdit, 
Ticket => $Ticket,
Options => $Options,
Transaction => $Transaction,
FirstAttachment  => $FirstAttachment,
Match => $match );
}
}
return(1);
}

sub LoadCF {
my %args = @_;
my $CustomFieldName = $args{Field};
my $Queue = $args{Queue};

$RT::Logger->debug("load cf $CustomFieldName");
my $cf = new RT::CustomField($RT::SystemUser);
my ($id,$msg) = $cf->LoadByNameAndQueue (Name=>"$CustomFieldName", 
Queue=>$Queue);
if (! $id) {
  ($id,$msg) = $cf->LoadByNameAndQueue (Name=>"$CustomFieldName", Queue=>0);
}
$RT::Logger->debug("load cf done: $id $msg");

return $cf;

}

sub FindMatch {
my %args = @_;
my $match = '';
if ($args{Field} =~ /^body$/i) {
$RT::Logger->info("look for match /".$args{Match}."/ in body");

my $Attachments = $args{Transaction}->Attachments;
my $LastContent = '';
my $AttachNumber = 0;

while (my $Message = $Attachments->Next) {
$AttachNumber++;
$RT::Logger->info("considering attachment #".$AttachNumber." of 
type ".$Message->ContentType);
next unless $Message->ContentType =~ 
m!^(text/plain|message|text$)!i;
next unless $Message->Content;
next if $LastContent eq $Message->Content;
$RT::Logger->info("accepted attachment #".$AttachNumber." for 
consideration");
$LastContent = $Message->Content;
if ($Message->Content =~ /$args{Match}/m) {
  

[rt-users] ExtractCustomFieldValues with attachments.

2008-07-29 Thread Roy Sowa
I am currently using RT 3.6.5 and ECFV 1.2.b3

I cannot get the extract to work if the MatchString is not in the first 
attachment.
I have been using ECFV for a while on basic standard type email tickets, but 
now I have the requirement
to extract the MatchString from an attachment. 

It does not seem to matter if the ticket is created via GUI or email.
The simplest test being;
   1. Create ticket using GUI with a description that has the MatchString  
( this works  CF get populated)
   2. Create ticket using GUI without any description and attach text file that 
contains MatchString  ( this works  Cf gets populated)
   3. Create ticket using GUI with general desc and attach text file with 
MatchString . ( this fails  No CF populated ) 

 Questions:
 Does ExtractCustomFieldValues work with multi part messages if the 
matchstring is in the second attachment?

Where did I go wrong ?

   I have read the list , and  ContentObj is what is being used.  
  Any hints or guidance would be much appreciated. 

 Thanks in advance.

 Roy

___
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] Forcing domains in email addresses

2008-07-29 Thread Mathieu Longtin
Found the difference. RT3.6 use Mail::Address, RT3.8 uses
Email::Address. The later just ignores strings without a @ in there. See
example below.

 

Regardless, I'd like to be able to just block any email address that
have no domain.

 

$ perl -MMail::Address -e 'print join("\n", map { $_->address }
Mail::Address->parse(q{abc [EMAIL PROTECTED]))."\n"'

abc

[EMAIL PROTECTED]

$ perl -MEmail::Address -e 'print join("\n", map { $_->address }
Email::Address->parse(q{abc [EMAIL PROTECTED]))."\n"'

[EMAIL PROTECTED]

 

From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mathieu
Longtin
Sent: July 29, 2008 10:37
To: rt-users@lists.bestpractical.com
Subject: [rt-users] Forcing domains in email addresses

 

Is there a way to force email address entered to be [EMAIL PROTECTED]
rather than accept just "user"?

 

Also, in 3.8 (as opposed to 3.6), if you enter just "user", the email is
not sent, but no error message is given about it.

 

Thanks

 

-Mathieu

___
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 form for create ticket in a queue

2008-07-29 Thread Don Beethe
Has anyone used a form for creating a ticket in a particular queue? I
have a group that wants to use our RT system (RT 3.6.3), but wants a
form when a user selects "create ticket"... 
 
 
___
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 remove incorrect "new ticket" queue entry in dropdown

2008-07-29 Thread Kevin Freels
Greetings!

RT 3.6.5 / FC8

I have a queue that only contains a couple people for confidential
reasons (HR). I added the director of HR to be a watcher, and everything
was fine; I had tested it, including logging in as her user. This was
the second "production" queue I added to the system. Since then, I've
added three more queues.

However, since this HR queue wasn't very active, the HR director went to
submit a ticket for the first time about a week after I created it, and
suddenly all of the other queues in the instance showed up in the
dropdown next to the "New Ticket" button. This confused the HR director
(and suprised me, since I had tested it before releasing it as a
"production" queue).

I went and tinkered around, changing/removing rights (example: "Show
Queue") from this user, the HR group, etc. However, even after 1) pretty
much taking *all* rights away from her , 2)revoking all rights of the
group she's a member of short of removing her as a privledged user, one
queue (ENG) still shows up in the dropdown that's she's *not* a member
of. She is not a member of the ENG group. No matter what I have tried, I
can't remove that ENG queue entry from the dropdown at all.

It is not the alphabetically first group (we have one named CRM), so I
don't think that is the issue. 

This happens in IE and FF. Restarting httpd did not fix this problem.

The other users for that queue are members of other queues that we are
using, so I can't really muck around with their rights, and that
wouldn't really be an adequate test anyways.

Another related issue: If I set "All Unowned Tickets" in her "RT at a
Glance", she sees tickets for queues she is not a member of. Is this the
default behavior? I'd like her to be able to see unowned tickets in the
HR queue, but not *all* unowned tickets as they really don't concern
her.

Suggestions (and, no, upgrading to 3.8 would be a problem at this point
since we're still getting rolling on RT for the first time)?

Thanks, as always.

k 
-=-=-=- 
Kevin Freels
Director of Information Technology
Sendmail, Inc.
[EMAIL PROTECTED]  510/594.5572
___
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] configure failing?

2008-07-29 Thread Kevin Falcone
On Jul 29, 2008, at 10:22 AM, John Arends wrote:

> I'm trying to get an RT 3.8 machine up and running.
>
> ./configure --with-mysql --with-modperl2 does not appear to be doing
> anything, because when I run make install it does a dep check with
> --with-mysql --with-fastcgi, and then fails.

John

Those aren't valid arguments to RT's configure.

see ./configure --help for the options you want to use

-kevin
___
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] Forcing domains in email addresses

2008-07-29 Thread Mathieu Longtin
Is there a way to force email address entered to be [EMAIL PROTECTED]
rather than accept just "user"?

 

Also, in 3.8 (as opposed to 3.6), if you enter just "user", the email is
not sent, but no error message is given about it.

 

Thanks

 

-Mathieu

___
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] configure failing?

2008-07-29 Thread John Arends
I'm trying to get an RT 3.8 machine up and running.

./configure --with-mysql --with-modperl2 does not appear to be doing 
anything, because when I run make install it does a dep check with 
--with-mysql --with-fastcgi, and then fails.


___
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] Shrink CGM Table option?

2008-07-29 Thread Curtis Bruneau
Is there any way to get etc/upgrade/shrink_cgm_table.pl to do it's thing 
in pieces? I believe we have many rows in the cgm table and it's causing 
perl to take up to 2gb of memory eventually causing oom to invoke 
killing mysql or simply just crashing before it can.

Thanks for your time,
Curtis
___
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] Autocomplete type Custom Fields in 3.8.0

2008-07-29 Thread Kevin Falcone
On Jul 29, 2008, at 7:51 AM, BALINT Bekeny wrote:

> Hi List,
>
> I have a question about how "Enter one value with autocompletion"  
> type CFs work.
> I have created a Ticket CF with this type and also added some values  
> for this
> but nothing happens if I start to type in the CF's input box.
> The apache log said:
> 10.8.0.10 - - [29/Jul/2008:11:16:35 +0200] "POST /Helpers/ 
> Autocomplete/CustomFieldValues HTTP/1.1" 200 -
>
> I don't see any error messages in apache error log or in syslog.
>
> Did I forget some requirements?
> Is there any documentation of this?
> Should it autocomplete only the added values or the previously  
> entered values too?

Hi Bekeny

I've pushed a change for this that will be in 3.8.1 (svn revision 14587)
It pulls the list of autocomplete values from the values that you  
enter on the
Custom Field page (searching both Name and Description)

-kevin
___
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] Mysql upgrading to RT3.8 gives you garbled UTF8 text

2008-07-29 Thread Ask Holme
I'm having trouble with UTF8 text in 3.8.0 too.

Ruslans patched fixed the special chars in queue names and ticket subjects.
However when viewing tickets, UTF8 text in the email text is still wrong.
But if i click reply/comment on the post, text is shown correctly in the 
editor (i'm using the WYSIWYG FCKeditor)

Any idea of what i could patch ?

Ruslan Zakirov wrote:
> You can help test upgrade by using copy of your DB and RT from our
> repository. That would be really helpful.
>
> On Tue, Jul 29, 2008 at 12:59 PM, Peter Eriksson <[EMAIL PROTECTED]> wrote:
>   
>> Hmm...
>>
>>
>> I was just about to start an upgrade till RT 3.8.0 when I noticed these
>> messages regarding these issues. Is there a complete list of what needs
>> to be fixed to get it to work, or should one just wait for RT 3.8.1 to
>> pop up?
>>
>> - Peter
>>
>>
>> Mathieu Longtin wrote:
>> 
>>> So your patch for utf8 worked, except it's 'utf8', not 'UTF-8'.
>>>
>>> Here's one for the NOT NULL DEFAULT NULL issue:
>>>
>>> diff --git a/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-4.1.pl 
>>> b/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-
>>> index 491c904..3585c7e 100755
>>> --- a/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-4.1.pl
>>> +++ b/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-4.1.pl
>>> @@ -339,11 +339,10 @@ sub build_column_definition {
>>>  $res .= 'NULL';
>>>  my $default = column_info(@info{qw(TABLE_NAME 
>>> COLUMN_NAME)})->{default};
>>>  if ( defined $default ) {
>>> -$default = $dbh->quote($default);
>>> -} else {
>>> -$default = 'NULL';
>>> +   $res .= ' DEFAULT '.$dbh->quote($default);
>>> +} elsif ( $info{'NULLABLE'} ) {
>>> +   $res .= ' DEFAULT NULL'
>>>  }
>>> -$res .= ' DEFAULT '. $default;
>>>  $res .= ' AUTO_INCREMENT' if $info{'mysql_is_auto_increment'};
>>>  return $res;
>>>  }
>>>
>>>
>>> -Original Message-
>>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ruslan 
>>> Zakirov
>>> Sent: July 28, 2008 14:41
>>> To: Mathieu Longtin
>>> Cc: rt-users@lists.bestpractical.com
>>> Subject: Re: [rt-users] Mysql upgrading to RT3.8 gives you garbled UTF8 text
>>>
>>> Do you have any customizations of RT code?
>>>
>>> Older RT versions were not using any connection adjustments like SET NAMES 
>>> or SET CHARACTER SET and most users had latin-1 as default mysql charset. 
>>> RT was storing UTF-8 data into latin-1 columns what is theoretically wrong, 
>>> but practically works fine. In 3.8 we have to properly define columns as 
>>> binary, UTF-8 or ascii as actually they do contain only this data. MySQL's 
>>> doc clearly says that the only way is to convert field to some binary 
>>> format (no data change) and then to required character set. All these is 
>>> described in comments in the beginning of the script.
>>>
>>> Try attached patch instead of what you've described below. I'm going to 
>>> look at "NOT NULL DEFAULT NULL" problem.
>>>
>>> On Mon, Jul 28, 2008 at 8:14 PM, Mathieu Longtin <[EMAIL PROTECTED]> wrote:
>>>   
 First, thanks for the 3.8 upgrade. Much appreciated.

 I already had accents in my tickets, and running
 schema.mysql-4.0-4.1.pl would garble them. This is using mysql 5.0.51a on 
 Redhat.

 I discovered that if I skip the VARBINARY part of the upgrade, the
 data is fine. So instead of

ALTER TABLE Tickets MODIFY Subject VARBINARY(10) NULL DEFAULT
 NULL;
ALTER TABLE Tickets MODIFY Subject VARCHAR(10) CHARACTER SET
 utf8 NULL DEFAULT NULL;

 Just do:

ALTER TABLE Tickets MODIFY Subject VARCHAR(10) CHARACTER SET
 utf8 NULL DEFAULT NULL;

 So, if your data is garbled post upgrade, restore your backup (you had
 a backup, right?), and follow these instructions to run
 schema.mysql-4.0-4.1.pl.

 You can easily get those UTF8 modify commands like this:

perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | grep
 MODIFY.*utf8


 Of course, you still need to fix the NOT NULL DEFAULT NULL issue. So,
 the full command:

perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | \
grep MODIFY.*utf8 | \
perl -pe 's/NOT NULL DEFAULT NULL/NOT NULL/' | \
mysql -urt_user -prt_pass rt

 Then, run schema.mysql-4.0-4.1.pl normally, the columns that were
 fixed already won't be refixed by the upgrade script again.

perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | \
perl -pe 's/NOT NULL DEFAULT NULL/NOT NULL/' | \
mysql -urt_user -prt_pass rt


 -Mathieu
 ___
 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.bes

Re: [rt-users] Username at RT login not matching Ticket sent via e-mail

2008-07-29 Thread Drew Barnes
Try RT::Extension::MergeUsers (unless that has been merged into 3.8?) 
from CPAN.

John Arends wrote:
> The fact that you have two accounts is the problem. An account can have 
> a username and an email address so they can log in as 'bob' but have an 
> email address of [EMAIL PROTECTED]
>
> I'm not sure how you'd fix this problem other than consolidating down to 
> one account per person. There isn't a way that I'm aware of to say 
> "these 2 users are really the same person."
>
> Jorge Aldana wrote:
>   
>> Well users login with username and the ticket is sent in via e-mail as
>> [EMAIL PROTECTED] so yes there's two accounts.
>>
>> Does RT allow for users to login via [EMAIL PROTECTED] Or is there a scrip to
>> alter the tickets to set it to username instead of [EMAIL PROTECTED] as
>> requester when tickets are created? Or force users to login as
>> [EMAIL PROTECTED]
>>
>> I'm still fishing through the doc's and learning RT so don't quite know where
>> the tweaking can take place for this. Any guide or pointing to guides if 
>> anyone
>> can.
>>
>>
>> 
> ___
> 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
>   

-- 
Drew Barnes
Applications Analyst
Network Resources Department
Raymond Walters College
University of Cincinnati

___
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] Autocomplete type Custom Fields in 3.8.0

2008-07-29 Thread BALINT Bekeny
Hi List,

I have a question about how "Enter one value with autocompletion" type CFs
work.
I have created a Ticket CF with this type and also added some values for
this
but nothing happens if I start to type in the CF's input box.
The apache log said:
10.8.0.10 - - [29/Jul/2008:11:16:35 +0200] "POST
/Helpers/Autocomplete/CustomFieldValues HTTP/1.1" 200 -

I don't see any error messages in apache error log or in syslog.

Did I forget some requirements?
Is there any documentation of this?
Should it autocomplete only the added values or the previously entered
values too?

Thanks
--
Bekeny
___
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] Mysql upgrading to RT3.8 gives you garbled UTF8 text

2008-07-29 Thread Ruslan Zakirov
You can help test upgrade by using copy of your DB and RT from our
repository. That would be really helpful.

On Tue, Jul 29, 2008 at 12:59 PM, Peter Eriksson <[EMAIL PROTECTED]> wrote:
> Hmm...
>
>
> I was just about to start an upgrade till RT 3.8.0 when I noticed these
> messages regarding these issues. Is there a complete list of what needs
> to be fixed to get it to work, or should one just wait for RT 3.8.1 to
> pop up?
>
> - Peter
>
>
> Mathieu Longtin wrote:
>> So your patch for utf8 worked, except it's 'utf8', not 'UTF-8'.
>>
>> Here's one for the NOT NULL DEFAULT NULL issue:
>>
>> diff --git a/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-4.1.pl 
>> b/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-
>> index 491c904..3585c7e 100755
>> --- a/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-4.1.pl
>> +++ b/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-4.1.pl
>> @@ -339,11 +339,10 @@ sub build_column_definition {
>>  $res .= 'NULL';
>>  my $default = column_info(@info{qw(TABLE_NAME COLUMN_NAME)})->{default};
>>  if ( defined $default ) {
>> -$default = $dbh->quote($default);
>> -} else {
>> -$default = 'NULL';
>> +   $res .= ' DEFAULT '.$dbh->quote($default);
>> +} elsif ( $info{'NULLABLE'} ) {
>> +   $res .= ' DEFAULT NULL'
>>  }
>> -$res .= ' DEFAULT '. $default;
>>  $res .= ' AUTO_INCREMENT' if $info{'mysql_is_auto_increment'};
>>  return $res;
>>  }
>>
>>
>> -Original Message-
>> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ruslan Zakirov
>> Sent: July 28, 2008 14:41
>> To: Mathieu Longtin
>> Cc: rt-users@lists.bestpractical.com
>> Subject: Re: [rt-users] Mysql upgrading to RT3.8 gives you garbled UTF8 text
>>
>> Do you have any customizations of RT code?
>>
>> Older RT versions were not using any connection adjustments like SET NAMES 
>> or SET CHARACTER SET and most users had latin-1 as default mysql charset. RT 
>> was storing UTF-8 data into latin-1 columns what is theoretically wrong, but 
>> practically works fine. In 3.8 we have to properly define columns as binary, 
>> UTF-8 or ascii as actually they do contain only this data. MySQL's doc 
>> clearly says that the only way is to convert field to some binary format (no 
>> data change) and then to required character set. All these is described in 
>> comments in the beginning of the script.
>>
>> Try attached patch instead of what you've described below. I'm going to look 
>> at "NOT NULL DEFAULT NULL" problem.
>>
>> On Mon, Jul 28, 2008 at 8:14 PM, Mathieu Longtin <[EMAIL PROTECTED]> wrote:
>>> First, thanks for the 3.8 upgrade. Much appreciated.
>>>
>>> I already had accents in my tickets, and running
>>> schema.mysql-4.0-4.1.pl would garble them. This is using mysql 5.0.51a on 
>>> Redhat.
>>>
>>> I discovered that if I skip the VARBINARY part of the upgrade, the
>>> data is fine. So instead of
>>>
>>>ALTER TABLE Tickets MODIFY Subject VARBINARY(10) NULL DEFAULT
>>> NULL;
>>>ALTER TABLE Tickets MODIFY Subject VARCHAR(10) CHARACTER SET
>>> utf8 NULL DEFAULT NULL;
>>>
>>> Just do:
>>>
>>>ALTER TABLE Tickets MODIFY Subject VARCHAR(10) CHARACTER SET
>>> utf8 NULL DEFAULT NULL;
>>>
>>> So, if your data is garbled post upgrade, restore your backup (you had
>>> a backup, right?), and follow these instructions to run
>>> schema.mysql-4.0-4.1.pl.
>>>
>>> You can easily get those UTF8 modify commands like this:
>>>
>>>perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | grep
>>> MODIFY.*utf8
>>>
>>>
>>> Of course, you still need to fix the NOT NULL DEFAULT NULL issue. So,
>>> the full command:
>>>
>>>perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | \
>>>grep MODIFY.*utf8 | \
>>>perl -pe 's/NOT NULL DEFAULT NULL/NOT NULL/' | \
>>>mysql -urt_user -prt_pass rt
>>>
>>> Then, run schema.mysql-4.0-4.1.pl normally, the columns that were
>>> fixed already won't be refixed by the upgrade script again.
>>>
>>>perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | \
>>>perl -pe 's/NOT NULL DEFAULT NULL/NOT NULL/' | \
>>>mysql -urt_user -prt_pass rt
>>>
>>>
>>> -Mathieu
>>> ___
>>> 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
>
>



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

Re: [rt-users] RT 3.8.0 Search build page real slow

2008-07-29 Thread Ask Holme
Iv solved the problem my self.
Faulty rights on a specific queue caused the owner list to be quite 
long, which RT didn't like.
(By mistake someone had given the own ticket right on the queue to all 
unprivileged users)

Ask Holme wrote:
> Hey List
>
> Lately (both before and after upgrade to 3.8.0) i'v been having problems 
> with performance of the query builder.
> Overall RT runs quite fast, viewing of queues and tickets is fully 
> acceptable and ticket updates is also fine.
> However, if i want to do a custom search and therefore opens a new query 
> performance falls.
> The query builder page takes way over 1 minute to load and the same 
> loading time apply for every term adding action. If build a moderately 
> complex query i can easily use 20 minutes, just to add the terms - most 
> of this waiting time. Looking on the server i can see, that RT eats 
> about 70-80 pct. af my 2,8 gHZ Xeon CPU while sending the page to me.
>
> The database is quite huge (about 1 GB holding 34k tickets with 300k 
> transactions), however when both queue and ticket viewing is fast that 
> can't be the problem ?
>
> Does anyone else of the have big trouble with the query building page ?
>
> Any ideas for how to speed it 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
>
> !DSPAM:44,488ef6156701618985631!
>
>
>   

___
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.0 Search build page real slow

2008-07-29 Thread Ask Holme
Hey List

Lately (both before and after upgrade to 3.8.0) i'v been having problems 
with performance of the query builder.
Overall RT runs quite fast, viewing of queues and tickets is fully 
acceptable and ticket updates is also fine.
However, if i want to do a custom search and therefore opens a new query 
performance falls.
The query builder page takes way over 1 minute to load and the same 
loading time apply for every term adding action. If build a moderately 
complex query i can easily use 20 minutes, just to add the terms - most 
of this waiting time. Looking on the server i can see, that RT eats 
about 70-80 pct. af my 2,8 gHZ Xeon CPU while sending the page to me.

The database is quite huge (about 1 GB holding 34k tickets with 300k 
transactions), however when both queue and ticket viewing is fast that 
can't be the problem ?

Does anyone else of the have big trouble with the query building page ?

Any ideas for how to speed it 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] Mysql upgrading to RT3.8 gives you garbled UTF8 text

2008-07-29 Thread Peter Eriksson
Hmm...


I was just about to start an upgrade till RT 3.8.0 when I noticed these
messages regarding these issues. Is there a complete list of what needs
to be fixed to get it to work, or should one just wait for RT 3.8.1 to
pop up?

- Peter


Mathieu Longtin wrote:
> So your patch for utf8 worked, except it's 'utf8', not 'UTF-8'. 
> 
> Here's one for the NOT NULL DEFAULT NULL issue:
> 
> diff --git a/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-4.1.pl 
> b/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-
> index 491c904..3585c7e 100755
> --- a/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-4.1.pl
> +++ b/tmp/rt-3.8.0/etc/upgrade/schema.mysql-4.0-4.1.pl
> @@ -339,11 +339,10 @@ sub build_column_definition {
>  $res .= 'NULL';
>  my $default = column_info(@info{qw(TABLE_NAME COLUMN_NAME)})->{default};
>  if ( defined $default ) {
> -$default = $dbh->quote($default);
> -} else {
> -$default = 'NULL';
> +   $res .= ' DEFAULT '.$dbh->quote($default);
> +} elsif ( $info{'NULLABLE'} ) {
> +   $res .= ' DEFAULT NULL'
>  }
> -$res .= ' DEFAULT '. $default;
>  $res .= ' AUTO_INCREMENT' if $info{'mysql_is_auto_increment'};
>  return $res;
>  }
> 
> 
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ruslan Zakirov
> Sent: July 28, 2008 14:41
> To: Mathieu Longtin
> Cc: rt-users@lists.bestpractical.com
> Subject: Re: [rt-users] Mysql upgrading to RT3.8 gives you garbled UTF8 text
> 
> Do you have any customizations of RT code?
> 
> Older RT versions were not using any connection adjustments like SET NAMES or 
> SET CHARACTER SET and most users had latin-1 as default mysql charset. RT was 
> storing UTF-8 data into latin-1 columns what is theoretically wrong, but 
> practically works fine. In 3.8 we have to properly define columns as binary, 
> UTF-8 or ascii as actually they do contain only this data. MySQL's doc 
> clearly says that the only way is to convert field to some binary format (no 
> data change) and then to required character set. All these is described in 
> comments in the beginning of the script.
> 
> Try attached patch instead of what you've described below. I'm going to look 
> at "NOT NULL DEFAULT NULL" problem.
> 
> On Mon, Jul 28, 2008 at 8:14 PM, Mathieu Longtin <[EMAIL PROTECTED]> wrote:
>> First, thanks for the 3.8 upgrade. Much appreciated.
>>
>> I already had accents in my tickets, and running 
>> schema.mysql-4.0-4.1.pl would garble them. This is using mysql 5.0.51a on 
>> Redhat.
>>
>> I discovered that if I skip the VARBINARY part of the upgrade, the 
>> data is fine. So instead of
>>
>>ALTER TABLE Tickets MODIFY Subject VARBINARY(10) NULL DEFAULT 
>> NULL;
>>ALTER TABLE Tickets MODIFY Subject VARCHAR(10) CHARACTER SET
>> utf8 NULL DEFAULT NULL;
>>
>> Just do:
>>
>>ALTER TABLE Tickets MODIFY Subject VARCHAR(10) CHARACTER SET
>> utf8 NULL DEFAULT NULL;
>>
>> So, if your data is garbled post upgrade, restore your backup (you had 
>> a backup, right?), and follow these instructions to run 
>> schema.mysql-4.0-4.1.pl.
>>
>> You can easily get those UTF8 modify commands like this:
>>
>>perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | grep
>> MODIFY.*utf8
>>
>>
>> Of course, you still need to fix the NOT NULL DEFAULT NULL issue. So, 
>> the full command:
>>
>>perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | \
>>grep MODIFY.*utf8 | \
>>perl -pe 's/NOT NULL DEFAULT NULL/NOT NULL/' | \
>>mysql -urt_user -prt_pass rt
>>
>> Then, run schema.mysql-4.0-4.1.pl normally, the columns that were 
>> fixed already won't be refixed by the upgrade script again.
>>
>>perl schema.mysql-4.0-4.1.pl rt rt_user rt_pass | \
>>perl -pe 's/NOT NULL DEFAULT NULL/NOT NULL/' | \
>>mysql -urt_user -prt_pass rt
>>
>>
>> -Mathieu
>> ___
>> 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



signature.asc
Description: OpenPGP digital signature
___
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