Class TicketHelper
Assembly: SoDataBase.dll
Syntax
public static class TicketHelper : Object
Methods
DemandAdminPermissions()
Declaration
public static void DemandAdminPermissions()
GetFacadeAssociateId(Int32)
Maps ejUserId to associateId required by C++ code via facade.
Declaration
public static int GetFacadeAssociateId(int ejUserId)
Parameters
Type |
Name |
Description |
Int32 |
ejUserId |
ejUserId
|
Returns
GetIconHint(String, TicketBaseStatus, DateTime)
Selects icon for a ticket based on its state
Declaration
public static string GetIconHint(string icon, TicketBaseStatus ticketStatus, DateTime deadline)
Parameters
Returns
GetMailInFilterAddress(Int32)
Declaration
public static string GetMailInFilterAddress(int filterId)
Parameters
Type |
Name |
Description |
Int32 |
filterId |
|
Returns
GetNextInQueue()
Declaration
public static int GetNextInQueue()
Returns
GetTicketBaseStatus(Int32)
Get TicketBaseStatus from TicketStatus. Example: TicketStatus "Resolved" may have a TicketBaseStatus "Closed".
Declaration
public static TicketBaseStatus GetTicketBaseStatus(int ticketStatus)
Parameters
Type |
Name |
Description |
Int32 |
ticketStatus |
TicketStatus int from TicketStatus table
|
Returns
Type |
Description |
TicketBaseStatus |
TicketBaseStatus(enum) of provided TicketStatus
|
GetTicketChangeData(Int32)
Declaration
public static TicketChangeData GetTicketChangeData(int ticketId)
Parameters
Type |
Name |
Description |
Int32 |
ticketId |
|
Returns
GetTicketCustomers(Int32, Int32)
Get ticket customer rows.
Declaration
public static TicketCustomersRows GetTicketCustomers(int ticketId, int customerId = 0)
Parameters
Type |
Name |
Description |
Int32 |
ticketId |
TicketId to return customers for
|
Int32 |
customerId |
Optional customer id
|
Returns
GetTicketData(Int32)
Declaration
public static TicketData GetTicketData(int ticketId)
Parameters
Type |
Name |
Description |
Int32 |
ticketId |
|
Returns
GetTicketSecurityLevel(Int32)
Declaration
public static TicketSecurityLevel GetTicketSecurityLevel(int ticketTypeId = 0)
Parameters
Type |
Name |
Description |
Int32 |
ticketTypeId |
|
Returns
GetTicketStatusRecordData(Int16)
Declaration
public static TicketStatusRecordData GetTicketStatusRecordData(short ticketStatusId)
Parameters
Type |
Name |
Description |
Int16 |
ticketStatusId |
|
Returns
HasUpdateRight(TicketData)
Declaration
public static bool HasUpdateRight(TicketData data)
Parameters
Returns
ResolveTicketId(Int32)
Ticket can be connected (merged) to another ticket. This method traverses through its connection(s) and returns proper ticketId
Declaration
public static int ResolveTicketId(int ticketId)
Parameters
Type |
Name |
Description |
Int32 |
ticketId |
Potentially correct ticketId
|
Returns
Type |
Description |
Int32 |
Correct ticketId. Returns 0 in case ticket does not exists
|
UpdateEjMessageSearchTitle(Int32, String)
Declaration
public static void UpdateEjMessageSearchTitle(int ticketId, string title)
Parameters
UpdateLastChanged(TicketRow, Boolean)
Update Ticket LastChanged field.
This function will set the ticket's last_changed timestamp to now.
The read_status will be set to yellow if it is green. If it is red,
it will not be changed.
Declaration
public static void UpdateLastChanged(this TicketRow ticketRow, bool noNewInfo)
Parameters
Type |
Name |
Description |
TicketRow |
ticketRow |
TicketRow object
|
Boolean |
noNewInfo |
Indicates if ticket has changed
|
UpdateRepliedAt(TicketRow, DateTime)
Update Ticket RepliedAt field.
This function will calculate and set repliedAt, timeToReply and realTimeToReply fields.
Declaration
public static void UpdateRepliedAt(this TicketRow ticketRow, DateTime repliedAt)
Parameters
Type |
Name |
Description |
TicketRow |
ticketRow |
TicketRow object
|
DateTime |
repliedAt |
RepliedAt datetime
|
UpdateTicketStatisticsFromMessages(Int32)
Update number of messages, replies and timespent for ticket
Declaration
public static void UpdateTicketStatisticsFromMessages(int ticketId)
Parameters
Type |
Name |
Description |
Int32 |
ticketId |
Ticket id
|