Re: [rt-users] migrating from MySQL to Postgres? - SUCCESS!

2011-06-30 Thread Johan Sjöberg
Hi.

Thanks for your work and the detailed instructions. I tried migrating earlier, 
but I had trouble with non-ASCII characters (all rows with non-ASCII characters 
were skipped), so I put this on ice for the time being. Will this work now, 
after your change #2 mentioned below?

/Johan

 -Original Message-
 From: rt-users-boun...@lists.bestpractical.com [mailto:rt-users-
 boun...@lists.bestpractical.com] On Behalf Of Dario Landazuri
 Sent: den 29 juni 2011 22:58
 To: rt-users@lists.bestpractical.com
 Subject: Re: [rt-users] migrating from MySQL to Postgres? - SUCCESS!
 
 Alright, I'm up and running on Postgres now instead.  Here's a rough writeup
 of what I did - most of it was to adapt/follow the instructions put forth by
 Edward Groenendaal at the bottom of the old wiki page Ruslan posted the
 link to:
 
 http://wiki-archive.bestpractical.com/view/MySQLToPg
 
 One difference is that I was only using one machine.  Also, I was already
 running 4.0.1, so upgrading the database weren't needed.  This was done
 with Postgres 9.0 on a machine running RHEL5.
 
 1) Install PostgreSQL 9.0 from the official yum repo found here:
 
 http://yum.pgrpms.org/howtoyum.php
 
 2) Reinstalled RT to use postgres.  I simply used --prefix to put it into a
 different directory.  Specifically, I installed to /opt/rt/rt4-pg.  I also 
 moved the
 current (MySQL-based) installation to /opt/rt/rt-mysql and created a link (ln 
 -
 s rt4-mysql rt4) to facilitate later easy switching back to the mysql version 
 if
 needed.
 
 3) make initialize-database
 
 4) dropdb -U postgres rt4
 
 5) createdb -U postgres rt4
 
 6) psql -U postgres rt4  /opt/rt/rt4-pg/etc/schema.Pg
 
 7) Turn off apache and sendmail to facilitate the migration.
 
 8) ./RTmysqltoPg (an updated/edited version of the script Edward
 presented)
 
 This took maybe 10 or 15 minutes, since we don't have a large RT instance
 here - only ~14k tickets.
 
 9) Move the rt4 link in /opt/rt to point to /opt/rt/rt4-pg.
 
 10) Copy over RT_SiteConfig.pm from /opt/rt/rt4-mysql.  Add a line for the
 different dba user and change the line for the dba password.
 
 11) Start apache and sendmail again, check that it works.
 
 12) Profit!
 
 Once it looked like it was working correctly, I proceeded to enable full text
 indexing and begin the initial index as per the instructions in
 full_text_indexing.pod.
 
 The script from step 8 is attached to this email.  Here're the changes I made
 to the script:
 
 1) Changed up the my @tables line (25) to take out the RTFM tables and
 make sure all necessary tables in my particular RT instance (except for
 sessions) were accounted for.
 
 2) I had to edit the push @values line (124) to properly handle UTF-8
 encoding - PG's much more strict than mysql is, apparently.
 
 3) Added lines 52-63 to add the ability to update the sequences.  Please
 pardon me if it's bad perl - I'm not a coder, just a sysadmin who can shell
 script on a good day. ;)
 
 Hope this is helpful to some.
 
 Cheers,
 Dario
 
 --
 **
 **
 Dario Landazurida...@astro.as.utexas.edu
 Systems Administrator (512) 471-3334
 McDonald Observatory
 **
 **


2011 Training: http://bestpractical.com/services/training.html


Re: [rt-users] Running /opt/rt4/sbin/rt-clean-sessions and general speed of rt.

2011-06-30 Thread hubert depesz lubaczewski
On Wed, Jun 29, 2011 at 04:45:23PM -0400, Kevin Falcone wrote:
  
  Final question that stands is: how to decrease number of worker
  processes in both starman and normal rt-server?
 
 When you run rt-server, you'll note the following line:
 
 Plack::Handler::Starlet: Accepting connections at http://0:8923/
 
 Similarly, you'd see Plack::Handler::Starlet
 
 They document their command line parameters for limiting children
 
 http://search.cpan.org/dist/Starlet/
 http://search.cpan.org/dist/Starman/
 
 But in general --workers 2 will do what you want

ah. thanks.

Best regards,

depesz


-- 
The best thing about modern society is how easy it is to avoid contact with it.
 http://depesz.com/


2011 Training: http://bestpractical.com/services/training.html


