Location: /gateway-api/database-handlers/mysql/ticket.sql.class.php Provides functions to retrieve information regarding the tickets. Can retrieve the ticket itself, whose watching it, the headers, request a ticket, change the priority, and other functions to handle the functionality of a ticket. |
var $db |
var $db - line 32 is a scalar representation of the @db variable that houses the database connection information. |
Name: ticket_sql - line 39Parameters:&$db - a reference to the database handlerDescriptionAssigns the incoming parameter to the variable $db as a reference. |
Name: get_headers - line 84Parameters:$params - A scalar representation of the array of variables that the function needs($tickets)Returnreturn $this->db->GetAll(sprintf($sql, $tickets)) - Returns all the data that is selected as result of executing the sql statement represented by $sql.DescriptionAssigns a sql statement to the variable $sql to select the fields listed in the table below along with how the tables are joined:
|
Name: requester_list_by_tickets - line 123Parameters:$params - A scalar representation of the array of variables that the function needs($tickets)Returnreturn $this->db->GetAll(sprintf($sql, implode(', ',$tickets))) - Returns all the data that is found upon the execution of the sql statement represented by $sqlDescriptionAssigns a sql statement to the variable $sql to select the ticket_id and supress fields from the requestor table and the address_id and address_address fields from the address table. The addres_id field will be used to join both the requestor and address table. The fields will be selected where the ticket_id field of the requestor tables contains one of the values of the $tickets variable after it has been converted to a comman deliminated list. |
Name: watcher_list - line 137Parameters:$params - A scalar representation of the array of variables that the function needs($ticket_id)Returnreturn $this->db->GetAll(sprintf($sql, implode(', ',$ticket_id))) - Returns all the data that is found upon the execution of the sql statement represented by $sqlDescriptionAssigns a space to the variable $sql. |
Name: watcher_list_by_tickets - line 143Parameters:$params - A scalar representation of the array of variables that the function needs($tickets)Returnreturns $this->db->GetAll(sprintf($sql, implode(', ',$tickets))) - Returns all the data that is selected as a result of executing the sql statement represented by $sqlDescriptionAssigns a space to the variable $sql. |
Name: flag_list_by_tickets - line 153Parameters:$params - A scalar representation of the array of variables that the function needs($tickets)Returnreturn $this->db->GetAll(sprintf($sql, implode(', ',$tickets))) - Returns all the data that is selected by the execution of the sql statement represented by $sqlDescriptionAssigns a sql statement to the variable $sql to select the agent_it and ticket_id fields from the ticket_flags_to_agents table where the ticket_id field contains one of the values in the variables $tickets after it has been converted into a comma deliminated list. |
Name: tag_list_by_tickets - line 169Parameters:$params - A scalar representation of the array of variables that the function needs($tickets)Returnreturn $this->db->GetAll(sprintf($sql, implode(', ',$tickets)) - Returns all the data that is selected by the execution of the sql statement by the variable $sql.DescriptionAssigns a sql statement to the variable $sql to select the ticket_id, and tag_id fields from the workstation_tags_to_tickets table, the tag_name and tag_set_id fields from the workstation_tags table and the name field from the workstation_tag_sets table. The tag_id is used to join both the workstation_tags and workstation_tags_to_tickets tables, and the tag_set_id field of the workstation_tags table will be joined to the id field of the workstation_tag_sets table. The data will be selected where the ticket_id field of the workstation_tags_to_tickets table contains one of the values in the $tickets variable after it has been converted to a comma deliminated list. |
Name: spotlight_list_by_tickets - line 179Parameters:$params - A scalar representation of the array of variables that the function needs($tickets)Returnreturn $this->db->GetAll(sprintf($sql, implode(', ',$tickets)) - Returns all the results that are selected by executing the sql statement represented by $sql.DescriptionAssigns a sql statement to the variable $sql to select the ticket_id and agent_id fields from the ticket_spotlights_to_agents table and the user_name field of the user table. The tables are joined where the agent_id field of the ticket_spotlights_to_agents table equals the user_id field of the user table and the ticket_id field of the ticket_spotlights_to_agents tables contains one in the values in the $tickets variable after it has been converted to a comma deliminated list. |
Name: add_tag - line 188Parameters:$params - A scalar representation of the array of variables that the function needs($tag_id, $ticket_id)Returnreturn TURE - returns the boolean value of TRUEDescriptionExecutes an include statement to inclue the CerWorkstationTickets.class.php class. The addTagsFromTicketId(array(4tag_id),$ticket_id) method call by passing in the array represented by $tag_id and the $ticket_id variable. |
Name: remove_tag - line 197Parameters:$params - A scalar representation of the array of variables that the function needs($tag_id, $ticket_id)Returnreturn TURE - returns the boolean value of TRUEDescriptionExecutes an include statement to inclue the CerWorkstationTickets.class.php class. The removeTagsFromTicketId(array(4tag_id),$ticket_id) method call by passing in the array represented by $tag_id and the $ticket_id variable. |
Name: set_ticket_priority - line 206Parameters:$params - A scalar representation of the array of variables that the function needs($priority, $ticket_id)Returnreturn $this->db->Execute(sprintf($sql, $priority, $ticket_id)) - Returns the value that is generated upon the execution of the sql statement represented by $sql.DescriptionAssigns a sql statement to the variable $sql to update the ticket_priority field with the value of the $priority variable in the ticket table where the ticket_id field equals the value of the $ticket_id variable. |
Name: set_ticket_due - line 212Parameters:$params - A scalar representation of the array of variables that the function needs($due, $ticket_id)Returnreturn $this->db->Execute($sql) - Returns the value that is generated upon the execution of the sql statement represented by $sql.DescriptionAssigns a sql statment to the variable $sql to update the ticket table by setting the ticket_due field equal to the variable $due formatted as a date showing year-month-day hour:minute:seconds where the ticket_id fields equals the variable $ticket_id. |
Name: add_task - line 220Parameters:$params - A scalar representation of the array of variables that the function needs($ticket_id, $estimate, $title)Returnreturn $this->db->Execute(sprintf($sql, $ticket_id, $estimate, $this->db->qstr($title))) - Returns the value that is generated upon the execution of the sql statement represented by $sqlDescriptionAssigns a sql statement to the variable $sql to insert into the ticket_tasks table the values of $ticket_id, $estimate, UNIX_TIMESTAMP(), the number zero, and $title into the ticket_id, estimate, date_added, completed, and title fields. |
Name: flag_tickets - line 230Parameters:$params - A scalar representation of the array of variables that the function needs($tickets, $agent_id, $overrid)Returnreturn $flagged_by_others_only - Returns an array of tickets that are not associated with agents id represented by the variable $agent_idDescriptionAssigns a sql statement to the variable $sql and then assigns the results of its execution to the variable $res. The sql statement will select from the ticket_id, and agent_id fields of the ticket_flags_to_agents table where the ticket_id contains one of the values in the $tickets array after it has been converted into a comma deliminated list. The $flagged_by_others, $flagged_by_others_only, and the $flagged_by_me variables are all initialized as a blank array. As long as the $res variable is an array a loop is executed where the following steps occur upon each iteration:
If the $override variable contains either the number one or the boolean value of TRUE then the $tickets_to_insert variable will be assigned an array containing all the values of the $ticket array that are not in the $flagged_by_me variable. This array will contain all the tickets that have not been flagged, and because the override variable is true all the tickets that were assigned to others. Otherwist the $tickets_to_insert array will be assigned all the values in the $tickets array that are not in the $flagged_by_me, and $flagged_by_others arrays. This will leave only tickets that have been not been flagged by anyone yet. Then the $flagged_by_others_only variable is assigned all the values in the $flagged_by_others array thatr is not in the $flagged_by_me array. This will generate an array of flagged tickets that do not belong to the agent. An include statement is executed to include the CerWorkstationTickets.class.php file. As long as the $tickets_to_insert variable is an array then for each value in that array the cerWorkstationTickets::addFlagToTicket($agent_id,$ticket_id) metho call will be executed with the values of the $agent_id parameter, and the current iterations subscript containing the ticket information represented by $ticket_id. |
Name: get_primary_contact_by_tickets - line 286Parameters:$params - A scalar representation of the array of variables that the function needs($tickets)Returnreturn $this->db->GetAll(sprintf($sql, implode(', ',$tickets)) - Returns all the data is selected by the sql statement represented by the variable $sqlDescriptionAssigns a sql statement to the variable $sql to select the ticket_id field from the ticket table, and the name_first and name_last field combined into one string, and the public_user_id field all from the public_gui_user table. The fields are selected where the min_thread_id field of the ticket table equals the thread_id field of the thread table, th thread_address_id field of the thread table equals the address_id of the address table and the public_user_id field of both the ticket and the public_user_id tables is equal. The data will be selected where the ticket_id field of the ticket table contains one of the values in the $tickets array after it has been converted into a comma deliminated list. |
Assigns a sql statement to the variable $sql to select the ticket_id, id, date_created, note, and created_by_agent_id fields from the next_stap table and the user_name from the user table where the user_id field of the user tale equals the created_by_agent_id field of the next step table and the ticket_id of the next_step equals the value of the $ticket_id variable. The results will be ordered by the date_created field of the next_step table.
Name: get_ticket_conflict_data - line 305Parameters:$params - A scalar representation of the array of variables that the function needs($tickets, $agent_id)Returnreturn $res - Returns a value representing the data that is returned from the execution of the sql statementreturn array() - A blank array is returned only if the incoming parameter $tickets is blank DescriptionAs long as the $tickets variable is not blank thene the $ticket_str variable would be assigned the value of $tickets converted into a comma deliminated list. A sql statement is assigned to $sql to select the ticket_id and ticket_subject fields from the ticket table, and the user_id and user_name fields from the user table. Tables will be joined where the ticket_id field of the ticket_flags_to agents table equals the ticket_id field of the ticket table, and the agent_id field of the ticket_flags_to_agents table equals the user_id field of the user table. The fields will be selected where the user_id field of the user table equals the value of the $agent_id variable, and the ticket_id field of the ticket_flags_to_agents table contains a value in the $ticket_str variable. The results will be ordered by the ticket_id field of the ticket table. |
Name: set_status_awaiting_reply - line 328Parameters:$params - A scalar representation of the array of variables that the function needs($ticket_id)Returnreturn TRUE - returns the boolean value of TRUEDescriptionExecutes the statement to include the CerWorkstationTickets.class.php file. Calls the CerWorkstationTickets::setTicketWaitingOnCustomer($ticket_id) method call to set a flag indicating the ticket in question is awaiting information from the customer. |
Name: get_ticket_requesters - linw 337Parameters:$params - A scalar representation of the array of variables that the function needs($ticket_id)Returnreturn $requesters - Returns the array where each subscript contains an array of values representing one row of data selected by the execution of a sql statement.DescriptionAssigns a sql statement to the variable $sql to select the following fields from the following tables where they are joined in the table listed below:
The variable $result will be assigned the result returned from the execution of the sql statement represented by $sql, and the variable $requesters will be initialized as a blank array. |
Name: add_requesters - line 361Parameters:$params - A scalar representation of the array of variables that the function needs($address_list, $ticket_id)Returnreturn ($error_flag !== TRUE) - Returns a boolean value of FALSE if the value of $error_flag is TRUE, or TRUE if the value of $error_flag is the boolean value FALSEDescriptionAssigns the $addresses variable with a comma deliminated list of the values of the $address_list variable where each value is preceeded and succeded by a single quote. A sql statement is assigned to the variable $sql and executed to assign the variable $res all values of the address_id field of the address table where the adddress_address field contains one of the values in the $addresses_list variable. The variable $error_flag is initialized with the boolean value of false. If the variable $res is an array then for each value a sql statement will be assigned to the variable $sql2 to insert into the requestor table the value of the $ticket_id variable, and the current array value of the variable $res as long as a key in the table is not duplicated. In the event the execution of the sql statement represented by $sql fails the $error_flag variable will be set to the boolean value of true. |
Name: delete_requesters - line 381Parameters:$params - A scalar representation of the array of variables that the function needs($adress_list, $ticket_id)Returnreturn ($error_flag !== TRUE) - Returns a boolean value of FALSE if the value of $error_flag is TRUE, or TRUE if the value of $error_flag is the boolean value FALSEDescriptionAssigns the $addresses variable with a comma deliminated list of the values of the $address_list variable where each value is preceeded and succeded with a single quote. A sql statement is assigned to the variable $sql and executed to return all the values in the address_id field of the address table where the address_adress field contains a value in the $addresses variable to the variable $res. The following three variables are then initialized, $address_id_list with an empty string, $first_time with the boolean value TRUE, and $error_flag with the boolean value FALSE. As long as the variable $res is not blank then each value will have single quotes prepended and appended to it and assigned to the variabe $address_id_list with a comma seperating each value. As long as the $address_id_list is not blank the a sql statement will be assigned to the variable $sql to delete from the requestor table where the ticket_id field is equal to tha $ticket_id variable, and the address_id field contains one of the values in the $address_id_list variable. The variable $error_flag will be set to the value of true if the exeuction of the sql statement represented by $sql is not succesful. |
Name: update_ticket_subject - line 410Parameters:$params - A scalar representation of the array of variables that the function needs($subject, $ticket_id, $status)Returnreturn TRUE - Returns the boolean value of TRUE.DescriptionAssigns and executes the sql statement assigned to the variable $sql to update the ticket table with the values of the $subject array where the ticket_id field equals the value of the $ticket_id variable. A second sql statement is executed if it was assigned to $sql by one of the following conditions based on the variable $status.
|
CerWorkstationTickets::addTagsToTicketId - Line 192 Calls the addTagsToTicketId function of the CerWorkstationTickets class and passes the $tag_id variable as an array and the $ticket_id variable as parameters CerWorkstationTickets::removeTagsToTicketId - Line 201 Calls the removeTagsToTicketId function of the CerWorkstationTickets class and passes the $tag_id variable as an array and the $ticket_id variable as parameters CerWorkstationTickets::addFlagToTicket - Line 272 Calls the addFlagToTicket function of the CerWorkstationTickets class and passes the $agent_id, and the $ticket_id variables as parameters CerWorkstationTickets::setTicketWaitingonCustomer - Line 332 Calls the setTicketWaitingonCustomer function of the CerWorkstationTickets class and passes the $ticket_id variable, and the number one as parameters |
File Name | Line Number Called On | Location |
CerEntityObject.class.php | Line 21 | cerberus-api/entity/CerEntityObject.class.php |
CerNextStep.class.php | Line 22 | cerberus-api/entity/CerNextStep.class.php |
CerWorkstationTickets.class.php | Lines 191, 200, and 331 | cerberus-api/workstation/CerWorkstationTickets.class.php |