ticket sup make it work
This commit is contained in:
parent
0ac1d8b226
commit
cfdaa7c88d
@ -34,10 +34,10 @@ if (file_exists("../../main.inc.php")) {
|
|||||||
|
|
||||||
// Libraries
|
// Libraries
|
||||||
require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
|
require_once DOL_DOCUMENT_ROOT . "/core/lib/admin.lib.php";
|
||||||
require_once "../class/ticketsup.class.php";
|
require_once DOL_DOCUMENT_ROOT."/ticketsup/class/ticketsup.class.php";
|
||||||
require_once "../lib/ticketsup.lib.php";
|
require_once DOL_DOCUMENT_ROOT."/core/lib/ticketsup.lib.php";
|
||||||
// Translations
|
// Translations
|
||||||
$langs->load("ticketsup@ticketsup");
|
$langs->load("ticketsup");
|
||||||
|
|
||||||
// Access control
|
// Access control
|
||||||
if (!$user->admin) {
|
if (!$user->admin) {
|
||||||
|
|||||||
@ -29,7 +29,8 @@ if (file_exists("../../main.inc.php")) {
|
|||||||
} else {
|
} else {
|
||||||
die("Include of main fails");
|
die("Include of main fails");
|
||||||
}
|
}
|
||||||
require_once '../lib/ticketsup.lib.php';
|
// Libraries
|
||||||
|
require_once DOL_DOCUMENT_ROOT."/core/lib/ticketsup.lib.php";
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
|
||||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
require_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||||
|
|
||||||
|
|||||||
@ -31,18 +31,14 @@ function ticketsupAdminPrepareHead()
|
|||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
|
|
||||||
$head[$h][0] = dol_buildpath("/ticketsup/admin/admin_ticketsup.php", 1);
|
$head[$h][0] = DOL_URL_ROOT.'/admin/admin_ticketsup.php';
|
||||||
$head[$h][1] = $langs->trans("TicketSupSettings");
|
$head[$h][1] = $langs->trans("TicketSupSettings");
|
||||||
$head[$h][2] = 'settings';
|
$head[$h][2] = 'settings';
|
||||||
$h++;
|
$h++;
|
||||||
$head[$h][0] = dol_buildpath("/ticketsup/admin/ticketsup_extrafields.php", 1);
|
$head[$h][0] = DOL_URL_ROOT.'/admin/ticketsup_extrafields.php';
|
||||||
$head[$h][1] = $langs->trans("ExtraFieldsTicketSup");
|
$head[$h][1] = $langs->trans("ExtraFieldsTicketSup");
|
||||||
$head[$h][2] = 'attributes';
|
$head[$h][2] = 'attributes';
|
||||||
$h++;
|
$h++;
|
||||||
$head[$h][0] = dol_buildpath("/ticketsup/admin/about.php", 1);
|
|
||||||
$head[$h][1] = $langs->trans("About");
|
|
||||||
$head[$h][2] = 'about';
|
|
||||||
$h++;
|
|
||||||
|
|
||||||
// Show more tabs from modules
|
// Show more tabs from modules
|
||||||
// Entries must be declared in modules descriptor with line
|
// Entries must be declared in modules descriptor with line
|
||||||
@ -69,13 +65,13 @@ function ticketsup_prepare_head($object)
|
|||||||
|
|
||||||
$h = 0;
|
$h = 0;
|
||||||
$head = array();
|
$head = array();
|
||||||
$head[$h][0] = dol_buildpath('/ticketsup/card.php', 1) . '?action=view&track_id=' . $object->track_id;
|
$head[$h][0] = DOL_URL_ROOT.'/ticketsup/card.php?action=view&track_id=' . $object->track_id;
|
||||||
$head[$h][1] = $langs->trans("Card");
|
$head[$h][1] = $langs->trans("Card");
|
||||||
$head[$h][2] = 'tabTicketsup';
|
$head[$h][2] = 'tabTicketsup';
|
||||||
$h++;
|
$h++;
|
||||||
|
|
||||||
if (empty($user->socid)) {
|
if (empty($user->socid)) {
|
||||||
$head[$h][0] = dol_buildpath('/ticketsup/contacts.php', 1) . '?track_id=' . $object->track_id;
|
$head[$h][0] = DOL_URL_ROOT.'/ticketsup/contacts.php?track_id=' . $object->track_id;
|
||||||
$head[$h][1] = $langs->trans('Contacts');
|
$head[$h][1] = $langs->trans('Contacts');
|
||||||
$head[$h][2] = 'tabTicketContacts';
|
$head[$h][2] = 'tabTicketContacts';
|
||||||
$h++;
|
$h++;
|
||||||
@ -99,7 +95,7 @@ function ticketsup_prepare_head($object)
|
|||||||
|
|
||||||
|
|
||||||
// History
|
// History
|
||||||
$head[$h][0] = dol_buildpath('/ticketsup/history.php', 1) . '?track_id=' . $object->track_id;
|
$head[$h][0] = DOL_URL_ROOT.'/ticketsup/history.php?track_id=' . $object->track_id;
|
||||||
$head[$h][1] = $langs->trans('TicketHistory');
|
$head[$h][1] = $langs->trans('TicketHistory');
|
||||||
$head[$h][2] = 'tabTicketLogs';
|
$head[$h][2] = 'tabTicketLogs';
|
||||||
$h++;
|
$h++;
|
||||||
|
|||||||
@ -23,7 +23,7 @@
|
|||||||
* \brief File with class to manage the numbering module Simple for ticketsup references
|
* \brief File with class to manage the numbering module Simple for ticketsup references
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dol_include_once('/ticketsup/core/modules/modules_ticketsup.php');
|
require_once DOL_DOCUMENT_ROOT.'/core/modules/modules_ticketsup.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Class to manage the numbering module Simple for ticketsup references
|
* Class to manage the numbering module Simple for ticketsup references
|
||||||
|
|||||||
@ -22,7 +22,7 @@
|
|||||||
* \brief Fichier contenant la classe du modele de numerotation de reference de projet Universal
|
* \brief Fichier contenant la classe du modele de numerotation de reference de projet Universal
|
||||||
*/
|
*/
|
||||||
|
|
||||||
dol_include_once('/ticketsup/core/modules/modules_ticketsup.php');
|
require_once DOL_DOCUMENT_ROOT.'/core/modules/modules_ticketsup.php';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Classe du modele de numerotation de reference de projet Universal
|
* Classe du modele de numerotation de reference de projet Universal
|
||||||
|
|||||||
@ -120,4 +120,106 @@ ALTER TABLE llx_societe_rib ADD COLUMN total_amount_of_all_payments double(24,8)
|
|||||||
ALTER TABLE llx_societe_rib ADD COLUMN stripe_card_ref varchar(128);
|
ALTER TABLE llx_societe_rib ADD COLUMN stripe_card_ref varchar(128);
|
||||||
ALTER TABLE llx_societe_rib ADD COLUMN status integer NOT NULL DEFAULT 1;
|
ALTER TABLE llx_societe_rib ADD COLUMN status integer NOT NULL DEFAULT 1;
|
||||||
|
|
||||||
|
CREATE TABLE llx_ticketsup
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
entity integer DEFAULT 1,
|
||||||
|
ref varchar(128) NOT NULL,
|
||||||
|
track_id varchar(128) NOT NULL,
|
||||||
|
fk_soc integer DEFAULT 0,
|
||||||
|
fk_project integer DEFAULT 0,
|
||||||
|
origin_email varchar(128),
|
||||||
|
fk_user_create integer,
|
||||||
|
fk_user_assign integer,
|
||||||
|
subject varchar(255),
|
||||||
|
message text,
|
||||||
|
fk_statut integer,
|
||||||
|
resolution integer,
|
||||||
|
progress varchar(100),
|
||||||
|
timing varchar(20),
|
||||||
|
type_code varchar(32),
|
||||||
|
category_code varchar(32),
|
||||||
|
severity_code varchar(32),
|
||||||
|
datec datetime,
|
||||||
|
date_read datetime,
|
||||||
|
date_close datetime,
|
||||||
|
tms timestamp
|
||||||
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
ALTER TABLE llx_ticketsup ADD UNIQUE uk_ticketsup_rowid_track_id (rowid, track_id);
|
||||||
|
ALTER TABLE llx_ticketsup ADD INDEX id_ticketsup_track_id (track_id);
|
||||||
|
|
||||||
|
CREATE TABLE llx_ticketsup_msg
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
entity integer DEFAULT 1,
|
||||||
|
fk_track_id varchar(128),
|
||||||
|
fk_user_action integer,
|
||||||
|
datec datetime,
|
||||||
|
message text,
|
||||||
|
private integer DEFAULT 0
|
||||||
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|
||||||
|
ALTER TABLE llx_ticketsup_msg ADD CONSTRAINT fk_ticketsup_msg_fk_track_id FOREIGN KEY (fk_track_id) REFERENCES llx_ticketsup (track_id);
|
||||||
|
|
||||||
|
CREATE TABLE llx_ticketsup_logs
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
entity integer DEFAULT 1,
|
||||||
|
fk_track_id varchar(128),
|
||||||
|
fk_user_create integer,
|
||||||
|
datec datetime,
|
||||||
|
message text
|
||||||
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
ALTER TABLE llx_ticketsup_logs ADD CONSTRAINT fk_ticketsup_logs_fk_track_id FOREIGN KEY (fk_track_id) REFERENCES llx_ticketsup (track_id);
|
||||||
|
|
||||||
|
CREATE TABLE llx_ticketsup_extrafields
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
tms timestamp,
|
||||||
|
fk_object integer NOT NULL,
|
||||||
|
import_key varchar(14)
|
||||||
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
ALTER TABLE llx_c_ticketsup_category ADD INDEX idx_code (code);
|
||||||
|
|
||||||
|
CREATE TABLE llx_c_ticketsup_category
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
code varchar(32) NOT NULL,
|
||||||
|
pos varchar(32) NOT NULL,
|
||||||
|
label varchar(128) NOT NULL,
|
||||||
|
active integer DEFAULT 1,
|
||||||
|
use_default integer DEFAULT 1,
|
||||||
|
description varchar(255)
|
||||||
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
ALTER TABLE llx_c_ticketsup_severity ADD INDEX idx_code (code);
|
||||||
|
|
||||||
|
CREATE TABLE llx_c_ticketsup_severity
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
code varchar(32) NOT NULL,
|
||||||
|
pos varchar(32) NOT NULL,
|
||||||
|
label varchar(128) NOT NULL,
|
||||||
|
color varchar(10) NOT NULL,
|
||||||
|
active integer DEFAULT 1,
|
||||||
|
use_default integer DEFAULT 1,
|
||||||
|
description varchar(255)
|
||||||
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
ALTER TABLE llx_c_ticketsup_type ADD INDEX idx_code (code);
|
||||||
|
|
||||||
|
CREATE TABLE llx_c_ticketsup_type
|
||||||
|
(
|
||||||
|
rowid integer AUTO_INCREMENT PRIMARY KEY,
|
||||||
|
code varchar(32) NOT NULL,
|
||||||
|
pos varchar(32) NOT NULL,
|
||||||
|
label varchar(128) NOT NULL,
|
||||||
|
active integer DEFAULT 1,
|
||||||
|
use_default integer DEFAULT 1,
|
||||||
|
description varchar(255)
|
||||||
|
)ENGINE=innodb;
|
||||||
|
|
||||||
|
|||||||
@ -14,4 +14,5 @@
|
|||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
ALTER TABLE llx_ticketsup ADD UNIQUE uk_matable_field(rowid, track_id);
|
ALTER TABLE llx_ticketsup ADD UNIQUE uk_ticketsup_rowid_track_id (rowid, track_id);
|
||||||
|
ALTER TABLE llx_ticketsup ADD INDEX id_ticketsup_track_id (track_id);
|
||||||
|
|||||||
@ -14,4 +14,4 @@
|
|||||||
-- You should have received a copy of the GNU General Public License
|
-- You should have received a copy of the GNU General Public License
|
||||||
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
ALTER TABLE llx_ticketsup_logs ADD CONSTRAINT fk_ticketsup_logs_fk_track_id FOREIGN KEY (fk_track_id) REFERENCES llx_ticketsup (fk_track_id);
|
ALTER TABLE llx_ticketsup_logs ADD CONSTRAINT fk_ticketsup_logs_fk_track_id FOREIGN KEY (fk_track_id) REFERENCES llx_ticketsup (track_id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user