Documentation

GetList

Description and parameters

record set
    
CTicket::GetList(
varchar &by, varchar &order, array arFilter=array(), boolean &is_filtered, char(1) checkRights="Y", char(1) getUserName="Y", );

This method gets list of queries/tickets for technical support. Non-static method.

Method parameters

ParameterDescriptionAvailable from version
by Identifier for specifying field name for sorting. The following values are permitted:
  • s_id - by ID
  • s_lid - by site with created query
  • s_lamp - by indicator
  • s_date_create - by date when created
  • s_timestamp - by date when edited
  • s_date_close - by date when closed
  • s_owner - by author
  • s_modified_by - by user ID - who modified the query
  • s_title - by title
  • s_responsible - by responsible ID
  • s_messages - by number of messages
  • s_category - by category ID
  • s_criticality - by criticality ID
  • s_status - by status ID
  • s_mark - by rating ID
  • s_online - by number of users
order Sorting order. The following values are permitted:
  • desc - by descension (default value)
  • asc - by ascension
arFilter Array for filtering values. Optional parameter. The following indexes are permitted in the array:
  • ID - query ID (complex logic permitted)
  • ID_EXACT_MATCH - "Y" - when filtering by ID searches the queries for precise match (by default); "N" - otherwise searches an occurring instance
  • LID - site ID
  • LID_EXACT_MATCH - "Y" - when filtering by language ID will search for precise match (by default); "N" - otherwise searches an occurring instance
  • LAMP - array with identifiers: "red", "yellow", "green", "green_s", "grey"
  • DATE_CREATE_1 - left section for created query date period
  • DATE_CREATE_2 - right section for created query date period
  • DATE_TIMESTAMP_1 - left section for modified query date period
  • DATE_TIMESTAMP_2 - right section for modified query date period
  • DATE_CLOSE_1 - left section for period of closed query date
  • DATE_CLOSE_2 - right section for period of closed query date
  • AUTO_CLOSE_DAYS1 - left section for period of days to expire until automatically closing the query if there was no author reply
  • AUTO_CLOSE_DAYS2 - right section for period of days to expire until automatically closing the query if there was no author reply
  • TICKET_TIME_1 - left section for period of days expired between ticket created/closed dates
  • TICKET_TIME_2 - right section for number of days expired between ticket created/closed dates
  • TITLE - query title (complex logic is permitted)
  • TITLE_EXACT_MATCH - "Y" - when filtering by query title, searches a precise match (by default); "N" - otherwise, searches an occurring instance
  • MESSAGES1 - left section for message interval of messages in query
  • MESSAGES2 - right section for number of messages in query
  • OWNER - query/ticket author, search by user ID, login, first, last name, symbolic code (complex logic permitted)
  • OWNER_EXACT_MATCH - "Y" - when filtering by query/ticket author, searches a precise match (by default); "N" - otherwise searches an occurring instance
  • CREATED_BY - who created the query, searches by user ID, login, first, last name, module title from which the query was created (complex logic permitted)
  • CREATED_BY_EXACT_MATCH - "Y" - when filtering by query creator, searches a precise match (by default); "N" - otherwise searches an occurring instance
  • MODIFIED_BY - who modified a query, searches by user ID, login, first, last name, module title from which the query was created (complex logic permitted)
  • MODIFIED_BY_EXACT_MATCH - "Y" - when filtering by status character ID, searches a precise match (by default); "N" - otherwise searches an occurring instance
  • RESPONSIBLE - responsible for query, searches by user ID, login, first, last name, module title from which the query was created (complex logic permitted)
  • RESPONSIBLE_EXACT_MATCH - "Y" - when filtering by responsible for query, searches for a precise match (by default); "N" - otherwise searches an occurring instance
  • RESPONSIBLE_ID - user ID, responsible for query; when set as "0" selects only the queries without a responsible user
  • CATEGORY - query category ID (0 - without category)
  • CATEGORY_SID - query category symbolic code (complex logic permitted)
  • CATEGORY_SID_EXACT_MATCH - "Y" - when filtering by category symbolic code, searches for a precise match (by default); "N" - otherwise, searches an occurring instance
  • CRITICALITY - query criticality ID (0 - without criticality)
  • CRITICALITY_SID - query critically symbolic code (complex logic permitted)
  • CRITICALITY_SID_EXACT_MATCH - "Y" - when filtering by criticality symbolic code, searches for a precise match (by default); "N" - otherwise, searches an occurring instance
  • STATUS - query status ID (0 - without status)
  • STATUS_SID - query status symbolic code (complex logic permitted)
  • STATUS_SID_EXACT_MATCH - "Y" - when filtering by status symbolic code, searches for a precise match (by default); "N" - otherwise, searches an occurring instance
  • MARK_SID_EXACT_MATCH - "Y" - when filtering by reply rating symbolic code, searches for a precise match (by default); "N" - otherwise, searches an occurring instance
  • MARK - reply/answer rating ID (0 - without rating)
  • MARK_SID - answer rate symbolic code (complex logic permitted)
  • SOURCE - source ID (0 - source "web")
  • SOURCE_SID - source symbolic code (complex logic permitted)
  • SOURCE_SID_EXACT_MATCH - "Y" - when filtering by source symbolic code, searches for a precise match (by default); "N" - otherwise, searches an occurring instance
  • MESSAGE - message text (complex logic permitted)
  • MESSAGE_EXACT_MATCH - "Y" - when filtering by message, searches for a precise match (by default); "N" - otherwise, searches an occurring instance
  • LAST_MESSAGE_USER_ID - user ID who wrote the last message inside query/ticket (complex logic permitted)
  • LAST_MESSAGE_USER_ID_EXACT_MATCH - "Y" - when filtering by user ID who wrote the last message inside query/ticket , searches for a precise match (by default); "N" - otherwise, searches an occurring instance
  • LAST_MESSAGE_SID - symbolic identifier for the user who wrote the last message inside query/ticket (this value can be an email if the source is "email", if source is a "phone", it can be a phone number) (complex logic permitted)
  • LAST_MESSAGE_SID_EXACT_MATCH - "Y" - when filtering by user ID symbolic code who wrote the last message inside query/ticket, searches for a precise match (by default); "N" - otherwise, searches an occurring instance
  • SUPPORT_COMMENTS - technical support comment, visible in standard forms only for users, included into the technical support group
  • SUPPORT_COMMENTS_EXACT_MATCH - "Y" - when filtering by user ID who wrote the last message inside query/ticket, searches for a precise match (by default); "N" - otherwise, searches an occurring instance
  • SITE_ID - site identifier
  • CLOSE - Y\N - ticket closed or open
  • S_SPAM - Y\N - flag for a spam ticket
  • IS_OVERDUE - Y\N - flag for ticket expired or not.
  • SLA_ID - by technical support level ID (complex logic permitted).
  • SUPPORTTEAM_GROUP_ID - by technical support group ID (number of array with numbers).
  • CLIENT_GROUP_ID - Y\N - by customer group ID (number of array with numbers).
