Re: [rt-users] position of the ticket number in the subject

2012-03-07 Thread Ruslan Zakirov
On Wed, Mar 7, 2012 at 00:15, ANDRE LUIS FORIGATO forig...@gmail.com wrote:
 Hello,

 The number of the ticket is placed on the left of the subject.
 I need to put a ticket number on the right side of the subject. Is that
 possible?

Edit all templates and put the following line at the beginning:

Subject: {$Ticket-Subject} [{$Ticket-SubjectTag}]

See autoreply template as reference.

Other way is to patch RT. Subject tag is placed in one place, so it
would be easy patch and you wouldn't need to change every template.


 example:
 Current issue:
 [Test # 857490] Problems slowness ...

 I need to change to:
 Problems slow ... [Test # 857490]
 
 RT Training Sessions (http://bestpractical.com/services/training.html)
 * Boston — March 5  6, 2012



-- 
Best regards, Ruslan.

RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston  March 5  6, 2012

[rt-users] reminders?

2012-03-07 Thread Martin Petersson
Hello,

I´m following this guide http://requesttracker.wikia.com/wiki/Reminders
I don't understand where to paste the code?
   0 6 * * * root /opt/rt4/bin/rt-crontool \
  --search RT::Search::FromSQL \
  --search-arg 'Type = reminder and (Status = open or 
Status = new)' \
  --condition RT::Condition::BeforeDue \
  --condition-arg 2d \
  --action RT::Action::SendEmail \
  --action-arg Owner \
  --transaction first \
  --template 'Reminder due soon'
It´s not in my ordinary crontab, right? Is it in /opt/rt4/bin/rt-crontool? In 
that case, where?

I found this in the file

=head1 NAME

rt-crontool - a tool to act on tickets from an external scheduling tool

=head1 SYNOPSIS

# find all active tickets in the queue 'general' and set their priority to 
99 if they are overdue:
rt-crontool \
  --search RT::Search::ActiveTicketsInQueue  --search-arg general \
  --condition RT::Condition::Overdue \
  --action RT::Action::SetPriority --action-arg 99 \
  --verbose

# Escalate tickets
  rt-crontool \
--search RT::Search::ActiveTicketsInQueue  --search-arg general \
--action RT::Action::EscalatePriority

=head1 DESCRIPTION

This script is a tool to act on tickets from an external scheduling tool, such
as cron.


Med Vänliga Hälsningar/Best Regards

Martin Petersson
*: Office +46 (0)522 98028
*: Fax +46 (0)70 25 79 453
*: www.uanet.sehttp://www.uanet.se/


Gustaf Mattssons Väg 2
451 50 Uddevalla
Orgnr: 556702-4095
Styrelsens säte: Uddevalla
P Please consider the environment before printing this e-mail.


RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston — March 5  6, 2012

Re: [rt-users] Unassigning tickets does not work

2012-03-07 Thread JC Boggio

Just a quick follow-up for the record.

Problem was my fault : I have a scrip modifying a ticket owner as soon as
someone works on the ticket.

There are exceptions, like when the owner is changed.

But RT4 changed the way the transaction stores this owner change :

RT3: Type='Give', Field='Owner'
RT4: Type='Set', Field='Owner'

Hope this helps.

RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston  March 5  6, 2012


[rt-users] RT 4.0.5 Inconsistently sending mail

2012-03-07 Thread Dustin Berube
Good Day,

I am running RT 4.0.5 on Debian 6 (installed from source) with a Postgres
DB backend. Ever since completing the upgrade approximately two weeks ago
we have been seeing the following error intermittently in the UI on
tickets. When we did the upgrade we installed a fresh installation of RT on
a new server and also took the opportunity to migrate from MySQL to
Postgres.

Wed Mar 07 09:08:16 2012The RT System itself - System error
 http://rt.fccv-itsup01.fccoc.local/Ticket/Attachment/92696/56957/
 Sending the previous mail has failed. Please contact your admin, they can
find more details in the logs.

When I look into the logs I see the following actions for the ticket
transaction (reply, comment)

Mar  7 09:08:16 fccv-itsup01 RT:
rt-4.0.5-28242-1331129296-491.4222-...@rt.fccv-itsup01.fccoc.local
#4222/92694 - Scrip 5 On Correspond Notify AdminCcs
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)

Mar  7 09:08:16 fccv-itsup01 RT:
rt-4.0.5-28242-1331129296-361.4222-...@rt.fccv-itsup01.fccoc.local
#4222/92694 - Scrip 7 On Correspond Notify Other Recipients
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)

Mar  7 09:08:16 fccv-itsup01 RT:
rt-4.0.5-28242-1331129296-361.4222-...@rt.fccv-itsup01.fccoc.local No
recipients found. Not sending.
(/opt/rt4/sbin/../lib/RT/Interface/Email.pm:352)

Mar  7 09:08:16 fccv-itsup01 RT:
rt-4.0.5-28242-1331129296-1695.4222-...@rt.fccv-itsup01.fccoc.local
#4222/92694 - Scrip 6 On Correspond Notify Requestors and Ccs
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)

