Re: [rt-users] Assign Global Rights to Group?

2013-06-13 Thread Emmanuel Lacour
On Wed, Jun 12, 2013 at 03:46:29PM -0500, Ken Johnson wrote:
 We find that the best way for us to manage user rights is to create a number
 of groups, assign global rights to the groups, and then assign users to the
 appropriate group.
 
 I'm trying to work out how to assign global rights to a group via a Perl
 script, but I'm not having much luck.  A simple case might look something
 like this, I think:
 
 $group = RT::Group-new( $RT::SystemUser );
 $group-LoadUserDefinedGroup( Group2 );
 die couldn't load group unless $group-id;
 print(SelfDescription :  . $group-SelfDescription() . \n);
 
 
 $group-GrantRight(Object = , Right = CreateTicket);
 
 This works up to and including the print.  So the problem, of course, is
 that the GrantRight call is obviously incomplete.  I haven't figured out
 what the Object should be.

use:

$group-PrincipalObj-GrantRight(Object = $RT::System, Right = 
CreateTicket);


-- 
Easter-eggs  Spécialiste GNU/Linux
44-46 rue de l'Ouest  -  75014 Paris  -  France -  Métro Gaité
Phone: +33 (0) 1 43 35 00 37-   Fax: +33 (0) 1 43 35 00 76
mailto:elac...@easter-eggs.com  -   http://www.easter-eggs.com


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training


[rt-users] CF - article - image as attachment - link values to

2013-06-13 Thread Alexander Kucheryuk

Hello!
I am running RT 4.0.13 on Centos 6.3.
I have configured CF for articles. Type of CF is upload multiple 
images. When inserting article with that CF (for example, replying to 
ticket), only the name (of image) is inserted, not the image itself. I 
was thinking of bypassing that issue using embedded html (eg. img) and 
__CustomField__ . However, when inserting article into ticket reply, 
attribute Link values to of that CF seems to be completely ignored 
(plain value - name of the image - is inserted). Is it possible to take 
into account attribute Link values to when inserting article into 
ticket reply ?

Alexander.


--
RT Training in Seattle, June 19-20: http://bestpractical.com/training


Re: [rt-users] Decrypting messages with GPG

2013-06-13 Thread Ruslan Zakirov
On Thu, Jun 13, 2013 at 2:30 AM, Oliver Day o...@securingchange.org wrote:

 I haven't found documentation that explains how to cache passwords that
 will allow mailgate to decrypt messages sent to RT. I've set the home
 directory to the default location and imported the appropriate keys. So I'm
 able to encrypt a message to a user and I'm able to decrypt that message
 and respond. But in the ticket itself the response I send back is displayed
 as Message body not shown because it is not plain text. with a MIME type
 of application/pgp-encrypted.

 I know about gpg-agent and I've even gone as far as launching gpg-agent as
 the user www-data (the user my webserver uses) but I'm unsure how to cache
 the keys into gpg-agent. Or is this approach completely wrong?


You don't need gpg decryption in UI unless you're using encrypt attachments
in DB option. Can you tell more about your problem? At least URL where you
see encrypted content.




 Oliver

 Details of RT Installation:
 version: 4.0.7
 OS: Debian Wheezy
 webserver: Apache2



 --
 RT Training in Seattle, June 19-20: http://bestpractical.com/training




-- 
Best regards, Ruslan.


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

Re: [rt-users] CF - article - image as attachment - link values to

2013-06-13 Thread Ruslan Zakirov
On Thu, Jun 13, 2013 at 12:00 PM, Alexander Kucheryuk 
alex.kucher...@eltoma-offshore.com wrote:

 Hello!
 I am running RT 4.0.13 on Centos 6.3.
 I have configured CF for articles. Type of CF is upload multiple images.
 When inserting article with that CF (for example, replying to ticket), only
 the name (of image) is inserted, not the image itself. I was thinking of
 bypassing that issue using embedded html (eg. img) and __CustomField__ .
 However, when inserting article into ticket reply, attribute Link values
 to of that CF seems to be completely ignored (plain value - name of the
 image - is inserted). Is it possible to take into account attribute Link
 values to when inserting article into ticket reply ?


