<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>RE: [rt-users] Custom Status 4.0.2</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/plain format -->
<P><FONT SIZE=2>ok, i copied and pasted just as it was explained, I then restarted Apache and then compiling failed...<BR>
<BR>
not sure where to go from here. Do the values from the RT_Config need commented out or does the RT_SiteConfig override those settings?<BR>
<BR>
here is what happened, if you need to see the full config, let me know.<BR>
<BR>
Randy<BR>
<BR>
[root@localhost etc]# vi RT_SiteConfig.pm<BR>
[root@localhost etc]# `perl -c etc/RT_SiteConfig.pm`<BR>
Can't open perl script "etc/RT_SiteConfig.pm": No such file or directory<BR>
[root@localhost etc]# `perl -c /apps/rt4/etc/RT_SiteConfig.pm`<BR>
/apps/rt4/etc/RT_SiteConfig.pm syntax OK<BR>
[root@localhost etc]# /etc/init.d/httpd restart<BR>
Stopping httpd: [ OK ]<BR>
Starting httpd: [Wed Oct 12 18:47:13 2011] [warning]: (in cleanup) Error while loading /apps/rt4/sbin/rt-server: Not a HASH reference at /apps/rt4/sbin/../lib/RT/Lifecycle.pm line 620.<BR>
Compilation failed in require at /apps/rt4/sbin/../lib/RT/Queue.pm line 161.<BR>
Compilation failed in require at /apps/rt4/sbin/../lib/RT/Scrip.pm line 72.<BR>
BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/Scrip.pm line 72.<BR>
Compilation failed in require at /apps/rt4/sbin/../lib/RT/Scrips.pm line 72.<BR>
BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/Scrips.pm line 72.<BR>
Compilation failed in require at /apps/rt4/sbin/../lib/RT/Transaction.pm line 82.<BR>
BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/Transaction.pm line 82.<BR>
Compilation failed in require at /apps/rt4/sbin/../lib/RT/Transactions.pm line 73.<BR>
BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/Transactions.pm line 73.<BR>
Compilation failed in require at /apps/rt4/sbin/../lib/RT/Record.pm line 1492.<BR>
BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/Record.pm line 1492.<BR>
Compilation failed in require at (eval 83) line 3.<BR>
...propagated at /usr/share/perl5/base.pm line 94.<BR>
BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/User.pm line 70.<BR>
Compilation failed in require at (eval 82) line 3.<BR>
...propagated at /usr/share/perl5/base.pm line 94.<BR>
BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/CurrentUser.pm line 97.<BR>
Compilation failed in require at /apps/rt4/sbin/../lib/RT/Handle.pm line 238. (/apps/rt4/sbin/../lib/RT.pm:342)<BR>
[Wed Oct 12 13:47:13 2011] [error] (EAI 2)Name or service not known: Failed to resolve server name for 10.0.1.153 (check DNS) -- or specify an explicit ServerName<BR>
[ OK ]<BR>
<BR>
<BR>
<BR>
-----Original Message-----<BR>
From: ruslan.zakirov@gmail.com on behalf of Ruslan Zakirov<BR>
Sent: Wed 10/12/2011 12:21 PM<BR>
To: Randy Black<BR>
Cc: RT users<BR>
Subject: Re: [rt-users] Custom Status 4.0.2<BR>
<BR>
On Wed, Oct 12, 2011 at 4:58 PM, Randy Black <Randy.Black@buckle.com> wrote:<BR>
> Hi Ruslan,<BR>
<BR>
Hello,<BR>
<BR>
<BR>
><BR>
> That's a good question. I would be pleased to use the defaults. I had limited exposure to RT 3.x and brand new to RT4 as a sys admin. My main goal is to add just a few statuses and a spam action.<BR>
><BR>
> I went to the training in Chicago, but I'm afraid I must have not been caffeinated enough or over caffinated when we went over that section...<BR>
><BR>
> How do I add "InProgress" and "WaitingOnClient" to the statuses and a "spam" action?<BR>
<BR>
You keep Ccing rt-users@ mailing list so other people can help you %)<BR>
<BR>
First of all, open RT_Config.pm that is, as well, in etc dir. Copy<BR>
default %Lifecycle setting from it into RT_SiteConfig.pm starting from<BR>
"Set(%Lifecycles," ending with ");". Restart your server to make sure<BR>
it worked or run `perl -c etc/RT_SiteConfig.pm` to make sure syntax is<BR>
ok even before restarting server.<BR>
<BR>
Then you can add new statuses. You probably need "active => [...],"<BR>
line. Then for new statuses you add allowed transitions. And so on.<BR>
Just make sure every bracket and quote character is balanced. If you<BR>
don't trust your changes, check syntax with above command after every<BR>
change.<BR>
<BR>
><BR>
> Thanks much for your help!<BR>
> Randy<BR>
><BR>
> -----Original Message-----<BR>
> From: ruslan.zakirov@gmail.com [<A HREF="mailto:ruslan.zakirov@gmail.com">mailto:ruslan.zakirov@gmail.com</A>] On Behalf Of Ruslan Zakirov<BR>
> Sent: Tuesday, October 11, 2011 2:55 PM<BR>
> To: Randy Black<BR>
> Subject: Re: [rt-users] Custom Status 4.0.2<BR>
><BR>
> On Tue, Oct 11, 2011 at 11:37 PM, Randy Black <Randy.Black@buckle.com> wrote:<BR>
>> I simply copied and pasted the code from some one's prod box posted on the wiki here:<BR>
><BR>
> My editor pastes additional braces into code if I paste it in a wrong mode.<BR>
><BR>
> <A HREF="http://requesttracker.wikia.com/wiki/CustomStatusesInRt4">http://requesttracker.wikia.com/wiki/CustomStatusesInRt4</A><BR>
><BR>
> That article copies mostly everything from RT_Config.pm.<BR>
><BR>
>><BR>
>> That didn't work, so I tried your suggestions, with leaving the rest untouched.<BR>
><BR>
> Why didn't you use defaults from RT_Config.pm?<BR>
><BR>
>><BR>
>> Thanks,<BR>
>> Randy<BR>
>><BR>
>> -----Original Message-----<BR>
>> From: ruslan.zakirov@gmail.com [<A HREF="mailto:ruslan.zakirov@gmail.com">mailto:ruslan.zakirov@gmail.com</A>] On Behalf Of Ruslan Zakirov<BR>
>> Sent: Tuesday, October 11, 2011 2:35 PM<BR>
>> To: Randy Black<BR>
>> Cc: RT users<BR>
>> Subject: Re: [rt-users] Custom Status 4.0.2<BR>
>><BR>
>> On Tue, Oct 11, 2011 at 11:15 PM, Randy Black <Randy.Black@buckle.com> wrote:<BR>
>>> Tried this - no dice.<BR>
>><BR>
>> What is "this"? I spotted two most obvious errors. Sadly you have<BR>
>> more. Send the current variant.<BR>
>><BR>
>>> Couldn't load RT config file RT_SiteConfig.pm:\n\nsyntax error at /apps/rt4/etc/RT_SiteConfig.pm line 107, near "=>"\nMissing right curly or square bracket at /apps/rt4/etc/RT_SiteConfig.pm line 143, at end of line\nCompilation failed in require at /apps/rt4/sbin/../lib/RT/Config.pm line 888.\n\t(in cleanup) Error while loading /apps/rt4/sbin/rt-server: Couldn't load RT config file RT_SiteConfig.pm:\n\nsyntax error at /apps/rt4/etc/RT_SiteConfig.pm line 107, near "=>"\nMissing right curly or square bracket at /apps/rt4/etc/RT_SiteConfig.pm line 143, at end of line\nCompilation failed in require at /apps/rt4/sbin/../lib/RT/Config.pm line 888.\n<BR>
>>><BR>
>>><BR>
>>> -----Original Message-----<BR>
>>> From: ruslan.zakirov@gmail.com [<A HREF="mailto:ruslan.zakirov@gmail.com">mailto:ruslan.zakirov@gmail.com</A>] On Behalf Of Ruslan Zakirov<BR>
>>> Sent: Tuesday, October 11, 2011 9:26 AM<BR>
>>> To: Randy Black<BR>
>>> Subject: Re: [rt-users] Custom Status 4.0.2<BR>
>>><BR>
>>> On Tue, Oct 11, 2011 at 2:07 AM, Randy Black <Randy.Black@buckle.com> wrote:<BR>
>>>> Using the sample, my config fails to load - it says it fails on line 98<BR>
>>>> which would correspond with the "defaults => {" line (notice the S on<BR>
>>>> defaults, not the "default" line).<BR>
>>>><BR>
>>>> This example was found @<BR>
>>>> <A HREF="http://requesttracker.wikia.com/wiki/CustomStatusesInRt4">http://requesttracker.wikia.com/wiki/CustomStatusesInRt4</A> so either the wiki<BR>
>>>> is wrong, I read and implemented something wrong or my sample is wrong....<BR>
>>>><BR>
>>>> Randy<BR>
>>>><BR>
>>>><BR>
>>>> Set(%Lifecycles,<BR>
>>>><BR>
>>>> default => {<BR>
>>>> initial => [ 'new' ],<BR>
>>>> active => [ 'open', 'ABC', 'At_Client', 'ABC-E', 'Developing',<BR>
>>>> 'stalled' ],<BR>
>>>> inactive => [ 'resolved', 'rejected', 'deleted' ],<BR>
>>>> }<BR>
>>><BR>
>>> this closing bracket should be deleted. Most closing brackets need<BR>
>>> comma or semi right after.<BR>
>>><BR>
>>>><BR>
>>>> defaults => {<BR>
>>>> on_create => 'new',<BR>
>>>> on_merge => 'resolved',<BR>
>>>> approved => 'open',<BR>
>>>> denied => 'rejected',<BR>
>>>> },<BR>
>>>><BR>
>>>><BR>
>>>> transitions => {<BR>
>>>> => [qw(new open resolved)],<BR>
>>>> # from => [ to list ],<BR>
>>>> new => [qw(open stalled ABC At_Client ABC-E Developing resolved<BR>
>>>> rejected deleted)],<BR>
>>>> open => [qw(stalled ABC At_Client ABC-E Developing resolved<BR>
>>>> rejected deleted)],<BR>
>>>> ABC => [qw(open stalled At_Client ABC-E Developing resolved<BR>
>>>> rejected deleted)],<BR>
>>>> At_Client => [qw(open stalled ABC ABC-E Developing resolved rejected<BR>
>>>> deleted)],<BR>
>>>> 'ABC-E' => [qw(open stalled ABC At_Client Developing resolved<BR>
>>>> rejected deleted)],<BR>
>>>> Developing => [qw(open stalled ABC At_Client ABC-E resolved rejected<BR>
>>>> deleted)],<BR>
>>>> stalled => [qw(open ABC At_Client ABC-E Developing rejected<BR>
>>>> resolved deleted)],<BR>
>>>> resolved => [qw(open ABC At_Client ABC-E Developing stalled rejected<BR>
>>>> deleted)],<BR>
>>>> rejected => [qw(open ABC At_Client ABC-E Developing stalled resolved<BR>
>>>> deleted)],<BR>
>>>> deleted => [qw(open ABC At_Client ABC-E Developing stalled rejected<BR>
>>>> resolved)],<BR>
>>>> },<BR>
>>>><BR>
>>>> rights => {<BR>
>>>> '* -> deleted' => 'DeleteTicket',<BR>
>>>> '* -> *' => 'ModifyTicket',<BR>
>>>> },<BR>
>>>><BR>
>>>> actions => [<BR>
>>>> 'new -> open' => { label => 'Open It', update => 'Respond' },<BR>
>>>> 'new -> resolved' => { label => 'Resolve', update => 'Comment' },<BR>
>>>> 'new -> rejected' => { label => 'Reject', update => 'Respond' },<BR>
>>>> 'new -> deleted' => { label => 'Delete' },<BR>
>>>> 'open -> stalled' => { label => 'Stall', update => 'Comment' },<BR>
>>>> 'open -> resolved' => { label => 'Resolve', update => 'Comment' },<BR>
>>>> 'open -> rejected' => { label => 'Reject', update => 'Respond' },<BR>
>>>> 'stalled -> open' => { label => 'Open It' },<BR>
>>>> 'resolved -> open' => { label => 'Re-open', update => 'Comment' },<BR>
>>>> 'rejected -> open' => { label => 'Re-open', update => 'Comment' },<BR>
>>>> ]<BR>
>>>> );<BR>
>>>> );<BR>
>>><BR>
>>> these two closing parens with semicolons right after looks wrong as well.<BR>
>>><BR>
>>><BR>
>>> --<BR>
>>> Best regards, Ruslan.<BR>
>>><BR>
>><BR>
>><BR>
>><BR>
>> --<BR>
>> Best regards, Ruslan.<BR>
>><BR>
><BR>
><BR>
><BR>
> --<BR>
> Best regards, Ruslan.<BR>
><BR>
<BR>
<BR>
<BR>
--<BR>
Best regards, Ruslan.<BR>
<BR>
</FONT>
</P>
</BODY>
</HTML>