Mar  7 09:08:16 fccv-itsup01 RT:
CurrentUserSelectQueue---22---CreateTicket---0ticketsSelectQueue---22---CreateTicket---1create_in_types_session_idActionsmy_rt_portletsCurrentSearchHashNextPagei
at
/opt/rt4/local/plugins/RTx-AssetTracker/html/Callbacks/AssetTracker/Elements/Tabs/Privileged
line 11.
(/opt/rt4/local/plugins/RTx-AssetTracker/html/Callbacks/AssetTracker/Elements/Tabs/Privileged:11)

The common trend for the tickets that generate these messages is that they
are external users to our organization that are being auto created on
ticket submission. I have verified that the users have valid email address
populated in RT. When this occurs it stops the user correspondence
(auto-reply, reply to ticket, etc) and the Admin CC from being sent.

I should also add that the Scrips being executed in the examples above are
stock script that shipped with RT with no modifications.

Any help on where to look to get further information would be appreciated.

Thanks,
Dustin

RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston — March 5  6, 2012

Re: [rt-users] RT 4.0.5 Inconsistently sending mail

2012-03-07 Thread Thomas Sibley
On 03/07/2012 09:19 AM, Dustin Berube wrote:
 When I look into the logs I see the following actions for the ticket
 transaction (reply, comment)

All of the log lines you provided are normal info log lines.  You will
need to find the actual error message, which should appear in the logs.

Please also send your RT_SiteConfig.pm (with passwords censored) and
details on your outgoing mail configuration.

Thomas

RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston  March 5  6, 2012


Re: [rt-users] reminders?

2012-03-07 Thread Thomas Sibley
On 03/07/2012 06:05 AM, Martin Petersson wrote:
 It´s not in my ordinary crontab, right? Is it in
 /opt/rt4/bin/rt-crontool? In that case, where?

rt-crontool is the program you're running; don't modify it.  The line
you pasted from the wiki page is a crontab line.  You put it in
/etc/crontab or an RT specific crontab file.  You could also extract
just the command and turn it into a simple shell script and drop it into
/etc/cron.d/rt.

Please read man 5 crontab to learn more about cron.

RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston  March 5  6, 2012

Re: [rt-users] RT 4.0.5 Inconsistently sending mail

2012-03-07 Thread Dustin Berube
On Wed, Mar 7, 2012 at 9:50 AM, Thomas Sibley t...@bestpractical.com wrote:

 On 03/07/2012 09:19 AM, Dustin Berube wrote:
  When I look into the logs I see the following actions for the ticket
  transaction (reply, comment)

 All of the log lines you provided are normal info log lines.  You will
 need to find the actual error message, which should appear in the logs.

 Please also send your RT_SiteConfig.pm (with passwords censored) and
 details on your outgoing mail configuration.


Thomas,

I have attached a sanitized copy of my RT_SiteConfig.pm as a text file.
Outgoing mail is routed to a SMTP smart host which is our Exchange server.

I found the error and have included it below.

Mar  7 08:28:11 fccv-itsup01 RT:
rt-4.0.5-28242-1331126891-1857.4222-...@rt.fccv-itsup01.fccoc.local
#4222/92655 - Scrip 3 On Create Autoreply To Requestors
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)

Mar  7 08:28:11 fccv-itsup01 RT:
rt-4.0.5-28242-1331126891-1857.4222-...@rt.fccv-itsup01.fccoc.local:
Could not send mail with command `/usr/sbin/sendmail -oi -t -f
techsupp...@flaglerclerk.com`: couldn't execute program: Cannot allocate
memory at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line
447.#012#012Stack:#012
[/opt/rt4/sbin/../lib/RT/Interface/Email.pm:447]#012
[/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:308]#012
[/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:128]#012
[/opt/rt4/sbin/../lib/RT/ScripAction.pm:232]#012
[/opt/rt4/sbin/../lib/RT/Scrip.pm:475]#012
[/opt/rt4/sbin/../lib/RT/Scrips.pm:198]#012
[/opt/rt4/sbin/../lib/RT/Transaction.pm:201]#012
[/opt/rt4/sbin/../lib/RT/Record.pm:1459]#012
[/opt/rt4/sbin/../lib/RT/Ticket.pm:676]#012
[/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1514]#012
[/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61]
(/opt/rt4/sbin/../lib/RT/Interface/Email.pm:465)

Mar  7 08:28:11 fccv-itsup01 RT:
rt-4.0.5-28242-1331126891-203.4222-...@rt.fccv-itsup01.fccoc.local
#4222/92655 - Scrip 4 On Create Notify AdminCcs
(/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)

Mar  7 08:28:11 fccv-itsup01 RT:
rt-4.0.5-28242-1331126891-203.4222-...@rt.fccv-itsup01.fccoc.local: Could
not send mail with command `/usr/sbin/sendmail -oi -t -f
techsupp...@flaglerclerk.com`: couldn't execute program: Cannot allocate
memory at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line
447.#012#012Stack:#012
[/opt/rt4/sbin/../lib/RT/Interface/Email.pm:447]#012
[/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:308]#012
[/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:128]#012
[/opt/rt4/sbin/../lib/RT/ScripAction.pm:232]#012
[/opt/rt4/sbin/../lib/RT/Scrip.pm:475]#012
[/opt/rt4/sbin/../lib/RT/Scrips.pm:198]#012
[/opt/rt4/sbin/../lib/RT/Transaction.pm:201]#012
[/opt/rt4/sbin/../lib/RT/Record.pm:1459]#012
[/opt/rt4/sbin/../lib/RT/Ticket.pm:676]#012
[/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1514]#012
[/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61]
(/opt/rt4/sbin/../lib/RT/Interface/Email.pm:465)