It would be good to have articles with images, but it's not implemented in
any way. I think the easiest to implement approach would be to host images
out RT and put img tags into articles. However, any approach would need
implementation.



 Alexander.


 --
 RT Training in Seattle, June 19-20: 
 http://bestpractical.com/**traininghttp://bestpractical.com/training




-- 
Best regards, Ruslan.


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

[rt-users] RT_SiteConfig help

2013-06-13 Thread Heracross77
Hi!
I'm pretty new to RT and i had to install it here at work.
We will use it to manage the computer support request sent by our clients.
I finished installing it, following the tutorial below:
http://simonsmicrophone.com/2011/10/19/rt-4-debian-6-installation/

I'm using Debian Wheezy and RT 4.0.13, with apache2 and mysql.

By now, I still didn't set it up, and I'm accessing RT at a Glance by
'localhost:8080' (I'm using the port 8080 here.)

But, when I get to the RT at a Glance page, after login with root:password,
I just can't access any of the menus avaiable, when I try to enter them, I'm
taken to a page with this error msg: An internal RT error has occurred. Your
administrator can find more details in RT's log files.

My RT_SiteConfig has the following configurations:

Set($rtname, 'rtlti.com');
Set($Organization, 'rtlti.com');
Set($CorrespondAddress, 'cont...@rtlti.com');
Set($CommentAddress, 'cont...@rtlti.com');
Set($DatabaseUser, 'root');
Set($DatabaseName, 'rtlti');

Set($Timezone, America/Sao_Paulo);

Set($DatabaseType, mysql);
Set($DatabasePassword, '---');
Set($DatabaseHost   , 'localhost');
Set($DatabaseRTHost , 'localhost');

Set($WebBaseURL , http://help.rtlti.com;);

I wonder if you guys could give me some tips and good configuration to my RT
files so I can start using it




--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/RT-SiteConfig-help-tp54285.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training


Re: [rt-users] RT_SiteConfig help

2013-06-13 Thread Ruslan Zakirov
On Thu, Jun 13, 2013 at 4:42 PM, Heracross77 heracros...@gmail.com wrote:


 Set($WebBaseURL , http://help.rtlti.com;);


Where did you take an idea that you should set above instead of Base
configuration [1]?

[1]
http://bestpractical.com/rt/docs/latest/RT_Config.html#Base-configuration

Quote from the documentation for the option you set [2]: Usually you don't
want to set these ($WebBaseURL, $WebURL) options.

[2] http://bestpractical.com/rt/docs/latest/RT_Config.html#WebBaseURL-WebURL

-- 
Best regards, Ruslan.


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

Re: [rt-users] RT_SiteConfig help

2013-06-13 Thread Heracross77
But wich configuration can I use to at least start using RT at a Glance page
whitout receiving An internal RT error has occurred. Your administrator can
find more details in RT's log files. error?
I actually need a guide to configure RT and apache2 files after the
instalation to use it in the most simple way.




--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/RT-SiteConfig-help-tp54285p54287.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training


Re: [rt-users] RT_SiteConfig help

2013-06-13 Thread jrios
Hello 

   I installed the RT in the server with port is 8081 ... for work only need
change into the file 


/etc/request-tracker4/RT_SiteConfig.pm



# # THE WEBSERVER:

Set($WebPath , /rt);
Set($WebBaseURL , http://www..com:8081;);


/etc/init.d/apache2 restart


   good luck



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/RT-SiteConfig-help-tp54285p54288.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training


Re: [rt-users] Short URL for saved searches

2013-06-13 Thread Kevin Falcone
On Wed, Jun 12, 2013 at 04:28:07PM +0200, Wasko Lukasz wrote:
  is there any chances for short url linking to saved searches?

Short links have come up a few times, and wouldn't actually be too bad
to implement, but we could never come up with a strong enough use-case
to account for the time needed to implement.

-kevin

 I just created excel web based query but the URLs created by Search Builder
 are too long (over 500 characters). The maximum is 200.
 I have got work around:
 * save search for group
 * create dashboard
 * link saved search to dashbard
 * short URL: http://tickets.interianie/Dashboards/9934
 ..but this is more complicated. Any suggestions? Thanks!


pgp6zW7UA_xHC.pgp
Description: PGP signature


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

Re: [rt-users] Change template resolved for send more information to user

2013-06-13 Thread Kevin Falcone
On Wed, Jun 12, 2013 at 02:50:01PM -0700, jrios wrote:
I want  change the template resolved. because i need send more
 information when resolved tickets.  for example i want send the date started
 ticket  and date resolved tickets 
 
this is new codec into the template 

 Date start: {$Ticket-Started}
 
 Date resolved : {$Ticket-Resolved}
 
The RT send the e-mail is ok , but I have a problem because RT copy the
 data information in UTC format  into time base and my time is -4:30 UTC
 
 Question : How i can change the date format  into the e-mail before the
 send  

Started accesses the field in the database which is UTC.
You likely want
$Ticket-StartedObj-SomeMethod
Pick the format you want from
http://bestpractical.com/rt/docs/latest/RT/Date.html

-AsString is the easiest to use, but may not be what you want.

-kevin


pgp5ikR5J8fwS.pgp
Description: PGP signature


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

Re: [rt-users] Have to restart apache2 after reboot

2013-06-13 Thread rt4
S18apache2 and S19postgresql.

Changed postgresql to S17, but that didn't fix it.



--
View this message in context: 
http://requesttracker.8502.n7.nabble.com/Have-to-restart-apache2-after-reboot-tp54292p54294.html
Sent from the Request Tracker - User mailing list archive at Nabble.com.


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training


[rt-users] Extracting file attachments from tickets

2013-06-13 Thread john boris
We use our rt3.6.6 instance to store reports from our system. Is there a
way I can do an SQL against the database to extract these files without
going into each ticket separatley?

-- 
John J. Boris, Sr.
Online Services
www.onlinesvc.com


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

Re: [rt-users] REST vs GUI: huge performance diference

2013-06-13 Thread Ram
After using a few tools suggested by Tom (MasonX::Profiler and then
NYTProf) it looks to me like the issue imay be in
share/html/REST/1.0/Forms/ticket/default and really relates to a difference
in the default (fields) in GUI quick search compared to what the REST
servicer does.

By changing my query from (the CLI equivalent): rt ls
Requester.EmailAddress=somea...@example.com  to rt ls -f Created, Status,
LastUpdated, Subject Requestor.EmailAddress=somea...@example.com I saw a
round trip time reduction of over 70%.

This change in request was enough to bring the performance of the REST
interface within a reasonable range for my needs.

Hope this helps.
ram



On 06/11/2013 01:42 PM, Ram wrote:
  Hey folks. I'm using rt 4.02 via REST and I noticed a surprising
  difference in performance between using the RT web GUI where a certain
  query takes less than one second and the RT command line where the same
  query takes close to four seconds.
 
  rt ls 'requestor=someu...@example.com mailto:someu...@example.com'
   (takes 3+ seconds)
  rt web UI quick search for someu...@example.com
  mailto:someu...@example.com (takes  1 second)
 
  That user has 133 tickets. If I do this for a user with 6 tickets then
  both methods are essentially instant.
 
  What's going on here?

 Allow me to paste from #rt:

 14:00 @trs ram: the quick search on the web automatically limits to
 active
  statuses.
 14:00 @trs ram: `rt ls` doesn't if you specify a query
 14:00 @trs try `rt ls 'requestor=someu...@example.com and (status=new or
  status=open or status=stalled)'`
 14:00 @trs or similar




-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

[rt-users] Can a scrip do a search like RT::Client::REST does?

2013-06-13 Thread Landon
My scrip looks for currently open Incidents that are related to each of the
IP addresses in CF.{IP} on an Incident Report.  If it finds one it links
the Incident Report to that Incident thus making it unnecessary for someone
to do it manually later.  This might be changed to CustomerID or something
later.

Anyway - The snippet from my scrip that I'd like to modify with something
more native instead of using RT::Client::REST is the following.  Is there a
way to search for tickets without using RT::Client::REST?  I've been
reading through page after page but I'm not able to figure this one out.
 Is this the only way I'll be able to do it?  It works but it logs itself
in to RT via the web interface each time a new Incident Report comes in.

use RT::Client::REST;
use Error qw(:try);
my $rturl = http://.RT-Config-Get('WebDomain');
my $rt = RT::Client::REST-new( server = $rturl, timeout = 30 );
my $user = 'XX';
my $pass = 'XXxx11';
try {
  $rt-login(username = $user, password = $pass);
} catch Exception::Class::Base with {
  die problem logging in: , shift-message;
};

my $ips = $self-TicketObj-CustomFieldValues( 'IP' );
while ( my $ipobj = $ips-Next ) {
  my $ip = $ipobj-Content;
  $RT::Logger-critical(Searching for open incidents related to
.$ip.\n);
  my $query = qq/Queue = 'Incidents' AND Status = 'open' AND CF.{IP} =
'$ip'/;
  my @ids = $rt-search(
type = 'ticket',
query = $query,
  );
  foreach my $id (@ids) {
$RT::Logger-critical(Linking to existing Incident #.$id. for
.$ip.\n);
$self-TicketObj-AddLink( Type='MemberOf', Target= $id );
  }
}


-- 
Landon Stewart landonstew...@gmail.com


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

Re: [rt-users] Can a scrip do a search like RT::Client::REST does?

2013-06-13 Thread k...@rice.edu
On Thu, Jun 13, 2013 at 10:38:06AM -0700, Landon wrote:
 My scrip looks for currently open Incidents that are related to each of the
 IP addresses in CF.{IP} on an Incident Report.  If it finds one it links
 the Incident Report to that Incident thus making it unnecessary for someone
 to do it manually later.  This might be changed to CustomerID or something
 later.
 
 Anyway - The snippet from my scrip that I'd like to modify with something
 more native instead of using RT::Client::REST is the following.  Is there a
 way to search for tickets without using RT::Client::REST?  I've been
 reading through page after page but I'm not able to figure this one out.
  Is this the only way I'll be able to do it?  It works but it logs itself
 in to RT via the web interface each time a new Incident Report comes in.
 
 use RT::Client::REST;
 ...

Hi Landon,

I think you should be able to use RT::Search from your scrip directly.
Check out the API docs.

Cheers,
Ken


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training


Re: [rt-users] Can a scrip do a search like RT::Client::REST does?

2013-06-13 Thread Landon
On 13 June 2013 10:44, k...@rice.edu k...@rice.edu wrote:


 Hi Landon,

 I think you should be able to use RT::Search from your scrip directly.
 Check out the API docs.


Thanks Ken.  The document I found was at
http://bestpractical.com/rt/docs/4.0/RT/Search.html

I don't know how to specify the query though…  Maybe I'm looking at this
wrong?  I'm not really clear on what $arg is for here either.  I thought it
was a parameter, like maybe where one would specify the query, but in the
information below under Argument it says it returns the optional argument
associated with the search.  I find most of the documentation for the API
confusing like this actually.

-- 
Landon Stewart landonstew...@gmail.com


-- 
RT Training in Seattle, June 19-20: http://bestpractical.com/training

Re: [rt-users] Extracting file attachments from tickets

2013-06-13 Thread Emmanuel Lacour

On 13/06/2013 19:10, john boris wrote:

We use our rt3.6.6 instance to store reports from our system. Is there a
way I can do an SQL against the database to extract these files without
going into each ticket separatley?



Look at this script for an example:


http://git.home-dn.net/?p=manu/rt-scripts.git;a=blob_plain;f=rt2xls.pl;hb=HEAD


--
RT Training in Seattle, June 19-20: http://bestpractical.com/training