TicketStateSet

TicketStateSet#

NAME#

Kernel::System::ProcessManagement::TransitionAction::TicketStateSet - A module to set the ticket state

DESCRIPTION#

All TicketStateSet functions.

PUBLIC INTERFACE#

new()#

Don’t use the constructor directly, use the ObjectManager instead:

my $TicketStateSetObject = $Kernel::OM->Get('Kernel::System::ProcessManagement::TransitionAction::TicketStateSet');

Run()#

Runs TransitionAction TicketStateSet.

my $Success = $TicketStateSetActionObject->Run(
    UserID                   => 123,

    # Ticket contains the result of TicketGet including dynamic fields
    Ticket                   => \%Ticket,   # required
    ProcessEntityID          => 'P123',
    ActivityEntityID         => 'A123',
    TransitionEntityID       => 'T123',
    TransitionActionEntityID => 'TA123',

    # Config is the hash stored in a Process::TransitionAction's config key
    Config                   => {
        State   => 'open',
        # or
        StateID => 3,

        PendingTime     => '2016-02-13 12:00',  # optional, set the pending time to a fixed value
        PendingTimeDiff => 123,                 # optional, used for pending states, difference in seconds from
                                                # current time to desired pending time (e.g. a value of 3600 means
                                                # that the pending time will be 1 hr after the Transition Action is
                                                # executed)
        UserID  => 123,                         # optional, to override the UserID from the logged user
    }
);

Returns:

my $Success = 1; # 0