Let me know if further information is needed.
-Dustin
Set( $rtname, Flagler Clerk's Office);
Set( $Organization, 'rt.fccv-itsup01.fccoc.local');
Set( $Timezone, 'America/New_York');
Set( $DatabaseType, 'Pg');
Set( $DatabaseUser, '##');
Set( $DatabasePassword, '##');
Set( $DatabaseName, 'rt4');
Set( $WebDomain, rt.fccv-itsup01.fccoc.local);
Set( $WebPath, );
Set( $WebBaseURL, http://rt.fccv-itsup01.fccoc.local;);
Set( $MinimumPassowrdLength, 5);

Set( $OwnerEmail, 'root');
Set( $LoopsToRTOwner, 1);
Set( $SendmailArguments, -oi -t -f techsupport\@flaglerclerk.com);

Set( $MaxAttachmentSize , 4000);
Set( $PreferRichText, true);
Set( $TrustHTMLAttachments, true);
Set( $RTAddressRegexp, 
'^((techsupport|ap|vab|rt-ap|rt-vab)\@(flaglerclerk\.com|itsupport\.fccoc\.local))$');
Set( $CorrespondAddress, 'techsupp...@flaglerclerk.com');
Set( $CommentAddress, 'techsupp...@flaglerclerk.com');
Set( $ParseNewMessageForTicketCcs, 1);

Set($UseFriendlyFromLine, 1);
Set($FriendlyFromLineFormat, \%s\ %s);
Set($UseFriendlyToLine, 1);
Set($FriendlyToLineFormat, \%s Ticket #%s\:;);

Set($NotifyActor, 0);
Set($RecordOutgoingEmail, 1);

Set($HomepageComponents, [qw(
 QuickCreate
 Quicksearch
 MyAdminQueues
 MySupportQueues
 MyReminders
 RefreshHomepage
 Dashboards
)]);

Set(@Plugins, (qw(
RTx::AssetTracker
RT::Extension::PriorityAsString
RT::Authen::ExternalAuth
RT::Extension::JSGantt
RT::Extension::CommandByMail
RT::Extension::CustomFieldsOnUpdate
RT::Extension::SpawnLinkedTicketInQueue
 )));
 
# Setup Full Text Searching
Set( %FullTextSearch,
Enable = 1,
Indexed= 1,
Column = 'ContentIndex',

Re: [rt-users] RT 4.0.5 Inconsistently sending mail

2012-03-07 Thread Ruslan Zakirov
On Wed, Mar 7, 2012 at 19:28, Dustin Berube dustin.ber...@gmail.com wrote:
 On Wed, Mar 7, 2012 at 9:50 AM, Thomas Sibley t...@bestpractical.com wrote:

 On 03/07/2012 09:19 AM, Dustin Berube wrote:
  When I look into the logs I see the following actions for the ticket
  transaction (reply, comment)

 All of the log lines you provided are normal info log lines.  You will
 need to find the actual error message, which should appear in the logs.

 Please also send your RT_SiteConfig.pm (with passwords censored) and
 details on your outgoing mail configuration.


 Thomas,

 I have attached a sanitized copy of my RT_SiteConfig.pm as a text file.
 Outgoing mail is routed to a SMTP smart host which is our Exchange server.

 I found the error and have included it below.

RT couldn't start sendmail program as server is out of memory.

 Mar  7 08:28:11 fccv-itsup01 RT:
 rt-4.0.5-28242-1331126891-1857.4222-...@rt.fccv-itsup01.fccoc.local
 #4222/92655 - Scrip 3 On Create Autoreply To Requestors
 (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)

 Mar  7 08:28:11 fccv-itsup01 RT:
 rt-4.0.5-28242-1331126891-1857.4222-...@rt.fccv-itsup01.fccoc.local: Could
 not send mail with command `/usr/sbin/sendmail -oi -t -f
 techsupp...@flaglerclerk.com`: couldn't execute program: Cannot allocate
 memory at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line
 447.#012#012Stack:#012
 [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:447]#012
 [/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:308]#012
 [/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:128]#012
 [/opt/rt4/sbin/../lib/RT/ScripAction.pm:232]#012
 [/opt/rt4/sbin/../lib/RT/Scrip.pm:475]#012
 [/opt/rt4/sbin/../lib/RT/Scrips.pm:198]#012
 [/opt/rt4/sbin/../lib/RT/Transaction.pm:201]#012
 [/opt/rt4/sbin/../lib/RT/Record.pm:1459]#012
 [/opt/rt4/sbin/../lib/RT/Ticket.pm:676]#012
 [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1514]#012
 [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61]
 (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:465)

 Mar  7 08:28:11 fccv-itsup01 RT:
 rt-4.0.5-28242-1331126891-203.4222-...@rt.fccv-itsup01.fccoc.local
 #4222/92655 - Scrip 4 On Create Notify AdminCcs
 (/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:301)

 Mar  7 08:28:11 fccv-itsup01 RT:
 rt-4.0.5-28242-1331126891-203.4222-...@rt.fccv-itsup01.fccoc.local: Could
 not send mail with command `/usr/sbin/sendmail -oi -t -f
 techsupp...@flaglerclerk.com`: couldn't execute program: Cannot allocate
 memory at /opt/rt4/sbin/../lib/RT/Interface/Email.pm line
 447.#012#012Stack:#012
 [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:447]#012
 [/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:308]#012
 [/opt/rt4/sbin/../lib/RT/Action/SendEmail.pm:128]#012
 [/opt/rt4/sbin/../lib/RT/ScripAction.pm:232]#012
 [/opt/rt4/sbin/../lib/RT/Scrip.pm:475]#012
 [/opt/rt4/sbin/../lib/RT/Scrips.pm:198]#012
 [/opt/rt4/sbin/../lib/RT/Transaction.pm:201]#012
 [/opt/rt4/sbin/../lib/RT/Record.pm:1459]#012
 [/opt/rt4/sbin/../lib/RT/Ticket.pm:676]#012
 [/opt/rt4/sbin/../lib/RT/Interface/Email.pm:1514]#012
 [/opt/rt4/share/html/REST/1.0/NoAuth/mail-gateway:61]
 (/opt/rt4/sbin/../lib/RT/Interface/Email.pm:465)

 Let me know if further information is needed.
 -Dustin


 
 RT Training Sessions (http://bestpractical.com/services/training.html)
 * Boston — March 5  6, 2012



-- 
Best regards, Ruslan.

RT Training Sessions (http://bestpractical.com/services/training.html)
* Boston  March 5  6, 2012

Re: [rt-users] RT 4.0.5 Inconsistently sending mail

2012-03-07 Thread Dustin Berube
On Wed, Mar 7, 2012 at 10:57 AM, Ruslan Zakirov r...@bestpractical.comwrote:

 On Wed, Mar 7, 2012 at 19:28, Dustin Berube dustin.ber...@gmail.com
 wrote:
  On Wed, Mar 7, 2012 at 9:50 AM, Thomas Sibley t...@bestpractical.com
 wrote:
 
  On 03/07/2012 09:19 AM, Dustin Berube wrote:
   When I look into the logs I see the following actions for the ticket
   transaction (reply, comment)
 
  All of the log lines you provided are normal info log lines.  You will
  need to find the actual error message, which should appear in the logs.
 
  Please also send your RT_SiteConfig.pm (with passwords censored) and
  details on your outgoing mail configuration.
 
 
  Thomas,
 
  I have attached a sanitized copy of my RT_SiteConfig.pm as a text file.
  Outgoing mail is routed to a SMTP smart host which is our Exchange
 server.
 
  I found the error and have included it below.

 RT couldn't start sendmail program as server is out of memory.

 I noticed that as well after I sent the error to the list. I have dug
further into the issue and found that Apache was consuming most of the
memory on the server. I have tweaked MaxClients and MaxRequestsPerChild and
will post back in a few days with my findings.

Thanks,
Dustin


[rt-users] CustomizingWithLocalDir failed

2012-03-07 Thread Arthur Rance

Hello,

Why doesn't this work ?

cp /usr/local/share/rt40/html/SelfService/Create.html /usr/local/share/rt40/local/html/SelfService/Create.html
vim /usr/local/share/rt40/local/html/SelfService/Create.html
rm -rf /var/run/rt40/mason_data/obj/*
apachectl restart

My modification had no effect on the SelfService interface... Why ?


  

Re: [rt-users] CustomizingWithLocalDir failed

2012-03-07 Thread Tim Cutts

On 7 Mar 2012, at 16:22, Arthur Rance wrote:

 
 Hello,
 
 Why doesn't this work ?
 
 cp /usr/local/share/rt40/html/SelfService/Create.html 
 /usr/local/share/rt40/local/html/SelfService/Create.html
 vim /usr/local/share/rt40/local/html/SelfService/Create.html
 rm -rf /var/run/rt40/mason_data/obj/*
 apachectl restart
 
 My modification had no effect on the SelfService interface... Why ?

Perhaps the cache got recreated between the rm and the apachectl commands, 
because apache was still running?  Try stopping apache completely, then 
removing the mason cache, and then restarting apache.  That's what I usually do.

Tim

--
 The Wellcome Trust Sanger Institute is operated by Genome Research
 Limited, a charity registered in England with number 1021457 and a
 company registered in England with number 2742969, whose registered
 office is 215 Euston Road, London, NW1 2BE.


[rt-users] Print Ticket History

2012-03-07 Thread Izz Abdullah
I was searching through my email archives as well as Google and didn't see 
anything directly related.

I want to be able to add a 'Print Option' to the interface for techs to print 
out the entire ticket history. Can someone guide me in the right direction to 
get started?


Thanks,
Izz


Re: [rt-users] Print Ticket History

2012-03-07 Thread Thomas Sibley
On 03/07/2012 11:37 AM, Izz Abdullah wrote:
 I want to be able to add a ‘Print Option’ to the interface for techs to
 print out the entire ticket history. Can someone guide me in the right
 direction to get started?

RT 4.0.5 ships with a much improved print stylesheet, especially for
tickets.  Try printing from your browser to see what it looks like.

If you really want to add the button in RT instead of using the
browser's print button, you can trigger the browser print dialog with
some javascript.

Thomas


Re: [rt-users] CustomizingWithLocalDir failed

2012-03-07 Thread Arthur Rance

 Subject: Re: [rt-users] CustomizingWithLocalDir failed
 From: t...@sanger.ac.uk
 Date: Wed, 7 Mar 2012 16:32:46 +
 CC: rt-users@lists.bestpractical.com
 To: arthur_ra...@hotmail.com


 On 7 Mar 2012, at 16:22, Arthur Rance wrote:

 
  Hello,
 
  Why doesn't this work ?
 
  cp /usr/local/share/rt40/html/SelfService/Create.html 
  /usr/local/share/rt40/local/html/SelfService/Create.html
  vim /usr/local/share/rt40/local/html/SelfService/Create.html
  rm -rf /var/run/rt40/mason_data/obj/*
  apachectl restart
 
  My modification had no effect on the SelfService interface... Why ?

 Perhaps the cache got recreated between the rm and the apachectl commands, 
 because apache was still running? Try stopping apache completely, then 
 removing the mason cache, and then restarting apache. That's what I usually 
 do.

 Tim


Sorry, I tried the wrong directory. It was /usr/local/www/rt40 in my 
configuration.
/usr/local/www/rt40/SelfService/Create.html
It works now :o)


  

Re: [rt-users] Print Ticket History

2012-03-07 Thread Izz Abdullah
Yeah, I was looking at the print preview of the ticket history, and it is 
including the header / page title and links, as well as actions like queue 
change and whatnot.  It's not pretty.  RT 4.0.2.  I ONLY want the ticket 
history...ok, I can deal with the system changes such as queue changes, RT 
mail, etc in the history, but can I bypass it from showing the Page-Navigation 
and Main-Navigation headers?

Thanks again,
Izz

-Original Message-
From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Thomas Sibley
Sent: Wednesday, March 07, 2012 10:42 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Print Ticket History

On 03/07/2012 11:37 AM, Izz Abdullah wrote:
 I want to be able to add a ‘Print Option’ to the interface for techs 
 to print out the entire ticket history. Can someone guide me in the 
 right direction to get started?

RT 4.0.5 ships with a much improved print stylesheet, especially for tickets.  
Try printing from your browser to see what it looks like.

If you really want to add the button in RT instead of using the browser's print 
button, you can trigger the browser print dialog with some javascript.

Thomas


Re: [rt-users] Print Ticket History

2012-03-07 Thread Thomas Sibley
On 03/07/2012 11:51 AM, Izz Abdullah wrote:
 Yeah, I was looking at the print preview of the ticket history, and
 it is including the header / page title and links, as well as actions
 like queue change and whatnot.  It's not pretty.  RT 4.0.2.  I ONLY
 want the ticket history...ok, I can deal with the system changes such
 as queue changes, RT mail, etc in the history, but can I bypass it
 from showing the Page-Navigation and Main-Navigation headers?

Yes, upgrade to 4.0.5 where we did this work already, like I said...


Re: [rt-users] Aoache help - what have I done?

2012-03-07 Thread Kevin Falcone
On Tue, Mar 06, 2012 at 03:13:04PM -0800, 20/20 Lab wrote:
 On 03/06/2012 1:33 PM, Yan Seiner wrote:
 I have rt4 running quite well on an apache server.  However, I think I got
 a little carried away when I set it up.  here's my perl handler line from
 apache.conf:
 
  Location /
  Order allow,deny
  Allow from all
 
  AddDefaultCharset UTF-8
 
  SetHandler perl-script
  PerlResponseHandler Plack::Handler::Apache2
  PerlSetVar psgi_app /opt/rt4/sbin/rt-server
  /Location
 
 As it turns out, that redirects everything coming in to rt; even a request
 like http://my.server/not_an_RT/page still redirects to the rt login.
 
 What have I done, and how can I fix it?
 
 Would be my guess:
 
 
 Alias /rt /opt/rt4/share/html
 Location /rt
 
 instead of Location /
 
 Your config looks to me that rt is the root of your entire
 webserver,   Tho I had some headaches getting the internal webpage
 to play nice with nagios and rt.

Those aren't the only steps needed to run at /rt
The steps are documented in the
Running RT at /rt rather than / section of docs/web_deployment.pod
shipped with RT.

Yan - your config tells Apache that everything under / is passed to
RT.  What are you trying to do?

-kevin


pgp0XslZXds3d.pgp
Description: PGP signature


Re: [rt-users] RT3.8.7 using custom fields to restrict sending a reply on resolve

2012-03-07 Thread Kenneth Crocker
Chris,

you're welcome. The neat (and sometimes confusing for perl beginners like
me) thing is that with perl you can construct several different
styles/techniques of code that all do the same thing.

Kenn

On Mon, Mar 5, 2012 at 3:17 PM, Chris Herrmann chrisherrma...@gmail.comwrote:

 Thanks Ken, I have it working now. I also found
 http://wiki-archive.bestpractical.com/view/CustomConditionSnippets
 which was very helpful - it actually has a specific example for what
 I'm trying to do. I have a couple of questions too... but first the
 answer:

 
 Condition: UserDefined
 Action: NotifyRequestors
 Template: MyTemplate
 Stage: TransactionCreate

 Custom Condition:
 my $Ticket = $self-TicketObj;

 # We want the Request Feedback CF
 my $TicketType = $Ticket-FirstCustomFieldValue('RequestFeedback');

 # We want resolved status
 return 0 unless $Ticket-Status eq resolved;

 # and... we want the CF to be Y
 return 0 unless $TicketType eq 'Y';
 return 1;
 

 I tried a lot of different variations on the theme, along the lines of:
 return 0 if $cf-$self-TicketObj-FirstCustomFieldValue(RequestFeedback)
 eq N;
 return 0 unless
 $cf-$self-TicketObj-FirstCustomFieldValue(RequestFeedback) eq Y
 return 0 unless
 $cf-$self-TicketObj-FirstCustomFieldValue('RequestFeedback') eq Y

 but these didn't return anything. I assume there's a problem with my
 syntax or how I'm referring to objects but couldn't work it out...
 luckily the page linked above has an example that has exactly what I'm
 after!

 In this case the scrip triggers if the ticket is reopened, then
 resolved again - for us this is OK but for others they might want to
 only trigger this condition the first time a ticket is resolved. I
 think you would need to use another CF to record the result of the
 transaction in this case (i.e. if successful then set
 CF-SentFeedbackRequest=y or similar) and add an appropriate
 condition to check above... but for us it's not required.

 Thanks!
 
 RT Training Sessions (http://bestpractical.com/services/training.html)
 * Boston  March 5  6, 2012



[rt-users] Custom Fields: Elements/ValidateCustomFields never gets values to validate so the Input Must Match... error text is always displayed even when values exist

2012-03-07 Thread Geoff Mayes
Hello,

We're running RT 4.0.4 on RHEL6 and we have noticed that any custom field with 
Validation set (to Mandatory, for example) will always display the 
validation error text Input Must Match [Mandatory] even when the custom field 
is populated with a value.  These error messages are displayed when we view the 
Jumbo version of the ticket or when we click the Custom Fields box link 
which then displays Ticket/Modify.html.  This seems to happen for all types of 
custom fields, but to give one specific example, we're definitely seeing this 
for custom fields using Select one value, Select box, and applies to 
Tickets. 

I've spent the last hour debugging this issue.  Here's what I've found:
- the error text is generated in html/Elements/ValidateCustomFields
- no custom field values end up in html/Elements/ValidateCustomFields (i.e. the 
@values array) because its initial source of values, $ARGSRef, is always empty.
- two of the pages where these errors occur, Tickets/Modify.html and 
Tickets/ModifyAll.html, are calling Elements/ValidateCustomFields with $ARGSRef 
always set to {}, which is why $ARGSRef in ValidateCustomFields is always empty.
- I changed the ValidateCustomFields call in Tickets/Modify.html from $ARGSRef 
= {} to $ARGSRef = \%ARGS, but this only added an id key and value, such as 
this Data::Dumper output: ARGSRef = $VAR1 = {#012  'id' = 
'362208'#012};
- So I'm thinking that (1) ValidateCustomFields needs to be called with 
$ARGSRef = \%ARGS and (2) \%ARGS needs to contain the data that 
ValidateCustomFields expects, which are keys of all the custom fields (e.g. 
Object-RT::Ticket--CustomField-75-Value) and their corresponding values for 
the ticket being processed.

Am I missing something?  Is our installation fried for some reason?  Have we 
forgotten some RT_SiteConfig magic?

Many thanks for any help with this,

Geoff Mayes


Re: [rt-users] Print Ticket History

2012-03-07 Thread Izz Abdullah
I was able to grab the 4.0.5 tarball and modify our current print.css in 4.0.2 
to satisfy my needs based on direction from the 4.0.5 css file.

Thanks!

-Original Message-
From: rt-users-boun...@lists.bestpractical.com 
[mailto:rt-users-boun...@lists.bestpractical.com] On Behalf Of Thomas Sibley
Sent: Wednesday, March 07, 2012 10:55 AM
To: rt-users@lists.bestpractical.com
Subject: Re: [rt-users] Print Ticket History

On 03/07/2012 11:51 AM, Izz Abdullah wrote:
 Yeah, I was looking at the print preview of the ticket history, and it 
 is including the header / page title and links, as well as actions 
 like queue change and whatnot.  It's not pretty.  RT 4.0.2.  I ONLY 
 want the ticket history...ok, I can deal with the system changes such 
 as queue changes, RT mail, etc in the history, but can I bypass it 
 from showing the Page-Navigation and Main-Navigation headers?

Yes, upgrade to 4.0.5 where we did this work already, like I said...


Re: [rt-users] Custom Fields: Elements/ValidateCustomFields never gets values to validate so the Input Must Match... error text is always displayed even when values exist

2012-03-07 Thread Kevin Falcone
On Wed, Mar 07, 2012 at 07:04:35PM +, Geoff Mayes wrote:
 We're running RT 4.0.4 on RHEL6 and we have noticed that any custom
 field with Validation set (to Mandatory, for example) will always
 display the validation error text Input Must Match [Mandatory] even
 when the custom field is populated with a value. These error messages
 are displayed when we view the Jumbo version of the ticket or when
 we click the Custom Fields box link which then displays
 Ticket/Modify.html. This seems to happen for all types of custom
 fields, but to give one specific example, we're definitely seeing this
 for custom fields using Select one value, Select box, and applies
 to Tickets.

The code in question passes an empty argument list so that you always
see This field is mandatory and know that removing content will
cause an error.  This behavior is intended although we've considered
changing it in a major release.

-kevin

 I've spent the last hour debugging this issue.  Here's what I've found:
 - the error text is generated in html/Elements/ValidateCustomFields
 - no custom field values end up in html/Elements/ValidateCustomFields (i.e. 
 the @values array) because its initial source of values, $ARGSRef, is always 
 empty.
 - two of the pages where these errors occur, Tickets/Modify.html and 
 Tickets/ModifyAll.html, are calling Elements/ValidateCustomFields with 
 $ARGSRef always set to {}, which is why $ARGSRef in ValidateCustomFields is 
 always empty.
 - I changed the ValidateCustomFields call in Tickets/Modify.html from 
 $ARGSRef = {} to $ARGSRef = \%ARGS, but this only added an id key and 
 value, such as this Data::Dumper output: ARGSRef = $VAR1 = {#012  
 'id' = '362208'#012};
 - So I'm thinking that (1) ValidateCustomFields needs to be called with 
 $ARGSRef = \%ARGS and (2) \%ARGS needs to contain the data that 
 ValidateCustomFields expects, which are keys of all the custom fields (e.g. 
 Object-RT::Ticket--CustomField-75-Value) and their corresponding values for 
 the ticket being processed.
 
 Am I missing something?  Is our installation fried for some reason?  Have we 
 forgotten some RT_SiteConfig magic?
 
 Many thanks for any help with this,
 
 Geoff Mayes


pgp8gntzCb1mr.pgp
Description: PGP signature


[rt-users] problems installing rt4 on Ubuntu 11.11

2012-03-07 Thread Alan McKay
Hi folks,

I have an Ubuntu 11.11 system that I want to install RT onto, but the MySQL
database is on another system.  And this seems to be an issue even though
the installer seems to think it can do this.

I found this recent thread but the OP did not report back as to how he got
it to work
http://lists.bestpractical.com/pipermail/rt-users/2012-January/074770.html


So what did I do?

I installed the packages via apt-get

apt-get install request-tracker4 rt4-apache2 rt4-clients rt4-db-mysql

and then as part of that, it prompted me for a number of things.  When it
came to the part where it said it wants to configure the database, I told
it I would do it manually because silly me I did not think it would deal
with having the DB on a separate system.  So when the install was done I
went over to my other system and created a DB and user for RT, and gave the
user the proper permissions for the DB.  I verified the permissions were
good by doing the DB creation from the RT system.   I did this :

mysql --user-rt4 --password=rtticket --host=10.246.159.43
--database=requesttracker4  /usr/share/request-tracker4/etc/schema.mysql

Where the IP shown is not my RT system, it is the system with the MySQL DB.
 This command worked well and so I then went about finding all the files
where I had to make changes for this to work.   I thought I had found them,
but when I tried to start Apache I got this :

---snip---
apachectl restart
[Tue Mar  6 21:07:39 2012] [warning]: Use of uninitialized value in
concatenation (.) or string at /usr/share/request-tracker4/lib/RT/Handle.pm
line 242. (/usr/share/request-tracker4/lib/RT/Handle.pm:241)

RT couldn't connect to the database where tickets are stored.
If this is a new installation of RT, you should visit the URL below
to configure RT and initialize your database.

If this is an existing RT installation, this may indicate a database
connectivity problem.

The error RT got back when trying to connect to your database was:

Couldn't find RT_System user in the DB ''
---snip---

And when I went to the URL for it on my RT system, I got this :

---snip---
Permission denied at /usr/share/request-tracker4/html/Install/index.html
line 98.
---snip---

Then after mucking about a bit more I discovered the
Ubuntu dpkg-reconfigure command, which let me re-do the installation and
this time around I told it to go ahead and configure the database for me.
 I answered the questions as best I could and it went ahead to try to do
something useful for me, but I ended back up where I began above.  See
below, where I have replaced the actual FQDN with the text FQDN.   I
then went over to my database and created a user root@FQDN and gave it
full permissions to the database for RT.

I suspect what my problem is, is that this root@FQDN user needs to have
full permission over my entire MySQL database in order to do a database
creation.  But that makes me nervous as heck on my live database!   Maybe
someone can confirm this?

Thanks for any help you can give me.  I'd be happy with being able to
complete the 'dpkg-reconfigure' or with doing it manually.   I thought I
had gotten all the manual stuff in place properly the first time around but
that error on line 98 is what completely stumped me.  It was still lacking
this RT_System user best I could tell, and I could find nowhere to tell
me how to set that up manually.

---snip---
root@bioinfoadmin:/etc/request-tracker4# dpkg-reconfigure
request-tracker4**WARNING**
**WARNING**  If you are using mod_perl or any form of persistent perl
**WARNING**  process such as FastCGI, you will need to restart your
**WARNING**  web server and any persistent processes now.
**WARNING**
dbconfig-common: writing config to
/etc/dbconfig-common/request-tracker4.conf
ERROR 1045 (28000): Access denied for user 'root'@'FQDN' (using password:
YES).
unable to connect to mysql server.
error encountered creating user:
ERROR 1045 (28000): Access denied for user 'root'@'FQDN' (using password:
YES)
dbconfig-common: request-tracker4 configure: trying again.
dbconfig-common: writing config to
/etc/dbconfig-common/request-tracker4.conf
dbconfig-common: flushing administrative password
root@bioinfoadmin:/etc/request-tracker4# !apa
apachectl restart
[Tue Mar  6 21:07:39 2012] [warning]: Use of uninitialized value in
concatenation (.) or string at /usr/share/request-tracker4/lib/RT/Handle.pm
line 242. (/usr/share/request-tracker4/lib/RT/Handle.pm:241)

RT couldn't connect to the database where tickets are stored.
If this is a new installation of RT, you should visit the URL below
to configure RT and initialize your database.

If this is an existing RT installation, this may indicate a database
connectivity problem.

The error RT got back when trying to connect to your database was:

Couldn't find RT_System user in the DB ''

apache2: Could not reliably determine the server's fully qualified domain
name, using 127.0.1.1 for ServerName
---snip---

Oh and one final note, I found this apache config 

Re: [rt-users] problems installing rt4 on Ubuntu 11.11

2012-03-07 Thread Kevin Falcone
On Wed, Mar 07, 2012 at 04:34:03PM -0500, Alan McKay wrote:
 Hi folks,
 
 I have an Ubuntu 11.11 system that I want to install RT onto, but the MySQL
 database is on another system.  And this seems to be an issue even though
 the installer seems to think it can do this.
 
 I found this recent thread but the OP did not report back as to how he got
 it to work
 http://lists.bestpractical.com/pipermail/rt-users/2012-January/074770.html
 
 
 So what did I do?
 
 I installed the packages via apt-get
 
 apt-get install request-tracker4 rt4-apache2 rt4-clients rt4-db-mysql
 
 and then as part of that, it prompted me for a number of things.  When it
 came to the part where it said it wants to configure the database, I told
 it I would do it manually because silly me I did not think it would deal
 with having the DB on a separate system.  So when the install was done I
 went over to my other system and created a DB and user for RT, and gave the
 user the proper permissions for the DB.  I verified the permissions were
 good by doing the DB creation from the RT system.   I did this :
 
 mysql --user-rt4 --password=rtticket --host=10.246.159.43
 --database=requesttracker4  /usr/share/request-tracker4/etc/schema.mysql
 
 Where the IP shown is not my RT system, it is the system with the MySQL DB.
  This command worked well and so I then went about finding all the files
 where I had to make changes for this to work.   I thought I had found them,
 but when I tried to start Apache I got this :
 
 ---snip---
 apachectl restart
 [Tue Mar  6 21:07:39 2012] [warning]: Use of uninitialized value in
 concatenation (.) or string at /usr/share/request-tracker4/lib/RT/Handle.pm
 line 242. (/usr/share/request-tracker4/lib/RT/Handle.pm:241)
 
 RT couldn't connect to the database where tickets are stored.
 If this is a new installation of RT, you should visit the URL below
 to configure RT and initialize your database.
 
 If this is an existing RT installation, this may indicate a database
 connectivity problem.
 
 The error RT got back when trying to connect to your database was:
 
 Couldn't find RT_System user in the DB ''
 ---snip---
 
 And when I went to the URL for it on my RT system, I got this :
 
 ---snip---
 Permission denied at /usr/share/request-tracker4/html/Install/index.html
 line 98.
 ---snip---
 
 Then after mucking about a bit more I discovered the
 Ubuntu dpkg-reconfigure command, which let me re-do the installation and
 this time around I told it to go ahead and configure the database for me.

While I can't answer questions about the Ubuntu process (but the
packager may chime in with answers) your problem is that while you did
part of the RT database install process, RT doesn't expect an empty
database, it expects one with a number of existing pieces of data (hence
your error).

You'll want to review the rt-setup-database --help output.
You could use the --skip-create option to let RT handle the schema and
data pieces, but since you already have the schema in place, you'll
need to run with --action coredata and with --action insert --datafile
/patch/to/where/ubuntu/puts/our/initialdata file.

-kevin


pgpHS6GlGwCN7.pgp
Description: PGP signature