Bitrix Site Manager

CTicket::GetByID

record set
CTicket::GetByID(
 int ID,
 char(2) lang=LANG,
 char(1) CHECK_RIGHTS="Y",
 char(1) get_user_name="Y",
 char(1) get_dictionary_name="Y"
);

The method GetByID returns information about a ticket.

Parameters

ParameterDescription
ID The ticket ID.
lang Two-character identifier of the language whose format is to be used to get the time parameters of a ticket (time of creation, modification, closing). The current site identifier is used by default.
CHECK_RIGHTS If set to "Y", only the tickets the current user can view are selected (default). If "N", all tickets regardless of the current user permissions are selected.
get_user_name If set to "Y", the following fields describing the parameters of users related to this ticket are also returned when selecting tickets:
  • OWNER_LOGIN
  • OWNER_NAME
  • RESPONSIBLE_LOGIN
  • RESPONSIBLE_NAME
  • MODIFIED_LOGIN
  • MODIFIED_NAME
  • LAST_MESSAGE_LOGIN
  • LAST_MESSAGE_NAME
  • CREATED_LOGIN
  • CREATED_EMAIL
  • CREATED_NAME
If "N", all the above fields are not returned which speeds up the method execution.
get_dictionary_name If set to "Y", the following fields from the techsupport dictionary are also returned when selecting tickets:
  • CATEGORY_NAME
  • CATEGORY_SID
  • CRITICALITY_NAME
  • CRITICALITY_SID
  • STATUS_NAME
  • STATUS_SID
  • MARK_NAME
  • MARK_SID
  • SOURCE_NAME
  • SOURCE_SID
If "N", all the above fields are not returned which speeds up the method execution.

Example

The following is an example of a single row of selection returned by CTicket::GetByID.

Array
(
 [ID] => 647
 [LID] => ru
 [DATE_CREATE] => 17.03.2004 15:27:05
 [TIMESTAMP_X] => 19.04.2004 13:37:30
 [DATE_CLOSE] => 
 [AUTO_CLOSED] => 
 [AUTO_CLOSE_DAYS] => 
 [CATEGORY_ID] => 27
 [CRITICALITY_ID] => 8
 [STATUS_ID] => 14
 [MARK_ID] => 21
 [SOURCE_ID] => 
 [TITLE] => Commercial catalogue export and import
 [MESSAGES] => 30
 [OWNER_USER_ID] => 166
 [OWNER_GUEST_ID] => 14649
 [OWNER_SID] => 
 [CREATED_USER_ID] => 166
 [CREATED_GUEST_ID] => 14649
 [CREATED_MODULE_NAME] => support
 [RESPONSIBLE_USER_ID] => 12
 [MODIFIED_USER_ID] => 166
 [MODIFIED_GUEST_ID] => 16218
 [MODIFIED_MODULE_NAME] => support
 [LAST_MESSAGE_USER_ID] => 166
 [LAST_MESSAGE_GUEST_ID] => 16218
 [LAST_MESSAGE_SID] => 
 [SUPPORT_COMMENTS] => 
 [OWNER_LOGIN] => row
 [OWNER_EMAIL] => row@machaon.com
 [OWNER_NAME] => Rowan Atkinson 
 [RESPONSIBLE_LOGIN] => bradpitt
 [RESPONSIBLE_EMAIL] => bradpitt@bitrix.com
 [RESPONSIBLE_NAME] => Brad Pitt
 [MODIFIED_LOGIN] => row
 [MODIFIED_EMAIL] => row@machaon.com
 [MODIFIED_NAME] => Rowan Atkinson
 [LAST_MESSAGE_LOGIN] => row
 [LAST_MESSAGE_EMAIL] => row@machaon.com
 [LAST_MESSAGE_NAME] => Rowan Atkinson
 [CREATED_LOGIN] => row
 [CREATED_EMAIL] => row@machaon.com
 [CREATED_NAME] => Rowan Atkinson
 [CATEGORY_NAME] => Installation
 [CATEGORY_DESC] => 
 [CATEGORY_SID] => 
 [CRITICALITY_NAME] => Medium
 [CRITICALITY_DESC] => 
 [CRITICALITY_SID] => middle
 [STATUS_NAME] => Being processed
 [STATUS_DESC] => 
 [STATUS_SID] => 
 [MARK_NAME] => Ok
 [MARK_DESC] => 
 [MARK_SID] => 
 [SOURCE_NAME] => 
 [SOURCE_DESC] => 
 [SOURCE_SID] => 
 [LAMP] => yellow
);