Base#

NAME#

Kernel::System::ProcessManagement::TransitionAction::Base - A base module

DESCRIPTION#

All TicketStateSet functions.

PUBLIC INTERFACE#

_CheckParams()#

Checks if all necessary parameters are available.

my $Success = $TransitionActionBaseObject->_CheckParams(
    CommonMessage            => 'Message',
    UserID                   => 1,
    Ticket                   => \%Ticket,
    ProcessEntityID          => 'Process-36055bb5a4e5588a4fecc97712cce3e0',
    ActivityEntityID         => 'Activity-a86e85ddbe13912fa95c7cdb511743d8',
    TransitionEntityID       => 'Transition-3355f16e2343ef00cee769cf6601461a',
    TransitionActionEntityID => 'TransitionAction-30dcb7335d2429e8e5a8bd4f2603a614',
    Config                   => {
        UserID => 1,
        # ...
    },
);

Returns:

my $Success = 1;

_GetAttachments()#

Returns an array ref with attachments.

my $Attachment = $BaseObject->_GetAttachments(
    UserID                   => 123,
    Ticket                   => \%Ticket,   # required
    ProcessEntityID          => 'P123',
    ActivityEntityID         => 'A123',
    TransitionEntityID       => 'T123',
    TransitionActionEntityID => 'TA123',
    Config                   => {
        Attachments => '1',
        # ...
    }
);

Returns:

my $Attachment = [];

_OverrideTicketID()#

This function will check if the TA config contains a foreign ticket id or ticket number and will return this ticket id instead of the normal ticket id.

my $Success = $TransitionActionBaseObject->_OverrideTicketID(
    Ticket => {
        TicketID
    },
    Config => {
        ForeignTicketID     => 1,
        # or
        ForeignTicketNumber => 123456789,
    },
);

Returns:

my $Success = 1;

_ReplaceTicketAttributes()#

Replaces ticket attributes.

<OTRS_FIRST_ARTICLE_…> <OTRS_LAST_ARTICLE_…> <OTRS_TICKET_DynamicField_Name1_Value> or <OTRS_Ticket_DynamicField_Name1_Value>. <OTRS_Ticket_*> is deprecated and should be removed in further versions of OTRS.

my $Success = $TransitionActionBaseObject->_ReplaceTicketAttributes(
    UserID => 1,
    Ticket => \%Ticket,
    Config => {
        UserID => 2
    }
);

Returns:

my $Success = 1;

_ReplaceAdditionalAttributes()#

Replaces additional attributes.

my $Success = $TransitionActionBaseObject->_ReplaceAdditionalAttributes(
    UserID => 1,
    Ticket => \%Ticket,
    Config => {
        UserID => 2
    }
);

Returns:

my $Success = 1;

_ConvertScalar2ArrayRef()#

This function will removes all possible heading and tailing white spaces.

my $Data = $TransitionActionBaseObject->_ConvertScalar2ArrayRef(
    Data => ' 1,2 ,3,4 ',
);

Returns:

my $Data = [1,2,3,4];

_ValidDateTimeConvert()#

Converts the date to always be a datetime format.

my $TimeStamp = $AppointmentUpdateActionObject->_ValidDateTimeConvert(
    String => '2019-01-01',
);

Returns:

my $TimeStamp = '2019-01-01 00:00:00';