[rt-users] Custom Status 4.0.2

Ruslan Zakirov ruz at bestpractical.com
Wed Oct 12 15:18:28 EDT 2011


Hi,

Ok. Syntax is ok, but you changed brackets and now things are not what
RT expect them to be. Show you current config so I can help you.

On Wed, Oct 12, 2011 at 10:51 PM, Randy Black <Randy.Black at buckle.com> wrote:
> ok,  i copied and pasted just as it was explained, I then restarted Apache
> and then compiling failed...
>
> 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?
>
> here is what happened, if you need to see the full config, let me know.
>
> Randy
>
> [root at localhost etc]# vi RT_SiteConfig.pm
> [root at localhost etc]# `perl -c etc/RT_SiteConfig.pm`
> Can't open perl script "etc/RT_SiteConfig.pm": No such file or directory
> [root at localhost etc]# `perl -c /apps/rt4/etc/RT_SiteConfig.pm`
> /apps/rt4/etc/RT_SiteConfig.pm syntax OK
> [root at localhost etc]# /etc/init.d/httpd restart
> Stopping httpd:                                            [  OK  ]
> 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.
> Compilation failed in require at /apps/rt4/sbin/../lib/RT/Queue.pm line 161.
> Compilation failed in require at /apps/rt4/sbin/../lib/RT/Scrip.pm line 72.
> BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/Scrip.pm line
> 72.
> Compilation failed in require at /apps/rt4/sbin/../lib/RT/Scrips.pm line 72.
> BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/Scrips.pm line
> 72.
> Compilation failed in require at /apps/rt4/sbin/../lib/RT/Transaction.pm
> line 82.
> BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/Transaction.pm
> line 82.
> Compilation failed in require at /apps/rt4/sbin/../lib/RT/Transactions.pm
> line 73.
> BEGIN failed--compilation aborted at
> /apps/rt4/sbin/../lib/RT/Transactions.pm line 73.
> Compilation failed in require at /apps/rt4/sbin/../lib/RT/Record.pm line
> 1492.
> BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/Record.pm line
> 1492.
> Compilation failed in require at (eval 83) line 3.
>         ...propagated at /usr/share/perl5/base.pm line 94.
> BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/User.pm line
> 70.
> Compilation failed in require at (eval 82) line 3.
>         ...propagated at /usr/share/perl5/base.pm line 94.
> BEGIN failed--compilation aborted at /apps/rt4/sbin/../lib/RT/CurrentUser.pm
> line 97.
> Compilation failed in require at /apps/rt4/sbin/../lib/RT/Handle.pm line
> 238. (/apps/rt4/sbin/../lib/RT.pm:342)
> [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
>                                                            [  OK  ]
>
>
>
> -----Original Message-----
> From: ruslan.zakirov at gmail.com on behalf of Ruslan Zakirov
> Sent: Wed 10/12/2011 12:21 PM
> To: Randy Black
> Cc: RT users
> Subject: Re: [rt-users] Custom Status 4.0.2
>
> On Wed, Oct 12, 2011 at 4:58 PM, Randy Black <Randy.Black at buckle.com> wrote:
>> Hi Ruslan,
>
> Hello,
>
>
>>
>> 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.
>>
>> 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...
>>
>> How do I add "InProgress" and "WaitingOnClient" to the statuses and a
>> "spam" action?
>
> You keep Ccing rt-users@ mailing list so other people can help you %)
>
> First of all, open RT_Config.pm that is, as well, in etc dir. Copy
> default %Lifecycle setting from it into RT_SiteConfig.pm starting from
> "Set(%Lifecycles," ending with ");". Restart your server to make sure
> it worked or run `perl -c etc/RT_SiteConfig.pm` to make sure syntax is
> ok even before restarting server.
>
> Then you can add new statuses. You probably need "active => [...],"
> line. Then for new statuses you add allowed transitions. And so on.
> Just make sure every bracket and quote character is balanced. If you
> don't trust your changes, check syntax with above command after every
> change.
>
>>
>> Thanks much for your help!
>> Randy
>>
>> -----Original Message-----
>> From: ruslan.zakirov at gmail.com [mailto:ruslan.zakirov at gmail.com] On Behalf
>> Of Ruslan Zakirov
>> Sent: Tuesday, October 11, 2011 2:55 PM
>> To: Randy Black
>> Subject: Re: [rt-users] Custom Status 4.0.2
>>
>> On Tue, Oct 11, 2011 at 11:37 PM, Randy Black <Randy.Black at buckle.com>
>> wrote:
>>> I simply copied and pasted the code from some one's prod box posted on
>>> the wiki here:
>>
>> My editor pastes additional braces into code if I paste it in a wrong
>> mode.
>>
>> http://requesttracker.wikia.com/wiki/CustomStatusesInRt4
>>
>> That article copies mostly everything from RT_Config.pm.
>>
>>>
>>> That didn't work, so I tried your suggestions, with leaving the rest
>>> untouched.
>>
>> Why didn't you use defaults from RT_Config.pm?
>>
>>>
>>> Thanks,
>>> Randy
>>>
>>> -----Original Message-----
>>> From: ruslan.zakirov at gmail.com [mailto:ruslan.zakirov at gmail.com] On
>>> Behalf Of Ruslan Zakirov
>>> Sent: Tuesday, October 11, 2011 2:35 PM
>>> To: Randy Black
>>> Cc: RT users
>>> Subject: Re: [rt-users] Custom Status 4.0.2
>>>
>>> On Tue, Oct 11, 2011 at 11:15 PM, Randy Black <Randy.Black at buckle.com>
>>> wrote:
>>>> Tried this - no dice.
>>>
>>> What is "this"? I spotted two most obvious errors. Sadly you have
>>> more. Send the current variant.
>>>
>>>> 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
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: ruslan.zakirov at gmail.com [mailto:ruslan.zakirov at gmail.com] On
>>>> Behalf Of Ruslan Zakirov
>>>> Sent: Tuesday, October 11, 2011 9:26 AM
>>>> To: Randy Black
>>>> Subject: Re: [rt-users] Custom Status 4.0.2
>>>>
>>>> On Tue, Oct 11, 2011 at 2:07 AM, Randy Black <Randy.Black at buckle.com>
>>>> wrote:
>>>>> Using the sample, my config fails to load - it says it fails on line 98
>>>>> which would correspond with the "defaults => {" line (notice the S on
>>>>> defaults, not the "default" line).
>>>>>
>>>>> This example was found @
>>>>> http://requesttracker.wikia.com/wiki/CustomStatusesInRt4 so either the
>>>>> wiki
>>>>> is wrong, I read and implemented something wrong or my sample is
>>>>> wrong....
>>>>>
>>>>> Randy
>>>>>
>>>>>
>>>>> Set(%Lifecycles,
>>>>>
>>>>> default => {
>>>>>         initial => [ 'new' ],
>>>>>         active  => [ 'open', 'ABC', 'At_Client', 'ABC-E', 'Developing',
>>>>> 'stalled' ],
>>>>>         inactive => [ 'resolved', 'rejected', 'deleted' ],
>>>>>         }
>>>>
>>>> this closing bracket should be deleted. Most closing brackets need
>>>> comma or semi right after.
>>>>
>>>>>
>>>>> defaults => {
>>>>>         on_create => 'new',
>>>>>         on_merge  => 'resolved',
>>>>>         approved  => 'open',
>>>>>         denied    => 'rejected',
>>>>>         },
>>>>>
>>>>>
>>>>> transitions => {
>>>>>         => [qw(new open resolved)],
>>>>>         # from   => [ to list ],
>>>>>         new      => [qw(open stalled ABC At_Client ABC-E Developing
>>>>> resolved
>>>>> rejected deleted)],
>>>>>         open     => [qw(stalled ABC At_Client ABC-E Developing resolved
>>>>> rejected deleted)],
>>>>>         ABC   => [qw(open stalled At_Client ABC-E Developing resolved
>>>>> rejected deleted)],
>>>>>         At_Client => [qw(open stalled ABC ABC-E Developing resolved
>>>>> rejected
>>>>> deleted)],
>>>>>         'ABC-E'    => [qw(open stalled ABC At_Client Developing
>>>>> resolved
>>>>> rejected deleted)],
>>>>>         Developing => [qw(open stalled ABC At_Client ABC-E resolved
>>>>> rejected
>>>>> deleted)],
>>>>>         stalled  => [qw(open ABC At_Client ABC-E Developing rejected
>>>>> resolved deleted)],
>>>>>         resolved => [qw(open ABC At_Client ABC-E Developing stalled
>>>>> rejected
>>>>> deleted)],
>>>>>         rejected => [qw(open ABC At_Client ABC-E Developing stalled
>>>>> resolved
>>>>> deleted)],
>>>>>         deleted  => [qw(open ABC At_Client ABC-E Developing stalled
>>>>> rejected
>>>>> resolved)],
>>>>>         },
>>>>>
>>>>> rights => {
>>>>>         '* -> deleted'  => 'DeleteTicket',
>>>>>         '* -> *'        => 'ModifyTicket',
>>>>>         },
>>>>>
>>>>> actions => [
>>>>>         'new -> open'      => { label => 'Open It',  update =>
>>>>> 'Respond' },
>>>>>         'new -> resolved'  => { label => 'Resolve',  update =>
>>>>> 'Comment' },
>>>>>         'new -> rejected'  => { label => 'Reject',   update =>
>>>>> 'Respond' },
>>>>>         'new -> deleted'   => { label =>
>>>>> 'Delete'                        },
>>>>>         'open -> stalled'  => { label => 'Stall',    update =>
>>>>> 'Comment' },
>>>>>         'open -> resolved' => { label => 'Resolve',  update =>
>>>>> 'Comment' },
>>>>>         'open -> rejected' => { label => 'Reject',   update =>
>>>>> 'Respond' },
>>>>>         'stalled -> open'  => { label => 'Open
>>>>> It'                       },
>>>>>         'resolved -> open' => { label => 'Re-open',  update =>
>>>>> 'Comment' },
>>>>>         'rejected -> open' => { label => 'Re-open',  update =>
>>>>> 'Comment' },
>>>>>         ]
>>>>> );
>>>>> );
>>>>
>>>> these two closing parens with semicolons right after looks wrong as
>>>> well.
>>>>
>>>>
>>>> --
>>>> Best regards, Ruslan.
>>>>
>>>
>>>
>>>
>>> --
>>> Best regards, Ruslan.
>>>
>>
>>
>>
>> --
>> Best regards, Ruslan.
>>
>
>
>
> --
> Best regards, Ruslan.
>
>



-- 
Best regards, Ruslan.



More information about the rt-users mailing list