Kernel::System::Ticket - ticket lib
All ticket functions.
new()
use Kernel::Config;
use Kernel::System::Encode;
use Kernel::System::Log;
use Kernel::System::Time;
use Kernel::System::Main;
use Kernel::System::DB;
use Kernel::System::Ticket; |
my $ConfigObject = Kernel::Config->new();
my $EncodeObject = Kernel::System::Encode->new(
ConfigObject => $ConfigObject,
);
my $LogObject = Kernel::System::Log->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
);
my $TimeObject = Kernel::System::Time->new(
ConfigObject => $ConfigObject,
LogObject => $LogObject,
);
my $MainObject = Kernel::System::Main->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
);
my $DBObject = Kernel::System::DB->new(
ConfigObject => $ConfigObject,
EncodeObject => $EncodeObject,
LogObject => $LogObject,
MainObject => $MainObject,
);
my $TicketObject = Kernel::System::Ticket->new(
ConfigObject => $ConfigObject,
LogObject => $LogObject,
DBObject => $DBObject,
MainObject => $MainObject,
TimeObject => $TimeObject,
EncodeObject => $EncodeObject,
GroupObject => $GroupObject, # if given
CustomerUserObject => $CustomerUserObject, # if given
QueueObject => $QueueObject, # if given
); |
TicketCreateNumber()
my $TicketNumber = $TicketObject->TicketCreateNumber(); |
TicketCheckNumber()
my $TicketID = $TicketObject->TicketCheckNumber(
Tn => '200404051004575',
); |
TicketCreate()
my $TicketID = $TicketObject->TicketCreate(
Title => 'Some Ticket Title',
Queue => 'Raw', # or QueueID => 123,
Lock => 'unlock',
Priority => '3 normal', # or PriorityID => 2,
State => 'new', # or StateID => 5,
CustomerID => '123465',
CustomerUser => 'customer@example.com',
OwnerID => 123,
UserID => 123,
); |
or
my $TicketID = $TicketObject->TicketCreate(
TN => $TicketObject->TicketCreateNumber(), # optional
Title => 'Some Ticket Title',
Queue => 'Raw', # or QueueID => 123,
Lock => 'unlock',
Priority => '3 normal', # or PriorityID => 2,
State => 'new', # or StateID => 5,
Type => 'normal', # or TypeID => 1, not required
Service => 'Service A', # or ServiceID => 1, not required
SLA => 'SLA A', # or SLAID => 1, not required
CustomerID => '123465',
CustomerUser => 'customer@example.com',
OwnerID => 123,
ResponsibleID => 123, # not required
ArchiveFlag => 'y', # (y|n) not required
UserID => 123,
); |
Events: TicketCreate
TicketDelete()
my $Success = $TicketObject->TicketDelete(
TicketID => 123,
UserID => 123,
); |
Events: TicketDelete
TicketIDLookup()
my $TicketID = $TicketObject->TicketIDLookup(
TicketNumber => '2004040510440485',
UserID => 123,
); |
TicketNumberLookup()
my $TicketNumber = $TicketObject->TicketNumberLookup(
TicketID => 123,
UserID => 123,
); |
TicketSubjectBuild()This will generate a subject like ``RE: [Ticket# 2004040510440485] Some subject''
my $NewSubject = $TicketObject->TicketSubjectBuild(
TicketNumber => '2004040510440485',
Subject => $OldSubject,
Action => 'Reply',
); |
This will generate a subject like ``[Ticket# 2004040510440485] Some subject'' (so without RE: )
my $NewSubject = $TicketObject->TicketSubjectBuild(
TicketNumber => '2004040510440485',
Subject => $OldSubject,
Type => 'New',
Action => 'Reply',
); |
This will generate a subject like ``FWD: [Ticket# 2004040510440485] Some subject''
my $NewSubject = $TicketObject->TicketSubjectBuild(
TicketNumber => '2004040510440485',
Subject => $OldSubject,
Action => 'Forward', # Possible values are Reply and Forward, Reply is default.
); |
This will generate a subject like ``[Ticket# 2004040510440485] Re: Some subject'' (so without clean-up of subject)
my $NewSubject = $TicketObject->TicketSubjectBuild(
TicketNumber => '2004040510440485',
Subject => $OldSubject,
Type => 'New',
NoCleanup => 1,
); |
TicketSubjectClean()
my $NewSubject = $TicketObject->TicketSubjectClean(
TicketNumber => '2004040510440485',
Subject => $OldSubject,
Size => $SubjectSizeToBeDisplayed # optional
); |
TicketGet()
my %Ticket = $TicketObject->TicketGet(
TicketID => 123,
DynamicFields => 1, # Optional. To include the dynamic field values for this ticket on the return structure.
UserID => 123,
); |
Returns:
%Ticket = (
TicketNumber => '20101027000001',
Title => 'some title',
TicketID => 123,
State => 'some state',
StateID => 123,
StateType => 'some state type',
Priority => 'some priority',
PriorityID => 123,
Lock => 'lock',
LockID => 123,
Queue => 'some queue',
QueueID => 123,
CustomerID => 'customer_id_123',
CustomerUserID => 'customer_user_id_123',
Owner => 'some_owner_login',
OwnerID => 123,
Type => 'some ticket type',
TypeID => 123,
SLA => 'some sla',
SLAID => 123,
Service => 'some service',
ServiceID => 123,
Responsible => 'some_responsible_login',
ResponsibleID => 123,
Age => 3456,
Created => '2010-10-27 20:15:00'
CreateTimeUnix => '1231414141',
CreateBy => 123,
Changed => '2010-10-27 20:15:15',
ChangeBy => 123,
ArchiveFlag => 'y', |
# If DynamicFields => 1 was passed, you'll get an entry like this for each dynamic field:
DynamicField_X => 'value_x', |
# (time stamps of expected escalations)
EscalationResponseTime (unix time stamp of response time escalation)
EscalationUpdateTime (unix time stamp of update time escalation)
EscalationSolutionTime (unix time stamp of solution time escalation) |
# (general escalation info of nearest escalation type)
EscalationDestinationIn (escalation in e. g. 1h 4m)
EscalationDestinationTime (date of escalation in unix time, e. g. 72193292)
EscalationDestinationDate (date of escalation, e. g. "2009-02-14 18:00:00")
EscalationTimeWorkingTime (seconds of working/service time till escalation, e. g. "1800")
EscalationTime (seconds total till escalation of nearest escalation time type - response, update or solution time, e. g. "3600") |
# (detailed escalation info about first response, update and solution time)
FirstResponseTimeEscalation (if true, ticket is escalated)
FirstResponseTimeNotification (if true, notify - x% of escalation has reached)
FirstResponseTimeDestinationTime (date of escalation in unix time, e. g. 72193292)
FirstResponseTimeDestinationDate (date of escalation, e. g. "2009-02-14 18:00:00")
FirstResponseTimeWorkingTime (seconds of working/service time till escalation, e. g. "1800")
FirstResponseTime (seconds total till escalation, e. g. "3600") |
UpdateTimeEscalation (if true, ticket is escalated)
UpdateTimeNotification (if true, notify - x% of escalation has reached)
UpdateTimeDestinationTime (date of escalation in unix time, e. g. 72193292)
UpdateTimeDestinationDate (date of escalation, e. g. "2009-02-14 18:00:00")
UpdateTimeWorkingTime (seconds of working/service time till escalation, e. g. "1800")
UpdateTime (seconds total till escalation, e. g. "3600") |
SolutionTimeEscalation (if true, ticket is escalated)
SolutionTimeNotification (if true, notify - x% of escalation has reached)
SolutionTimeDestinationTime (date of escalation in unix time, e. g. 72193292)
SolutionTimeDestinationDate (date of escalation, e. g. "2009-02-14 18:00:00")
SolutionTimeWorkingTime (seconds of working/service time till escalation, e. g. "1800")
SolutionTime (seconds total till escalation, e. g. "3600")
); |
To get extended ticket attributes, use param Extended:
my %Ticket = $TicketObject->TicketGet(
TicketID => 123,
UserID => 123,
Extended => 1,
); |
Additional params are:
%Ticket = (
FirstResponse (timestamp of first response, first contact with customer)
FirstResponseInMin (minutes till first response)
FirstResponseDiffInMin (minutes till or over first response) |
SolutionTime (timestamp of solution time, also close time)
SolutionInMin (minutes till solution time)
SolutionDiffInMin (minutes till or over solution time) |
FirstLock (timestamp of first lock)
); |
TicketTitleUpdate()
my $Success = $TicketObject->TicketTitleUpdate(
Title => 'Some Title',
TicketID => 123,
UserID => 1,
); |
Events: TicketTitleUpdate
TicketUnlockTimeoutUpdate()
my $Success = $TicketObject->TicketUnlockTimeoutUpdate(
UnlockTimeout => $TimeObject->SystemTime(),
TicketID => 123,
UserID => 143,
); |
Events: TicketUnlockTimeoutUpdate
TicketQueueID()
my $QueueID = $TicketObject->TicketQueueID(
TicketID => 123,
); |
TicketMoveList()
my %Queues = $TicketObject->TicketMoveList(
Type => 'create',
UserID => 123,
); |
my %Queues = $TicketObject->TicketMoveList(
QueueID => 123,
UserID => 123,
); |
my %Queues = $TicketObject->TicketMoveList(
TicketID => 123,
UserID => 123,
); |
TicketQueueSet()
my $Success = $TicketObject->TicketQueueSet(
QueueID => 123,
TicketID => 123,
UserID => 123,
); |
my $Success = $TicketObject->TicketQueueSet(
Queue => 'Some Queue Name',
TicketID => 123,
UserID => 123,
); |
my $Success = $TicketObject->TicketQueueSet(
Queue => 'Some Queue Name',
TicketID => 123,
Comment => 'some comment', # optional
ForceNotificationToUserID => [1,43,56], # if you want to force somebody
UserID => 123,
); |
Optional attribute: SendNoNotification disables or enables agent and customer notification for this action.
For example:
SendNoNotification => 0, # optional 1|0 (send no agent and customer notification) |
Events: TicketQueueUpdate
TicketMoveQueueList()
my @QueueIDList = $TicketObject->TicketMoveQueueList(
TicketID => 123,
Type => 'ID',
); |
Returns:
@QueueIDList = ( 1, 2, 3 ); |
my @QueueList = $TicketObject->TicketMoveQueueList(
TicketID => 123,
Type => 'Name',
); |
Returns:
@QueueList = ( 'QueueA', 'QueueB', 'QueueC' ); |
TicketTypeList()
my %Types = $TicketObject->TicketTypeList(
UserID => 123,
); |
my %Types = $TicketObject->TicketTypeList(
QueueID => 123,
UserID => 123,
); |
my %Types = $TicketObject->TicketTypeList(
TicketID => 123,
UserID => 123,
); |
Returns:
%Types = (
1 => 'default',
2 => 'request',
3 => 'offer',
); |
TicketTypeSet()
my $Success = $TicketObject->TicketTypeSet(
TypeID => 123,
TicketID => 123,
UserID => 123,
); |
my $Success = $TicketObject->TicketTypeSet(
Type => 'normal',
TicketID => 123,
UserID => 123,
); |
Events: TicketTypeUpdate
TicketServiceList()
my %Services = $TicketObject->TicketServiceList(
QueueID => 123,
UserID => 123,
); |
my %Services = $TicketObject->TicketServiceList(
CustomerUserID => 123,
QueueID => 123,
); |
my %Services = $TicketObject->TicketServiceList(
CustomerUserID => 123,
TicketID => 123,
UserID => 123,
); |
Returns:
%Services = (
1 => 'ServiceA',
2 => 'ServiceB',
3 => 'ServiceC',
); |
TicketServiceSet()
my $Success = $TicketObject->TicketServiceSet(
ServiceID => 123,
TicketID => 123,
UserID => 123,
); |
my $Success = $TicketObject->TicketServiceSet(
Service => 'Service A',
TicketID => 123,
UserID => 123,
); |
Events: TicketServiceUpdate
TicketEscalationPreferences()
my %Escalation = $TicketObject->TicketEscalationPreferences(
Ticket => $Param{Ticket},
UserID => $Param{UserID},
); |
TicketEscalationDateCalculation()
my %Escalation = $TicketObject->TicketEscalationDateCalculation(
Ticket => $Param{Ticket},
UserID => $Param{UserID},
); |
it returnes
(general escalation info)
EscalationDestinationIn (escalation in e. g. 1h 4m)
EscalationDestinationTime (date of escalation in unix time, e. g. 72193292)
EscalationDestinationDate (date of escalation, e. g. "2009-02-14 18:00:00")
EscalationTimeWorkingTime (seconds of working/service time till escalation, e. g. "1800")
EscalationTime (seconds total till escalation, e. g. "3600") |
(detail escalation info about first response, update and solution time)
FirstResponseTimeEscalation (if true, ticket is escalated)
FirstResponseTimeNotification (if true, notify - x% of escalation has reached)
FirstResponseTimeDestinationTime (date of escalation in unix time, e. g. 72193292)
FirstResponseTimeDestinationDate (date of escalation, e. g. "2009-02-14 18:00:00")
FirstResponseTimeWorkingTime (seconds of working/service time till escalation, e. g. "1800")
FirstResponseTime (seconds total till escalation, e. g. "3600") |
UpdateTimeEscalation (if true, ticket is escalated)
UpdateTimeNotification (if true, notify - x% of escalation has reached)
UpdateTimeDestinationTime (date of escalation in unix time, e. g. 72193292)
UpdateTimeDestinationDate (date of escalation, e. g. "2009-02-14 18:00:00")
UpdateTimeWorkingTime (seconds of working/service time till escalation, e. g. "1800")
UpdateTime (seconds total till escalation, e. g. "3600") |
SolutionTimeEscalation (if true, ticket is escalated)
SolutionTimeNotification (if true, notify - x% of escalation has reached)
SolutionTimeDestinationTime (date of escalation in unix time, e. g. 72193292)
SolutionTimeDestinationDate (date of escalation, e. g. "2009-02-14 18:00:00")
SolutionTimeWorkingTime (seconds of working/service time till escalation, e. g. "1800")
SolutionTime (seconds total till escalation, e. g. "3600") |
TicketEscalationIndexBuild()
my $Success = $TicketObject->TicketEscalationIndexBuild(
TicketID => $Param{TicketID},
UserID => $Param{UserID},
); |
TicketSLAList()
my %SLAs = $TicketObject->TicketSLAList(
ServiceID => 1,
UserID => 123,
); |
my %SLAs = $TicketObject->TicketSLAList(
QueueID => 123,
ServiceID => 1,
UserID => 123,
); |
my %SLAs = $TicketObject->TicketSLAList(
TicketID => 123,
ServiceID => 1,
UserID => 123,
); |
Returns:
%SLAs = (
1 => 'SLA A',
2 => 'SLA B',
3 => 'SLA C',
); |
TicketSLASet()
my $Success = $TicketObject->TicketSLASet(
SLAID => 123,
TicketID => 123,
UserID => 123,
); |
my $Success = $TicketObject->TicketSLASet(
SLA => 'SLA A',
TicketID => 123,
UserID => 123,
); |
Events: TicketSLAUpdate
TicketCustomerSet()
my $Success = $TicketObject->TicketCustomerSet(
No => 'client123',
User => 'client-user-123',
TicketID => 123,
UserID => 23,
); |
Events: TicketCustomerUpdate
TicketFreeTextSet()Set ticket free text.
my $Success = $TicketObject->TicketFreeTextSet(
Counter => 1,
Key => 'Planet', # optional
Value => 'Sun', # optional
TicketID => 123,
UserID => 23,
); |
Events: TicketFreeTextUpdate
TicketFreeTimeSet()Set ticket free text.
my $Success = $TicketObject->TicketFreeTimeSet(
Counter => 1,
Prefix => 'TicketFreeTime',
TicketFreeTime1Year => 1900,
TicketFreeTime1Month => 12,
TicketFreeTime1Day => 24,
TicketFreeTime1Hour => 22,
TicketFreeTime1Minute => 01,
TicketID => 123,
UserID => 23,
); |
If you want to set a FreeTime value to null, just supply zeros:
my $Success = $TicketObject->TicketFreeTimeSet(
Counter => 1,
Prefix => 'TicketFreeTime',
TicketFreeTime1Year => 0,
TicketFreeTime1Month => 0,
TicketFreeTime1Day => 0,
TicketFreeTime1Hour => 0,
TicketFreeTime1Minute => 0,
TicketID => 123,
UserID => 23,
); |
Events: TicketFreeTimeUpdate
TicketPermission()
my $Access = $TicketObject->TicketPermission(
Type => 'ro',
TicketID => 123,
UserID => 123,
); |
or without logging, for example for to check if a link/action should be shown
my $Access = $TicketObject->TicketPermission(
Type => 'ro',
TicketID => 123,
LogNo => 1,
UserID => 123,
); |
TicketCustomerPermission()
my $Access = $TicketObject->TicketCustomerPermission(
Type => 'ro',
TicketID => 123,
UserID => 123,
); |
or without logging, for example for to check if a link/action should be displayed
my $Access = $TicketObject->TicketCustomerPermission(
Type => 'ro',
TicketID => 123,
LogNo => 1,
UserID => 123,
); |
GetSubscribedUserIDsByQueueID()
my @UserIDs = $TicketObject->GetSubscribedUserIDsByQueueID(
QueueID => 123,
); |
Returns:
@UserIDs = ( 1, 2, 3 ); |
TicketPendingTimeSet()
my $Success = $TicketObject->TicketPendingTimeSet(
Year => 2003,
Month => 08,
Day => 14,
Hour => 22,
Minute => 05,
TicketID => 123,
UserID => 23,
); |
or use a time stamp:
my $Success = $TicketObject->TicketPendingTimeSet(
String => '2003-08-14 22:05:00',
TicketID => 123,
UserID => 23,
); |
If you want to set the pending time to null, just supply zeros:
my $Success = $TicketObject->TicketPendingTimeSet(
Year => 0000,
Month => 00,
Day => 00,
Hour => 00,
Minute => 00,
TicketID => 123,
UserID => 23,
); |
or use a time stamp:
my $Success = $TicketObject->TicketPendingTimeSet(
String => '0000-00-00 00:00:00',
TicketID => 123,
UserID => 23,
); |
Events: TicketPendingTimeUpdate
TicketLockGet()
if ($TicketObject->TicketLockGet(TicketID => 123)) {
print "Ticket is locked!\n";
}
else {
print "Ticket is not locked!\n";
} |
TicketLockSet()
my $Success = $TicketObject->TicketLockSet(
Lock => 'lock',
TicketID => 123,
UserID => 123,
); |
my $Success = $TicketObject->TicketLockSet(
LockID => 1,
TicketID => 123,
UserID => 123,
); |
Optional attribute: SendNoNotification, disable or enable agent and customer notification for this action. Otherwise a notification will be send to agent and cusomer.
For example:
SendNoNotification => 0, # optional 1|0 (send no agent and customer notification) |
Events: TicketLockUpdate
TicketArchiveFlagSet()
my $Success = $TicketObject->TicketArchiveFlagSet(
ArchiveFlag => 'y', # (y|n)
TicketID => 123,
UserID => 123,
); |
Events: TicketArchiveFlagUpdate
TicketStateSet()
my $Success = $TicketObject->TicketStateSet(
State => 'open',
TicketID => 123,
UserID => 123,
); |
my $Success = $TicketObject->TicketStateSet(
StateID => 3,
TicketID => 123,
UserID => 123,
); |
Optional attribute: SendNoNotification, disable or enable agent and customer notification for this action. Otherwise a notification will be send to agent and cusomer.
For example:
SendNoNotification => 0, # optional 1|0 (send no agent and customer notification) |
Events: TicketStateUpdate
TicketStateList()
my %States = $TicketObject->TicketStateList(
TicketID => 123,
UserID => 123,
); |
my %States = $TicketObject->TicketStateList(
QueueID => 123,
UserID => 123,
); |
my %States = $TicketObject->TicketStateList(
TicketID => 123,
Type => 'open',
UserID => 123,
); |
Returns:
%States = (
1 => 'State A',
2 => 'State B',
3 => 'State C',
); |
OwnerCheck()
my ($OwnerID, $Owner) = $TicketObject->OwnerCheck(
TicketID => 123,
); |
or for access control
my $AccessOk = $TicketObject->OwnerCheck(
TicketID => 123,
OwnerID => 321,
); |
TicketOwnerSet()by using user id
my $Success = $TicketObject->TicketOwnerSet(
TicketID => 123,
NewUserID => 555,
UserID => 123,
); |
by using user login
my $Success = $TicketObject->TicketOwnerSet(
TicketID => 123,
NewUser => 'some-user-login',
UserID => 123,
); |
Return: 1 = owner has been set 2 = this owner is already set, no update needed
Optional attribute: SendNoNotification, disable or enable agent and customer notification for this action. Otherwise a notification will be send to agent and cusomer.
For example:
SendNoNotification => 0, # optional 1|0 (send no agent and customer notification) |
Events: TicketOwnerUpdate
TicketOwnerList()
my @Owner = $TicketObject->TicketOwnerList(
TicketID => 123,
); |
Returns:
@Owner = (
{
UserFirstname => 'SomeName',
UserLastname => 'SomeName',
UserEmail => 'some@example.com',
# custom attributes
},
{
UserFirstname => 'SomeName',
UserLastname => 'SomeName',
UserEmail => 'some@example.com',
# custom attributes
},
); |
TicketResponsibleSet()by using user id
my $Success = $TicketObject->TicketResponsibleSet(
TicketID => 123,
NewUserID => 555,
UserID => 213,
); |
by using user login
my $Success = $TicketObject->TicketResponsibleSet(
TicketID => 123,
NewUser => 'some-user-login',
UserID => 213,
); |
Return: 1 = responsible has been set 2 = this responsible is already set, no update needed
Optional attribute: SendNoNotification, disable or enable agent and customer notification for this action. Otherwise a notification will be send to agent and cusomer.
For example:
SendNoNotification => 0, # optional 1|0 (send no agent and customer notification) |
Events: TicketResponsibleUpdate
TicketResponsibleList()
my @Responsible = $TicketObject->TicketResponsibleList(
TicketID => 123,
); |
Returns:
@Responsible = (
{
UserFirstname => 'SomeName',
UserLastname => 'SomeName',
UserEmail => 'some@example.com',
# custom attributes
},
{
UserFirstname => 'SomeName',
UserLastname => 'SomeName',
UserEmail => 'some@example.com',
# custom attributes
},
); |
TicketInvolvedAgentsList()
my @InvolvedAgents = $TicketObject->TicketInvolvedAgentsList(
TicketID => 123,
); |
Returns:
@InvolvedAgents = (
{
UserFirstname => 'SomeName',
UserLastname => 'SomeName',
UserEmail => 'some@example.com',
# custom attributes
},
{
UserFirstname => 'AnotherName',
UserLastname => 'AnotherName',
UserEmail => 'another@example.com',
# custom attributes
},
); |
TicketPrioritySet()
my $Success = $TicketObject->TicketPrioritySet(
TicketID => 123,
Priority => 'low',
UserID => 213,
); |
my $Success = $TicketObject->TicketPrioritySet(
TicketID => 123,
PriorityID => 2,
UserID => 213,
); |
Events: TicketPriorityUpdate
TicketPriorityList()
my %Priorities = $TicketObject->TicketPriorityList(
TicketID => 123,
UserID => 123,
); |
my %Priorities = $TicketObject->TicketPriorityList(
QueueID => 123,
UserID => 123,
); |
Returns:
%Priorities = (
1 => 'Priority A',
2 => 'Priority B',
3 => 'Priority C',
); |
HistoryTicketStatusGet()
my %Tickets = $TicketObject->HistoryTicketStatusGet(
StartDay => 12,
StartMonth => 1,
StartYear => 2006,
StopDay => 18,
StopMonth => 1,
StopYear => 2006,
Force => 0,
); |
HistoryTicketGet()
my %HistoryData = $TicketObject->HistoryTicketGet(
StopYear => 2003,
StopMonth => 12,
StopDay => 24,
TicketID => 123,
Force => 0,
); |
returns
TicketNumber
TicketID
Type
TypeID
Queue
QueueID
Priority
PriorityID
State
StateID
Owner
OwnerID
CreateUserID
CreateTime (timestamp)
CreateOwnerID
CreatePriority
CreatePriorityID
CreateState
CreateStateID
CreateQueue
CreateQueueID
LockFirst (timestamp)
LockLast (timestamp)
UnlockFirst (timestamp)
UnlockLast (timestamp) |
HistoryTypeLookup()
my $ID = $TicketObject->HistoryTypeLookup( Type => 'Move' ); |
HistoryAdd()
my $Success = $TicketObject->HistoryAdd(
Name => 'Some Comment',
HistoryType => 'Move', # see system tables
TicketID => 123,
ArticleID => 1234, # not required!
QueueID => 123, # not required!
TypeID => 123, # not required!
CreateUserID => 123,
); |
Events: HistoryAdd
HistoryGet()
my @HistoryLines = $TicketObject->HistoryGet(
TicketID => 123,
UserID => 123,
); |
HistoryDelete()
my $Success = $TicketObject->HistoryDelete(
TicketID => 123,
UserID => 123,
); |
Events: HistoryDelete
TicketAccountedTimeGet()
my $AccountedTime = $TicketObject->TicketAccountedTimeGet(TicketID => 1234); |
TicketAccountTime()
my $Success = $TicketObject->TicketAccountTime(
TicketID => 1234,
ArticleID => 23542,
TimeUnit => '4.5',
UserID => 1,
); |
Events: TicketAccountTime
TicketMerge()
my $Success = $TicketObject->TicketMerge(
MainTicketID => 412,
MergeTicketID => 123,
UserID => 123,
); |
Events: TicketMerge
TicketWatchGet()
my %Watch = $TicketObject->TicketWatchGet(
TicketID => 123,
); |
get list of users to notify
my %Watch = $TicketObject->TicketWatchGet(
TicketID => 123,
Notify => 1,
); |
get list of users as array
my Watch = $TicketObject->TicketWatchGet(
TicketID => 123,
Result => 'ARRAY',
); |
TicketWatchSubscribe()
my $Success = $TicketObject->TicketWatchSubscribe(
TicketID => 111,
WatchUserID => 123,
UserID => 123,
); |
Events: TicketSubscribe
TicketWatchUnsubscribe()
my $Success = $TicketObject->TicketWatchUnsubscribe(
TicketID => 111,
WatchUserID => 123,
UserID => 123,
); |
Events: TicketUnsubscribe
TicketFlagSet()
my $Success = $TicketObject->TicketFlagSet(
TicketID => 123,
Key => 'Seen',
Value => 1,
UserID => 123, # apply to this user
); |
my $Success = $TicketObject->TicketFlagSet(
TicketID => 123,
Key => 'Seen',
Value => 1,
AllUsers => 1, # apply to all users
); |
Events: TicketFlagSet
TicketFlagDelete()
my $Success = $TicketObject->TicketFlagDelete(
TicketID => 123,
Key => 'Seen',
UserID => 123,
); |
Events: TicketFlagDelete
TicketFlagGet()
my %Flags = $TicketObject->TicketFlagGet(
TicketID => 123,
UserID => 123, # to get flags one user
); |
my @Flags = $TicketObject->TicketFlagGet(
TicketID => 123,
AllUsers => 1, # to get flags all users
); |
TicketAcl()
$TicketObject->TicketAcl(
Data => '-',
Action => 'AgentTicketZoom',
TicketID => 123,
ReturnType => 'Action',
ReturnSubType => '-',
UserID => 123,
); |
or
$TicketObject->TicketAcl(
Data => {
1 => 'new',
2 => 'open',
# ...
},
ReturnType => 'Ticket',
ReturnSubType => 'State',
) |
TicketAclData()TicketAcl()
my %Acl = $TicketObject->TicketAclData(); |
TicketAclActionData()TicketAcl()
my %AclAction = $TicketObject->TicketAclActionData(); |
TicketArticleStorageSwitch()
my $Success = $TicketObject->TicketArticleStorageSwitch(
TicketID => 123,
Source => 'ArticleStorageDB',
Destination => 'ArticleStorageFS',
UserID => 1,
); |
This software is part of the OTRS project (http://otrs.org/).
This software comes with ABSOLUTELY NO WARRANTY. For details, see the enclosed file COPYING for license information (AGPL). If you did not receive this file, see http://www.gnu.org/licenses/agpl.txt.
$Revision: 1.540 $ $Date: 2012/01/16 14:22:00 $