[rt-users] Show tickets depending on creator and not owner

2011-06-30 Thread Fabian Unfried
Hi guys,

just started with rt 4.0.1 and it is really great, but one question:

Is there a way to show the tickets for the customers (unprivileged users) not 
only when they are assigned to it but also because they are the creator of a 
ticket? So to say I would like that a creator of a ticket can always see 
his/her ticket not only when he/she is assigned to his/her ticket.

Thanks in advance.

Regards,
Fabian


- CONFIDENTIAL-

This email and any files transmitted with it are confidential, and may also be 
legally privileged.  If you are not the intended recipient, you may not review, 
use, copy, or distribute this message. If you receive this email in error, 
please notify the sender immediately by reply email and then delete this email.


2011 Training: http://bestpractical.com/services/training.html


Re: [rt-users] migrating from MySQL to Postgres? - SUCCESS!

2011-06-30 Thread Dario Landazuri

Johan,


Thanks for your work and the detailed instructions. I tried migrating
earlier, but I had trouble with non-ASCII characters (all rows with
non-ASCII characters were skipped), so I put this on ice for the time
being. Will this work now, after your change #2 mentioned below?


I can't say with certainty, but I think it would.  Every row is 
(re)encoded into UTF-8 before being pushed into the new database, if I 
understand the advice I was given correctly.


Cheers,
Dario

--

Dario Landazurida...@astro.as.utexas.edu
Systems Administrator (512) 471-3334
McDonald Observatory




smime.p7s
Description: S/MIME Cryptographic Signature


2011 Training: http://bestpractical.com/services/training.html

[rt-users] RTx::RightsMatrix - compatible with RT 4?

2011-06-30 Thread Murphy, Kevin
I just installed RTx::RightsMatrix into a fresh install of RT 4.0.1 using the 
recipe in the README file, and after stopping and starting Apache, I don't see 
anything extra on the Tools/Configuration/Tools menu.

Am I doing something wrong, or is RTx::RightsMatrix too old?

Thanks,
Kevin



2011 Training: http://bestpractical.com/services/training.html


[rt-users] Rights for creating custom fields

2011-06-30 Thread Murphy, Kevin
Is it possible to set up a 'queue admin' group that can create and otherwise 
administer custom fields for tickets in a particular queue?

Under Global Group Rights, I have enabled AssignCustomFields, AdminCustomField, 
and AdminCustomFieldValues.

The members of group G can create a ticket custom field, but the custom field 
disappears into the ether as far as they are concerned, and they have no way of 
seeing, selecting, creating values for, or assigning the newly created custom 
field.

Grepping the RT source code, I also see the rights 'ModifyCustomField' and 
'SeeCustomField', but I don't know where those rights are in the Configuration 
menu.

Thanks,
Kevin



2011 Training: http://bestpractical.com/services/training.html


[rt-users] Scrolling marguee or info window

2011-06-30 Thread Yan Seiner
I'm looking for an info bar of some sort that I could put on users'
dashboards for announcements.  It would be nice to notify users of
updates, new features, important dates and events, etc.

Is anyone aware of anythihng like that?  It doesn't have to scroll but it
should display text that updates periodically.

I could set up an announcement queue and a custom search... But I'm really
looking more for a text box sort of thing.



2011 Training: http://bestpractical.com/services/training.html


Re: [rt-users] Rights for creating custom fields

2011-06-30 Thread Kenneth Crocker
Kevin,

The rights work like this:

*SeeCustomField* - allows the members of the group given this right to
actually see the ticket field and it's current value in the ticket display
(regardless of the Queue).
*ModifyCustomField* - allows the members of the group given this right to
actually modify the value in that field for *a ticket* (regardless of the
Queue).
*AdminCustomField* - allows the members of the group given this right to
create, delete, define the name, description, set mandatory value and
possible select values for *others* to select from in a ticket (regardless
of the Queue).
*AssignCustomFields* - allows the members of the group given this right to
apply or allow  a Custom Field to be available for tickets in a Queue.

Granting the 1st 3 rights has no effect on seeing/modifying these custom
fields in a ticket if the CF hasn't been applied to a particular Queue.
These rights were originally set up to be given at the Group level only.
When configuring a Queue, you wouldn't see rights to see or modify a Custom
Field. This is still the general practice as it allows for LESS maintenance
on CF rights. An example:

If I have 20 Queues and Group A has various rights to 5 of them. I grant
the rights I want them to have and then whatever Queue has that CF applied
to it AND Group A has rights to that Queue, then I don't have to go into
each Queue and grant those rights.

