[rt-users] Custom Status 4.0.2

Ruslan Zakirov ruz at bestpractical.com
Wed Oct 12 13:21:36 EDT 2011


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.



More information about the rt-users mailing list