dolibarr 24.0.0-beta
webportalticket.class.php
Go to the documentation of this file.
1<?php
2/* Copyright (C) 2026 Pierre Ardoin <developpeur@lesmetiersdubatiment.fr>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17
24require_once DOL_DOCUMENT_ROOT . '/ticket/class/ticket.class.php';
25
30{
34 public $module = 'webportal';
35
36 public $fields = array(
37 'rowid' => array('type' => 'integer', 'label' => 'TechnicalID', 'enabled' => 1, 'visible' => 0, 'position' => 1, 'notnull' => 1),
38 'entity' => array('type' => 'integer', 'label' => 'Entity', 'visible' => -2, 'enabled' => 1, 'position' => 5, 'notnull' => 1),
39 'ref' => array('type' => 'varchar(128)', 'label' => 'Ref', 'visible' => 2, 'enabled' => 1, 'position' => 10, 'notnull' => 1, 'showoncombobox' => 1),
40 'subject' => array('type' => 'varchar(255)', 'label' => 'Subject', 'visible' => 2, 'enabled' => 1, 'position' => 20, 'notnull' => -1),
41 'track_id' => array('type' => 'varchar(255)', 'label' => 'TicketTrackId', 'visible' => -2, 'enabled' => 1, 'position' => 30, 'notnull' => -1),
42 'origin_email' => array('type' => 'mail', 'label' => 'OriginEmail', 'visible' => -2, 'enabled' => 1, 'position' => 35, 'notnull' => -1),
43 'fk_user_create' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'Author', 'visible' => -2, 'enabled' => 1, 'position' => 40, 'notnull' => 1),
44 'datec' => array('type' => 'datetime', 'label' => 'DateCreation', 'visible' => 2, 'enabled' => 1, 'position' => 500, 'notnull' => 1),
45 'fk_user_assign' => array('type' => 'integer:User:user/class/user.class.php', 'label' => 'AssignedTo', 'visible' => 2, 'enabled' => 1, 'position' => 507, 'notnull' => 1),
46 'fk_statut' => array('type' => 'integer', 'label' => 'Status', 'visible' => 2, 'enabled' => 1, 'position' => 600, 'notnull' => 1, 'arrayofkeyval' => array(0 => 'Unread', 1 => 'Read', 2 => 'Assigned', 3 => 'InProgress', 5 => 'NeedMoreInformation', 7 => 'OnHold', 8 => 'SolvedClosed', 9 => 'Deleted')),
47 );
48
54 public function __construct(DoliDB $db)
55 {
56 parent::__construct($db);
57
58 if (!getDolGlobalString('TICKET_INCLUDE_SUSPENDED_STATUS')) {
59 unset($this->fields['fk_statut']['arrayofkeyval'][self::STATUS_WAITING]);
60 }
61 }
62}
Class to manage Dolibarr database access.
Class for WebPortalTicket.
__construct(DoliDB $db)
Constructor.
if(!isModEnabled('ai')||!getDolGlobalString('AI_ASSISTANT_ENABLED')) global $db
API class for accounts.
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
Class to generate the form for creating a new ticket.