On the other hand, I NOW (due to later versions) CAN grant those rights at
the Queue level for another group that I DO NOT want to have access in the
other Queues, but DO want them to have those tights in the one Queue. What
this does is allow you to grant access to a Custom Field for certain groups
REGARDLESS of QUEUE but also allow additional access to a role or some
other group on a QUEUE-by-QUEUE basis.

We have one group we allow full rights for any CF and they are the System
Admins for our Session. We limit this access because we do NOT want any
Tom,DIck or Harry changing values for CF';s that someone else uses. Makes
for a messy situation.

We even have some CF's that NO ONE can see/modify (except that 1 Admin
group) because we use those CF's for background processing and RT updates
them automatically via scrips, no one else needs to see that info.

Hope this helps.

Kenn
LBNL



On Thu, Jun 30, 2011 at 9:12 AM, Murphy, Kevin murph...@email.chop.eduwrote:

 Is it possible to set up a 'queue admin' group that can create and
 otherwise administer custom fields for tickets in a particular queue?

 Under Global Group Rights, I have enabled AssignCustomFields,
 AdminCustomField, and AdminCustomFieldValues.

 The members of group G can create a ticket custom field, but the custom
 field disappears into the ether as far as they are concerned, and they have
 no way of seeing, selecting, creating values for, or assigning the newly
 created custom field.

 Grepping the RT source code, I also see the rights 'ModifyCustomField' and
 'SeeCustomField', but I don't know where those rights are in the
 Configuration menu.

 Thanks,
 Kevin


 
 2011 Training: http://bestpractical.com/services/training.html



2011 Training: http://bestpractical.com/services/training.html

Re: [rt-users] RTx::RightsMatrix - compatible with RT 4?

2011-06-30 Thread Todd Chapman
I haven't reviewed RT4 yet. If you figure out why it isn't working
feel free to send me a patch and I can work on a new release.

-Todd (RightsMatrix author)

On Thu, Jun 30, 2011 at 11:52 AM, Murphy, Kevin murph...@email.chop.edu wrote:
 I just installed RTx::RightsMatrix into a fresh install of RT 4.0.1 using the 
 recipe in the README file, and after stopping and starting Apache, I don't 
 see anything extra on the Tools/Configuration/Tools menu.

 Am I doing something wrong, or is RTx::RightsMatrix too old?

 Thanks,
 Kevin


 
 2011 Training: http://bestpractical.com/services/training.html



2011 Training: http://bestpractical.com/services/training.html


Re: [rt-users] Show tickets depending on creator and not owner

2011-06-30 Thread Kenneth Crocker
Fabian,

What is the relationship of your creator and the ticket Owner and the
ticket Requestor?
Are they usually the same? Do the tickets get created via email or WebUI?

Kenn
LBNL

On Thu, Jun 30, 2011 at 8:34 AM, Fabian Unfried funfr...@zebra.com wrote:

 Hi guys,

 just started with rt 4.0.1 and it is really great, but one question:

 Is there a way to show the tickets for the customers (unprivileged users)
 not only when they are assigned to it but also because they are the creator
 of a ticket? So to say I would like that a creator of a ticket can always
 see his/her ticket not only when he/she is assigned to his/her ticket.

 Thanks in advance.

 Regards,
 Fabian


 - CONFIDENTIAL-

 This email and any files transmitted with it are confidential, and may also
 be legally privileged.  If you are not the intended recipient, you may not
 review, use, copy, or distribute this message. If you receive this email in
 error, please notify the sender immediately by reply email and then delete
 this email.

 
 2011 Training: http://bestpractical.com/services/training.html



2011 Training: http://bestpractical.com/services/training.html

[rt-users] Creating a ticket with multi-line comments via REST

2011-06-30 Thread Steele, Michael
All,

I'm trying to create a ticket via the REST API on RT 3.8.7 where the 'Text:' 
field contains a multi-line string.  The ticket gets created with only the 
first line if the CRLFs are left in the string, and I haven't been able to find 
any way to escape the CRLF character(s).

Is there a way to insert multi-line Text: field values?

Michael


2011 Training: http://bestpractical.com/services/training.html

[rt-users] CustomField - Mandatory not working

2011-06-30 Thread Kenneth Crocker
To list,