is_filtered Variable is returned as true in case of filtered list of results by a specific criteria; returns false otherwise. Replaced by isFiltered starting from version 12.0.0
checkRights Optional parameter. "Y" - get only the queries that can be viewed by current user (by default); "N" - select all queries independently from current user access permissions. Titled as check_rights before version 12.0.0.
getUserName Optional parameter. "Y" - when retrieving queries, also gets such fields as OWNER_LOGIN, OWNER_NAME, RESPONSIBLE_LOGIN, RESPONSIBLE_NAME, MODIFIED_LOGIN, MODIFIED_NAME, LAST_MESSAGE_LOGIN, LAST_MESSAGE_NAME, CREATED_LOGIN, CREATED_EMAIL, CREATED_NAME, describing user parameters associated to this query (by default); "N" - abovelisted fields won't be retrieved, but this will increase method performance. Titled as get_user_name before version 12.0.0.
get_dictionary_name Optional parameter. "Y" - when retrieving queries also gets such fields as CATEGORY_NAME, CATEGORY_SID, CRITICALITY_NAME, CRITICALITY_SID, STATUS_NAME, STATUS_SID, MARK_NAME, MARK_SID, SOURCE_NAME, SOURCE_SID, describing fields from technical support directory (by default); "N" - abovelisted fields won't be retrieved, but this will increase method performance. Deleted starting from version 4.0.6
lang Two-character language code in format to select query temporary parameters (time created, modified, closed); optional parameter, default value - current site code. Deleted starting from version 4.0.0
siteID Optional parameter. Default value - "false". Titled site_id before version 12.0.0.
getExtraNames Optional parameter. Default value - "Y".
arParams Optional parameter.

Examples

<?
$FilterArr = Array(
"find_id",
"find_lid",
"find_lamp",
"find_date_create1",
"find_date_create2",
"find_date_timestamp1",
"find_date_timestamp2",
"find_date_close1",
"find_date_close2",
"find_close",
"find_ticket_time_1",
"find_ticket_time_2",
"find_title",
"find_messages1",
"find_messages2",
"find_owner",
"find_created_by",
"find_responsible",
"find_responsible_id",
"find_category_id",
"find_criticality_id",
"find_status_id",
"find_mark_id",
"find_source_id",
"find_modified_by",
"find_message"
);
if (strlen($set_filter)>0) InitFilterEx($FilterArr,"TICKET_LIST","set",true); else InitFilterEx($FilterArr,"TICKET_LIST","get",true);
if (strlen($del_filter)>0) DelFilterEx($FilterArr,"TICKET_LIST",true);
if (CheckFilter())
{
$arFilter = Array(
"ID" => $find_id,
"LID" => $find_lid,
"LAMP" => $find_lamp,
"DATE_CREATE_1" => $find_date_create1,
"DATE_CREATE_2" => $find_date_create2,
"DATE_TIMESTAMP_1" => $find_date_timestamp1,
"DATE_TIMESTAMP_2" => $find_date_timestamp2,
"DATE_CLOSE_1" => $find_date_close1,
"DATE_CLOSE_2" => $find_date_close2,
"CLOSE" => $find_close,
"TICKET_TIME_1" => $find_ticket_time_1,
"TICKET_TIME_2" => $find_ticket_time_2,
"TITLE" => $find_title,
"MESSAGES1" => $find_messages1,
"MESSAGES2" => $find_messages2,
"OWNER" => $find_owner,
"CREATED_BY" => $find_created_by,
"RESPONSIBLE" => $find_responsible,
"RESPONSIBLE_ID" => $find_responsible_id,
"CATEGORY" => $find_category_id,
"CRITICALITY" => $find_criticality_id,
"STATUS" => $find_status_id,
"MARK" => $find_mark_id,
"SOURCE" => $find_source_id,
"MODIFIED_BY" => $find_modified_by,
"MESSAGE" => $find_message
);
}
$tickets = CTicket::GetList($by, $order, $arFilter, $is_filtered);
?>

© «Bitrix24», 2001-2024
Up