Perl API task subroutines

The Perl API task provides subroutines for querying, updating, and creating tasks.

Subroutines

Subroutine Description Example
create create(optional paramaters)
$task->create();

Creates and inserts Task/Incident/Ticket/SC_Task record into the respective table. Returns the number of created record on succes, undef on failure.

close close(number of record, optional parameters)
$task->close('INC1000312');

Sets the state of Task/Incident/Ticket/SC_Task to closed and updates the respective table. Returns the number of created record on success, undef on failure.

reopen reopen(number of record, optional parameters)
$task->reopen('TKT1003010');

Sets the state of Task/Incident/Ticket/SC_Task to open and updates the respective table.

reassign reassign(number, group, user);
$incident->reassign($number, 'Database', 'user')

Re-assign an incident to the group and user specified.

queryJournal queryJournal(configuration file, optional field name)
$task->queryJournal($config, 'work_notes');

Returns an array of hash references to each journal associated with the current Task/Incident/Ticket/SC_Task. Optional field name refines the search to a specified field.

attach attach(file path)
$task->attach("/Users/davidloo/Desktop/test_files/number_test.xls");

Attach a file to a record of Task.