I just ran across an odd occurence in a ticket. I have a Queue that uses
several Custom Fields, only 1 of which is set to Mandatory for validation.
Whil ein the ticket, I made changes to various ticket fields (none of them
Cf's) and I got the expected error when I tried to save the ticket. When I
modified one of the CF's and NOT the Mandatory one, the ticket was saved AND
when I resolved it, it DID resolve.

Has anyone else had this problem or am I alone on this and need to look at
some other cause?

Kenn
LBNL


2011 Training: http://bestpractical.com/services/training.html

Re: [rt-users] ExternalAuth for requestors but not privileged users?

2011-06-30 Thread Adam Thompson
 RT-Authen-ExternalAuth falls back to internal auth if the username
 / pass doesn't match in LDAP

I'm sure I saw something about this a little while ago, but I can't find 
it now.  Sorry if this is rehashing old material...

Is there any way to have RT-Authen-ExternalAuth try more than one LDAP 
server in a defined order?  I'm thinking of something like having it query 
Active Directory first for staff, then the LDAP server with all our 
customer accounts, finally falling back to local DB for root only?

Thanks,

-Adam Thompson
 athom...@athompso.net





2011 Training: http://bestpractical.com/services/training.html


[rt-users] Faking {$Transaction-Content()}

2011-06-30 Thread Mauricio Tavares
  From what I understand (thanks trs), in an on Owner Change event
you cannot rely on using {$Transaction-Content()} to copy the last
message/correspondence in a given ticket because no transaction was
created. So, how can you fake it in an template? If the content was
only a text file, it is not hard to do it, but what happens when you
also have attachments? I wrote the following template,

{
   my $thingie = Attachments:;
   my $Transactions = $Ticket-Transactions;

   $Transactions-Limit( FIELD = 'Type',
   VALUE = Correspond
 );
   # $Rt::Logger-debug(Find Transaction);
   my $TransactionObj = $Transactions-Last;
  my $AttachmentsObj = RT::Attachments-new($TransactionObj-CurrentUser);
  $AttachmentsObj-Limit( FIELD = 'TransactionID',
  VALUE = $TransactionObj-id
);
  while ( my $a = $AttachmentsObj-Next ) {
 $thingie .= \nFound an attachment with encoding  .
$a-ContentType .  and ID  . $a-id;
 if ( $a-ContentType eq 'text/plain' || $a-ContentType eq
'text/html'){
$thingie .= \nContent:\n . $a-Content;
 }
 elseif ( $a-ContentType eq 'multipart/mixed') {
 }
 else {
$thingie .= \n . $RT::WebURL ./Ticket/Attachment/.
$a-TransactionId ./. $a-id ./. $a-Filename;
$thingie .= \n;
 }
  }
   $thingie;
}

which finds the attachments and put links for the non-text (from
http://requesttracker.wikia.com/wiki/AddAttachmentLinksToMail)
attachments, but what I really want is, well, emulate
{$Transaction-Content()}. Would anyone have any pointers?


2011 Training: http://bestpractical.com/services/training.html


[rt-users] configure scrip message in error_log

2011-06-30 Thread Brian Dugay
Hi,

I have inherited 2 instances of RT (v3.8.4) running on Mac OS X 10.5.8.  One 
instance is logging scrip messages to the apache2 error_log.  E.g. when an 
comment or correspondence action occurs, it is possible to see the scrip 
messages in one apache2 error_log but not the other.   The RT_SiteConfig.pm's 
are configured the same with regard to logging.

Set($LogToSyslog, 'warning'); 
Set($LogToScreen, 'info');
##
Set($LogToFile, undef);
Set($LogDir, '/var/log');
Set($LogToFileNamed, 'rt.log'); #log to rt.log
##
Set($LogStackTrace, '');   
Set(@LogToSyslogConf, ()); 

The httpd.conf files are also configured similarly:

ErrorLog logs/error_log
LogLevel info


Can anybody steer me in the right direction?

Thanks and regards,
Brian

smime.p7s
Description: S/MIME cryptographic signature


2011 Training: http://bestpractical.com/services/training.html

Re: [rt-users] Creating a ticket with multi-line comments via REST

2011-06-30 Thread Kevin Falcone
On Thu, Jun 30, 2011 at 06:29:30PM +, Steele, Michael wrote:
I'm trying to create a ticket via the REST API on RT 3.8.7 where the 
 `Text:' field contains a
multi-line string.  The ticket gets created with only the first line if 
 the CRLFs are left in
the string, and I haven't been able to find any way to escape the CRLF 
 character(s).
 
Is there a way to insert multi-line Text: field values?

Indent lines after the first Text: line

-kevin


pgpbX4u1DvMl0.pgp
Description: PGP signature


2011 Training: http://bestpractical.com/services/training.html