Kernel::System::Ticket::TimeAccounting::AutoTrack

NAME

Kernel::System::Ticket::TimeAccounting::AutoTrack

DESCRIPTION

Manages API ticket time accounting auto track entries.

CacheTTL

Attribute that holds the time to live value for the caching mechanism.

CacheTTL

Attribute that holds the type for the caching mechanism.

PUBLIC INTERFACE

EntryCreate

add a new record for ticket automatic time accounting tracking

my $ID = $TAAutoTrackObject->EntryCreate( TicketID => 123, UserID => 123, InitialTimeStamp => 123, # unix numeric time stamp (epoch) );

EntryLookup

get the ID of an existing record for ticket automatic time accounting tracking

my $ID = $TAAutoTrackObject->EntryLookup( TicketID => 123, UserID => 123, InitialTimeStamp => 123, # unix numeric time stamp (epoch) Permissive => 1, # optional, default 0, if enabled it will return the ID of the entry that is also # close enough of the InitialTimeStamp (not necessarily the same) );

EntryGet

get the details of an existing record for ticket automatic time accounting tracking

my $Entry = $TAAutoTrackObject->EntryGet( ID => 123, );

or to get the latest entry for a ticket / user combination

my $Entry = $TAAutoTrackObject->EntryGet( TicketID => 123, UserID => 123, );

returns:

    $Entry = {
        ID               => 123,
        TicketID         => 123,
        UserID           => 123,
        InitialTimeStamp => 900,
        LastTimeStamp    => 1000,
        Duration         => 100,
        Paused           => 0,
    };

EntryUpdate

update an existing record for ticket automatic time accounting tracking

my $Entry = $TAAutoTrackObject->EntryUpdate( ID => 123, LastTimeStamp => 999, # unix numeric time stamp (epoch) );

returns:

    $Entry = {
        ID               => 123,
        TicketID         => 123,
        UserID           => 123,
        InitialTimeStamp => 900,
        LastTimeStamp    => 999,
        Duration         => 99,
        Paused           => 0,
    };

EntryPauseSet

set pause or resume state an existing record for ticket automatic time accounting tracking

my $Success = $TAAutoTrackObject->EntryPauseSet( ID => 123, Paused => 0, 0 or 1 );

EntryDelete

remove an existing record for ticket automatic time accounting tracking

my $Success = $TAAutoTrackObject->EntryDelete( ID => 123, );

or

to delete all entries from a ticket and a user

my $Success = $TAAutoTrackObject->EntryDelete( TicketID => 123, UserID => 123 );

EntrySearch

search an existing records for ticket automatic time accounting tracking

my @IDs = $TAAutoTrackObject->EntrySearch( TicketIDs => [123, 456], UserIDs => [123, 456], LastTimeStampEqualOrLower => 123, OrderBy => ['LastTimeStamp'], # LastTimeStamp, InitialTimeStamp, ID, UserID OrderByDirection => ['Up'], # Down or Up );

returns

@IDs = (123, 456, 789);

DurationGet

sum the duration of existing records for ticket automatic time accounting tracking

my $Duration = $TAAutoTrackObject->DurationGet( TicketID => 123, UserID => 123, );

returns

$Duration = 900;

PRIVATE INTERFACE

Scroll to Top