# Any configuration directives you include  here will override 
# RT's default configuration file, RT_Config.pm
#
# To include a directive here, just copy the equivalent statement
# from RT_Config.pm and change the value. We've included a single
# sample value below.
#
# This file is actually a perl module, so you can include valid
# perl code, as well.
#
# The converse is also true, if this file isn't valid perl, you're
# going to run into trouble. To check your SiteConfig file, use
# this comamnd:
#
#   perl -c /path/to/your/etc/RT_SiteConfig.pm
#
# You must restart your webserver after making changes to this file.

Set( $rtname, 'oscon');
Set( $MailCommand, 'testfile' );
# Set( $LogToScreen, 'debug' );
Set( $LogToScreen, 'warn' );
Set( $WebPort, 8080 );
Set( $PreferRichText, 1 );
Set( $ShowMoreAboutPrivilegedUsers, 1 );
Set( $RememberDefaultQueue, 1);
Set($MoreAboutRequestorExtraInfo,
        "Organization, Address1, '__CustomField.{Product Version}__'");
Set(%Lifecycles,
    default => {
        initial         => [ 'new' ],
        active          => [ 'open', 'stalled' ],
        inactive        => [ 'resolved', 'rejected', 'deleted' ],

        defaults => {
            on_create => 'new',
            on_merge  => 'resolved',
            approved  => 'open',
            denied    => 'rejected',
            reminder_on_open     => 'open',
            reminder_on_resolve  => 'resolved',
        },

        transitions => {
            ''       => [qw(new open resolved)],

            # from   => [ to list ],
            new      => [qw(open stalled rejected deleted)],
            open     => [qw(new stalled resolved rejected deleted)],
            stalled  => [qw(new open rejected resolved deleted)],
            resolved => [qw(new open stalled rejected deleted)],
            rejected => [qw(new open stalled resolved deleted)],
            deleted  => [qw(new open stalled rejected resolved)],
        },
        rights => {
            '* -> deleted'  => 'DeleteTicket',
            '* -> *'        => 'ModifyTicket',
        },
        actions => [
            'new -> open'      => {
                label  => 'Open It', # loc
                update => 'Respond',
            },
            'new -> resolved'  => {
                label  => 'Resolve', # loc
                update => 'Respond',
            },
            'new -> rejected'  => {
                label  => 'Reject', # loc
                update => 'Respond',
            },
            'new -> rejected'  => {
                label  => 'Quick Reject', # loc
            },
            'new -> deleted'   => {
                label  => 'Delete', # loc
            },

            'open -> stalled'  => {
                label  => 'Stall', # loc
                update => 'Comment',
            },
            'open -> resolved' => {
                label  => 'Resolve', # loc
                update => 'Comment',
            },
            'open -> rejected' => {
                label  => 'Reject', # loc
                update => 'Respond',
            },

            'stalled -> open'  => {
                label  => 'Open It', # loc
            },
            'resolved -> open' => {
                label  => 'Re-open', # loc
                update => 'Comment',
            },
            'rejected -> open' => {
                label  => 'Re-open', # loc
                update => 'Comment',
            },
            'deleted -> open'  => {
                label  => 'Undelete', # loc
            },
        ],
    },
);


1;
