$_params
$_params : array
Whups backend driver for the Horde_Db abstraction layer.
Copyright 2001-2002 Robert E. Coyle robertecoyle@hotmail.com Copyright 2001-2017 Horde LLC (http://www.horde.org/)
See the enclosed file LICENSE for license information (BSD). If you did not receive this file, see http://www.horde.org/licenses/bsdl.php.
setAttributes(array $info, \Whups_Ticket $ticket)
Set ticket attributes
array | $info | Attributes to set |
\Whups_Ticket | $ticket | The ticket which attributes to set. |
getAllTicketAttributesWithNames( $ticket_id) : array
Returns the attributes for a specific ticket.
This method will check if external attributes need to be fetched from hooks or whether to use the standard ones defined within Whups.
$ticket_id |
List of attributes.
mail(array $opts)
Sends email notifications to a list of recipients.
We do some ugly work in here to make sure that no one gets comments mailed to them that they shouldn't see (because of group permissions).
array | $opts | Option hash with notification information. Possible values:
|
addState(integer $typeId, string $name, string $description, string $category) : integer
Adds a new state to a ticket type.
integer | $typeId | A ticket type ID. |
string | $name | A state name |
string | $description | A state description. |
string | $category | A state category. |
The new state ID.
addPriority(integer $typeId, string $name, string $description) : integer
Adds a new priority to a ticket type.
integer | $typeId | A ticket type ID. |
string | $name | A priority name. |
string | $description | A priority description. |
The new priority ID.
addVersion(integer $queueId, string $name, string $description, boolean $active) : integer
Adds a new version to a queue.
integer | $queueId | A queue ID. |
string | $name | A version name. |
string | $description | A version description. |
boolean | $active | Whether the version is active. |
The new version ID.
addComment(integer $ticket_id, string $comment, string $creator, string $creator_email = null) : integer
Adds a new ticket comment.
integer | $ticket_id | A ticket ID. |
string | $comment | A comment text. |
string | $creator | The creator of the comment. |
string | $creator_email | The creator's email address. |
The new comment ID.
updateTicket(integer $ticketId, array $attributes)
Updates a ticket.
Does not update the ticket log (so that it can be used for things low-level enough to not show up there. In general, you should always update the log; Whups_Ticket::commit() will take care of this in most cases).
integer | $ticketId | A ticket ID. |
array | $attributes | An attribute hash. |
executeQuery(\Whups_Query $query, \Horde_Variables $vars, boolean $get_details = true, boolean $munge = true) : array
Executes a query.
\Whups_Query | $query | A query object. |
\Horde_Variables | $vars | Request variables. |
boolean | $get_details | Whether to return all ticket details. |
boolean | $munge | @TODO (?) |
List of ticket IDs or ticket details that match the query criteria.
getTicketsByProperties(array $info, boolean $munge = true, boolean $perowner = false, boolean $format_name = true) : array
Returns tickets by searching for its properties.
array | $info | An array of properties to search for. |
boolean | $munge | Munge the query (?) |
boolean | $perowner | Group the results per owner? |
boolean | $format_name | If false, do not format the username. @since 3.1.0 |
An array of ticket information hashes.
getTicketDetails(integer $ticket, boolean $checkPerms = true) : array
Returns ticket details.
integer | $ticket | A ticket ID. |
boolean | $checkPerms | Enforce permissions? |
A ticket information hash.
updateQueue(integer $queueId, string $name, string $description, array $types = array(), integer $versioned, string $slug = '', string $email = '', integer $default = null)
Updates a queue.
integer | $queueId | A queue ID. |
string | $name | A queue name. |
string | $description | A queue description. |
array | $types | A list of type IDs for this queue. |
integer | $versioned | Is this queue versioned? (1 = true, 0 = false) |
string | $slug | A queue slug. |
string | A queue email address. |
|
integer | $default | The default ticket type. |
getStates(integer $type = null, string|array $category = '', string|array $notcategory = '') : array
Returns available states for a ticket type and state category.
integer | $type | A ticket type ID. |
string|array | $category | State categories to include. |
string|array | $notcategory | State categories to not include. |
A hash of state ID => state name.
saveQuery(\Whups_Query $query)
Saves query details.
If the query doesn't exist yes, it is added, update otherwise.
\Whups_Query | $query | A query. |
getPriorities(integer $type = null) : array
Returns a list of priorities.
If the priorities are not limited to a ticket type, the priority names are suffixed with associated ticket type names.
integer | $type | Limit result to this ticket type's priorities. |
A hash of priority ID => priority name.
updateVersion(integer $versionId, string $name, string $description, boolean $active)
Updates a version.
integer | $versionId | A version ID. |
string | $name | A version name. |
string | $description | A version description. |
boolean | $active | Whether the version is still active. |
addUniqueListener(\Whups_Ticket $ticket, string $user)
Adds a ticket listener if it doesn't exist yet.
\Whups_Ticket | $ticket | A ticket. |
string | $user | An email address. |
getListeners(integer $ticket, boolean $withowners = true, boolean $withrequester = true, boolean $withresponsible = false) : array
Returns all ticket listeners.
integer | $ticket | A ticket ID. |
boolean | $withowners | Include ticket owners? |
boolean | $withrequester | Include ticket creators? |
boolean | $withresponsible | Include users responsible for the ticket queue? |
A list of all ticket listeners.
addAttributeDesc(integer $type_id, string $name, string $desc, string $type, array $params, boolean $required) : integer
Adds an attribute to a ticket type.
integer | $type_id | A ticket type ID. |
string | $name | An attribute name. |
string | $desc | An attribute description. |
string | $type | A form field type. |
array | $params | Additional parameters for the field type. |
boolean | $required | Whether the attribute is mandatory. |
The new attribute ID.
updateAttributeDesc(integer $attribute_id, string $newname, string $newdesc, string $newtype, array $newparams, boolean $newrequired)
Updates an attribute for a ticket type.
integer | $attribute_id | An attribute ID. |
string | $newname | An attribute name. |
string | $newdesc | An attribute description. |
string | $newtype | A form field type. |
array | $newparams | Additional parameters for the field type. |
boolean | $newrequired | Whether the attribute is mandatory. |
getTicketAttributes(integer|array $ticket_id) : array
Returns the attribute values of a ticket.
integer|array | $ticket_id | One or more ticket IDs. |
If requesting a single ticket, an attribute ID => attribute value hash. If requesting multiple tickets, a list of hashes with ticket ID, attribute ID and attribute value.
getTicketAttributesWithNames(integer|array $ticket_id) : array
Returns the attribute values and names of a ticket.
integer|array | $ticket_id | One or more ticket IDs. |
If requesting a single ticket, an attribute name => attribute value hash. If requesting multiple tickets, a list of hashes with ticket ID, attribute ID, attribute name, and attribute value.
updateLog(integer $ticket_id, string $user, array $changes = array(), integer $transactionId = null) : integer
Adds a new log entry
integer | $ticket_id | A ticket ID. |
string | $user | A user updating the ticket. |
array | $changes | A list of changes. |
integer | $transactionId | A transaction ID to use. |
A transaction ID.