From 8048259733a5c32f63b5153df6caba2a3d94dfb0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 13 Mar 2018 12:13:47 +0100 Subject: [PATCH] Work on ticket module integration --- .tx/config | 6 ++ htdocs/core/lib/admin.lib.php | 24 +++---- htdocs/core/modules/modApi.class.php | 15 ----- htdocs/core/modules/modTicketsup.class.php | 5 +- .../mysql/data/llx_c_ticketsup_category.sql | 20 ++++++ .../mysql/data/llx_c_ticketsup_severity.sql | 24 +++++-- .../mysql/data/llx_c_ticketsup_type.sql | 26 ++++++-- htdocs/install/mysql/data/llx_ticketsup.sql | 17 ----- .../install/mysql/migration/7.0.0-8.0.0.sql | 59 ++++++++++++------ .../tables/llx_c_ticketsup_category.key.sql | 2 +- .../mysql/tables/llx_c_ticketsup_category.sql | 1 + .../tables/llx_c_ticketsup_severity.key.sql | 2 +- .../mysql/tables/llx_c_ticketsup_severity.sql | 1 + .../mysql/tables/llx_c_ticketsup_type.key.sql | 2 +- .../mysql/tables/llx_c_ticketsup_type.sql | 1 + htdocs/langs/en_US/ticketsup.lang | 6 +- htdocs/theme/eldy/img/menus/README.md | 4 +- htdocs/ticketsup/img/ticketsup-32.png | Bin 1412 -> 0 bytes htdocs/ticketsup/list.php | 2 +- htdocs/ticketsup/new.php | 2 +- 20 files changed, 135 insertions(+), 84 deletions(-) create mode 100644 htdocs/install/mysql/data/llx_c_ticketsup_category.sql delete mode 100644 htdocs/install/mysql/data/llx_ticketsup.sql delete mode 100644 htdocs/ticketsup/img/ticketsup-32.png diff --git a/.tx/config b/.tx/config index 89d123b0362..14d735d8610 100644 --- a/.tx/config +++ b/.tx/config @@ -356,6 +356,12 @@ source_file = htdocs/langs/en_US/supplier_proposal.lang source_lang = en_US type = MOZILLAPROPERTIES +[dolibarr.ticketsup] +file_filter = htdocs/langs//ticketsup.lang +source_file = htdocs/langs/en_US/ticketsup.lang +source_lang = en_US +type = MOZILLAPROPERTIES + [dolibarr.trips] file_filter = htdocs/langs//trips.lang source_file = htdocs/langs/en_US/trips.lang diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index 0f219a032cc..2c94dcf65ca 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -1031,7 +1031,8 @@ function unActivateModule($value, $requiredby=1) /** - * Add external modules to list of dictionaries + * Add external modules to list of dictionaries. + * Addition is done into var $taborder, $tabname, etc... that are passed with pointers. * * @param array $taborder Taborder * @param array $tabname Tabname @@ -1097,23 +1098,20 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql if ($modulequalified) { // Load languages files of module - if (isset($objMod->langfiles) && is_array($objMod->langfiles)) - { - foreach($objMod->langfiles as $langfile) - { - $langs->load($langfile); - } - } + if (isset($objMod->langfiles) && is_array($objMod->langfiles)) { + foreach ($objMod->langfiles as $langfile) { + $langs->load($langfile); + } + } - // Complete arrays - //&$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond + // Complete the arrays &$tabname,&$tablib,&$tabsql,&$tabsqlsort,&$tabfield,&$tabfieldvalue,&$tabfieldinsert,&$tabrowid,&$tabcond if (empty($objMod->dictionaries) && ! empty($objMod->dictionnaries)) $objMod->dictionaries=$objMod->dictionnaries; // For backward compatibility if (! empty($objMod->dictionaries)) { //var_dump($objMod->dictionaries['tabname']); $nbtabname=$nbtablib=$nbtabsql=$nbtabsqlsort=$nbtabfield=$nbtabfieldvalue=$nbtabfieldinsert=$nbtabrowid=$nbtabcond=$nbtabfieldcheck=$nbtabhelp=0; - foreach($objMod->dictionaries['tabname'] as $val) { $nbtabname++; $taborder[] = max($taborder)+1; $tabname[] = $val; } + foreach($objMod->dictionaries['tabname'] as $val) { $nbtabname++; $taborder[] = max($taborder)+1; $tabname[] = $val; } // Position foreach($objMod->dictionaries['tablib'] as $val) { $nbtablib++; $tablib[] = $val; } foreach($objMod->dictionaries['tabsql'] as $val) { $nbtabsql++; $tabsql[] = $val; } foreach($objMod->dictionaries['tabsqlsort'] as $val) { $nbtabsqlsort++; $tabsqlsort[] = $val; } @@ -1130,6 +1128,10 @@ function complete_dictionary_with_modules(&$taborder,&$tabname,&$tablib,&$tabsql print 'Error in descriptor of module '.$const_name.'. Array ->dictionaries has not same number of record for key "tabname", "tablib", "tabsql" and "tabsqlsort"'; //print "$const_name: $nbtabname=$nbtablib=$nbtabsql=$nbtabsqlsort=$nbtabfield=$nbtabfieldvalue=$nbtabfieldinsert=$nbtabrowid=$nbtabcond=$nbtabfieldcheck=$nbtabhelp\n"; } + else + { + $taborder[] = 0; // Add an empty line + } } $j++; diff --git a/htdocs/core/modules/modApi.class.php b/htdocs/core/modules/modApi.class.php index 24d784585d3..86588f06ed4 100644 --- a/htdocs/core/modules/modApi.class.php +++ b/htdocs/core/modules/modApi.class.php @@ -125,21 +125,6 @@ class modApi extends DolibarrModules $conf->api->enabled=0; } $this->dictionaries=array(); - /* Example: - if (! isset($conf->api->enabled)) $conf->api->enabled=0; // This is to avoid warnings - $this->dictionaries=array( - 'langs'=>'mylangfile@api', - 'tabname'=>array(MAIN_DB_PREFIX."table1",MAIN_DB_PREFIX."table2",MAIN_DB_PREFIX."table3"), // List of tables we want to see into dictonnary editor - 'tablib'=>array("Table1","Table2","Table3"), // Label of tables - 'tabsql'=>array('SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table1 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table2 as f','SELECT f.rowid as rowid, f.code, f.label, f.active FROM '.MAIN_DB_PREFIX.'table3 as f'), // Request to select fields - 'tabsqlsort'=>array("label ASC","label ASC","label ASC"), // Sort order - 'tabfield'=>array("code,label","code,label","code,label"), // List of fields (result of select to show dictionary) - 'tabfieldvalue'=>array("code,label","code,label","code,label"), // List of fields (list of fields to edit a record) - 'tabfieldinsert'=>array("code,label","code,label","code,label"), // List of fields (list of fields for insert) - 'tabrowid'=>array("rowid","rowid","rowid"), // Name of columns with primary key (try to always name it 'rowid') - 'tabcond'=>array($conf->api->enabled,$conf->api->enabled,$conf->api->enabled) // Condition to show each dictionary - ); - */ // Boxes // Add here list of php file(s) stored in core/boxes that contains class to show a box. diff --git a/htdocs/core/modules/modTicketsup.class.php b/htdocs/core/modules/modTicketsup.class.php index 4b79d472324..c6a6ada09f9 100644 --- a/htdocs/core/modules/modTicketsup.class.php +++ b/htdocs/core/modules/modTicketsup.class.php @@ -311,8 +311,7 @@ class modTicketsup extends DolibarrModules array("sql" => "insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (110121, 'ticketsup', 'internal', 'CONTRIBUTOR', 'Intervenant', 1);", "ignoreerror" => 1), array("sql" => "insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (110122, 'ticketsup', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1);", "ignoreerror" => 1), array("sql" => "insert into llx_c_type_contact(rowid, element, source, code, libelle, active ) values (110123, 'ticketsup', 'external', 'CONTRIBUTOR', 'Intervenant', 1);", "ignoreerror" => 1), - array("sql" => "insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values ('','TICKETMESSAGE_SENTBYMAIL','Envoi message de réponse par mail','Executed when a response is made on a ticket','ticketsup','');", "ignoreerror" => 1), - + array("sql" => "insert into llx_c_action_trigger (rowid,code,label,description,elementtype,rang) values ('','TICKETMESSAGE_SENTBYMAIL','Send email for ticket','Executed when a response is made on a ticket','ticketsup','');", "ignoreerror" => 1), ); $result = $this->loadTables(); @@ -345,6 +344,6 @@ class modTicketsup extends DolibarrModules */ private function loadTables() { - return $this->_load_tables('/ticketsup/sql/'); + return $this->_load_tables(); } } diff --git a/htdocs/install/mysql/data/llx_c_ticketsup_category.sql b/htdocs/install/mysql/data/llx_c_ticketsup_category.sql new file mode 100644 index 00000000000..0f00ec77502 --- /dev/null +++ b/htdocs/install/mysql/data/llx_c_ticketsup_category.sql @@ -0,0 +1,20 @@ +-- Copyright (C) 2018 Laurent Destailleur +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- +-- Contenu de la table llx_c_ticketsup_category +-- + +INSERT INTO llx_c_ticketsup_category (code, pos, label, active, use_default, description) VALUES('OTHER', '10', 'Other', 1, 1, NULL); diff --git a/htdocs/install/mysql/data/llx_c_ticketsup_severity.sql b/htdocs/install/mysql/data/llx_c_ticketsup_severity.sql index 9e356988256..1b9c3e42ca0 100644 --- a/htdocs/install/mysql/data/llx_c_ticketsup_severity.sql +++ b/htdocs/install/mysql/data/llx_c_ticketsup_severity.sql @@ -1,9 +1,23 @@ - +-- Copyright (C) 2018 Laurent Destailleur +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- -- -- Contenu de la table llx_c_ticketsup_severity -- -INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(1, 'LOW', '10', 'Bas', '', 1, 0, NULL); -INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(2, 'NORMAL', '20', 'Normal', '', 1, 1, NULL); -INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(3, 'LOWHIGH', '30', 'Important', '', 1, 0, NULL); -INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(4, 'HIGH', '40', 'Critique / bloquant', '', 1, 0, NULL); +INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('LOW', '10', 'Low', '', 1, 0, NULL); +INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('NORMAL', '20', 'Normal', '', 1, 1, NULL); +INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('HIGH', '30', 'High', '', 1, 0, NULL); +INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('BLOCKING', '40', 'Critical / blocking', '', 1, 0, NULL); diff --git a/htdocs/install/mysql/data/llx_c_ticketsup_type.sql b/htdocs/install/mysql/data/llx_c_ticketsup_type.sql index e5bb1869e5d..310b075a604 100644 --- a/htdocs/install/mysql/data/llx_c_ticketsup_type.sql +++ b/htdocs/install/mysql/data/llx_c_ticketsup_type.sql @@ -1,8 +1,24 @@ - +-- Copyright (C) 2018 Laurent Destailleur +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- -- -- Contenu de la table llx_c_ticketsup_type -- -INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(1, 'COM', '10', 'Question commerciale', 1, 1, NULL); -INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(2, 'INCIDENT', '20', 'Demande d''assistance', 1, 0, NULL); -INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(3, 'PROJET', '30', 'Suivi projet', 1, 0, NULL); -INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(4, 'OTHER', '40', 'Autre', 1, 0, NULL); + +INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('COM', '10', 'Commercial question', 1, 1, NULL); +INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('ISSUE', '20', 'Issue or problem' , 1, 0, NULL); +INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('REQUEST', '25', 'Change or enhancement request', 1, 0, NULL); +INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('PROJECT', '30', 'Project', 0, 0, NULL); +INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('OTHER', '40', 'Other', 1, 0, NULL); diff --git a/htdocs/install/mysql/data/llx_ticketsup.sql b/htdocs/install/mysql/data/llx_ticketsup.sql deleted file mode 100644 index 41c78d32d21..00000000000 --- a/htdocs/install/mysql/data/llx_ticketsup.sql +++ /dev/null @@ -1,17 +0,0 @@ - --- --- Contenu de la table llx_c_ticketsup_type --- -INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(1, 'COM', '10', 'Question commerciale', 1, 1, NULL); -INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(2, 'INCIDENT', '20', 'Demande d''assistance', 1, 0, NULL); -INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(3, 'PROJET', '30', 'Suivi projet', 1, 0, NULL); -INSERT INTO llx_c_ticketsup_type (rowid, code, pos, label, active, use_default, description) VALUES(4, 'OTHER', '40', 'Autre', 1, 0, NULL); - --- --- Contenu de la table llx_c_ticketsup_severity --- - -INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(1, 'LOW', '10', 'Bas', '', 1, 0, NULL); -INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(2, 'NORMAL', '20', 'Normal', '', 1, 1, NULL); -INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(3, 'LOWHIGH', '30', 'Important', '', 1, 0, NULL); -INSERT INTO llx_c_ticketsup_severity (rowid, code, pos, label, color, active, use_default, description) VALUES(4, 'HIGH', '40', 'Critique / bloquant', '', 1, 0, NULL); diff --git a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql index 6ff739b5f40..9c65b4442d2 100644 --- a/htdocs/install/mysql/migration/7.0.0-8.0.0.sql +++ b/htdocs/install/mysql/migration/7.0.0-8.0.0.sql @@ -185,24 +185,13 @@ CREATE TABLE llx_ticketsup_extrafields 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 + +-- Create dictionaries tables for ticket +create table llx_c_ticketsup_severity ( rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1, code varchar(32) NOT NULL, pos varchar(32) NOT NULL, label varchar(128) NOT NULL, @@ -212,11 +201,10 @@ CREATE TABLE llx_c_ticketsup_severity description varchar(255) )ENGINE=innodb; -ALTER TABLE llx_c_ticketsup_type ADD INDEX idx_code (code); - -CREATE TABLE llx_c_ticketsup_type +create table llx_c_ticketsup_type ( rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1, code varchar(32) NOT NULL, pos varchar(32) NOT NULL, label varchar(128) NOT NULL, @@ -225,6 +213,41 @@ CREATE TABLE llx_c_ticketsup_type description varchar(255) )ENGINE=innodb; +create table llx_c_ticketsup_category +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1, + 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_category ADD UNIQUE INDEX uk_code (code, entity); +ALTER TABLE llx_c_ticketsup_severity ADD UNIQUE INDEX uk_code (code, entity); +ALTER TABLE llx_c_ticketsup_type ADD UNIQUE INDEX uk_code (code, entity); + + + +-- Load data +INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('LOW', '10', 'Low', '', 1, 0, NULL); +INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('NORMAL', '20', 'Normal', '', 1, 1, NULL); +INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('HIGH', '30', 'High', '', 1, 0, NULL); +INSERT INTO llx_c_ticketsup_severity (code, pos, label, color, active, use_default, description) VALUES('BLOCKING', '40', 'Critical / blocking', '', 1, 0, NULL); + +INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('COM', '10', 'Commercial question', 1, 1, NULL); +INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('ISSUE', '20', 'Issue or problem' , 1, 0, NULL); +INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('REQUEST', '25', 'Change or enhancement request', 1, 0, NULL); +INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('PROJECT', '30', 'Project', 0, 0, NULL); +INSERT INTO llx_c_ticketsup_type (code, pos, label, active, use_default, description) VALUES('OTHER', '40', 'Other', 1, 0, NULL); + +INSERT INTO llx_c_ticketsup_category (code, pos, label, active, use_default, description) VALUES('OTHER', '10', 'Other', 1, 1, NULL); + + + + ALTER TABLE llx_facturedet_rec ADD COLUMN date_start_fill integer DEFAULT 0; ALTER TABLE llx_facturedet_rec ADD COLUMN date_end_fill integer DEFAULT 0; diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_category.key.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_category.key.sql index 734fbcc8ece..a43346b87cf 100644 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_category.key.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_category.key.sql @@ -15,4 +15,4 @@ -- -- -ALTER TABLE llx_c_ticketsup_category ADD INDEX idx_code (code); +ALTER TABLE llx_c_ticketsup_category ADD UNIQUE INDEX uk_code (code, entity); diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_category.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_category.sql index 33b49b12df8..cce444d7f8a 100755 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_category.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_category.sql @@ -18,6 +18,7 @@ create table llx_c_ticketsup_category ( rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1, code varchar(32) NOT NULL, pos varchar(32) NOT NULL, label varchar(128) NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_severity.key.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_severity.key.sql index a873969876e..2772b0b545e 100644 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_severity.key.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_severity.key.sql @@ -15,4 +15,4 @@ -- -- -ALTER TABLE llx_c_ticketsup_severity ADD INDEX idx_code (code); +ALTER TABLE llx_c_ticketsup_severity ADD UNIQUE INDEX uk_code (code, entity); diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_severity.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_severity.sql index a825000831d..9c26ec5cc32 100755 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_severity.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_severity.sql @@ -18,6 +18,7 @@ create table llx_c_ticketsup_severity ( rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1, code varchar(32) NOT NULL, pos varchar(32) NOT NULL, label varchar(128) NOT NULL, diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_type.key.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_type.key.sql index d451cc51a39..6dd4ec8fc9a 100644 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_type.key.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_type.key.sql @@ -15,4 +15,4 @@ -- -- -ALTER TABLE llx_c_ticketsup_type ADD INDEX idx_code (code); +ALTER TABLE llx_c_ticketsup_type ADD UNIQUE INDEX uk_code (code, entity); diff --git a/htdocs/install/mysql/tables/llx_c_ticketsup_type.sql b/htdocs/install/mysql/tables/llx_c_ticketsup_type.sql index 8983159ec0d..33f7b8a2973 100755 --- a/htdocs/install/mysql/tables/llx_c_ticketsup_type.sql +++ b/htdocs/install/mysql/tables/llx_c_ticketsup_type.sql @@ -18,6 +18,7 @@ create table llx_c_ticketsup_type ( rowid integer AUTO_INCREMENT PRIMARY KEY, + entity integer DEFAULT 1, code varchar(32) NOT NULL, pos varchar(32) NOT NULL, label varchar(128) NOT NULL, diff --git a/htdocs/langs/en_US/ticketsup.lang b/htdocs/langs/en_US/ticketsup.lang index 8187e8220d9..9064222637a 100644 --- a/htdocs/langs/en_US/ticketsup.lang +++ b/htdocs/langs/en_US/ticketsup.lang @@ -29,7 +29,7 @@ Permission56005=See tickets of all thirdparties (not effective for external user TicketsupDictType=Tickets type TicketsupDictCategory=Tickets categories -TicketsupDictSeverity=Severity classifications +TicketsupDictSeverity=Tickets severity TicketTypeShortBUGSOFT=Dysfonctionnement logiciel TicketTypeShortBUGHARD=Dysfonctionnement matériel TicketTypeShortCOM=Commercial question @@ -39,8 +39,8 @@ TicketTypeShortOTHER=Other TicketSeverityShortLOW=Low TicketSeverityShortNORMAL=Normal -TicketSeverityShortLOWHIGH=Important -TicketSeverityShortHIGH=Critical +TicketSeverityShortHIGH=High +TicketSeverityShortBLOCKING=Critical/Blocking ErrorBadEmailAddress=Field '%s' incorrect MenuTicketsupMyAssign=My tickets diff --git a/htdocs/theme/eldy/img/menus/README.md b/htdocs/theme/eldy/img/menus/README.md index 2c3e65e4e23..72f376c3f2b 100644 --- a/htdocs/theme/eldy/img/menus/README.md +++ b/htdocs/theme/eldy/img/menus/README.md @@ -2,8 +2,8 @@ Tutorial to create a new image for menu: 1) First find an image. -2) With Gimp, open image and check there is a alpha channel. If not add one. -3) Convert image into back and white (Menu Image - Mode - Grey levels). +2) With Gimp, open image and check there is a alpha channel. If not add one (Menu Color - Convert to alpha). +3) Convert image into black and white (Menu Image - Mode - Grey levels). 4) Use the degrade tool with option (Menu Tools - Paint - Degrade - CTRL+L): * Mode: Erase color (you can also try "Clear only") * Opacity: 50 +/- diff --git a/htdocs/ticketsup/img/ticketsup-32.png b/htdocs/ticketsup/img/ticketsup-32.png deleted file mode 100644 index ce4b71ca624f73ce0f0b56b945b2ec254b21b383..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1412 zcmV-~1$+95P)$^!`kVuT1S#0y?(pjMjr;)97O zBpRYGq)h>n#u&knmO|7Z4KYy(rd;I~C~~P3q(U#0NK@=?chC56zQUp1ZR>-+=$D-2 zd^7X?=YMAA%zW@)UmjpQkO6c6`Y-y;1p)$CfDf1nbOQ}Q_#blYGmeJ=r-87zlwKek z$OH}pxBDI6u+L9NcseixVLG-w6#&aRhjJD;!${v*HZ2Xsa6Sr{3p4>2fgS*f!7$ZC z;{wnKK-sP!wzn9S*ARk05J&)37=mfe@x)A*gtEYNSzMD|z zPJTIfBbJ+lxCEBIm(T5{HMCxy%(YWCnR)y1`ah?;`yks_w#Gd3W_2pw;31-+HC#Kn z7>(wUw=BS@%nR`d#E!uF+6mZHlHgxVTVosN4m5J_kMForzhOwVo;7zP!$&M&+M+B{ zCZ!Px)nQRe#fqzaO|6&!DkTW>iG(3NdoNubo4Hb-02B?ueGyj<`{-=nO#0+KL_#3U zN2Mf|aeo5q_dE@{9F+jVQ6k};G#>pLvlz zkw6w;1LI;iA7^w~#VgR+9}Rn%z|-ddpoIPV-?dFfRsyc}AD?&`fbK zdW$d7_=rP5B^O9U6jYk1DC%%&Bfz7;LLdP6T{^#!Ei^Wf`<14}eM;t+^> za!?szb~pQ0hiRb!;1yFNy(?s70b^tLIeXK5;0U6gocII;AA*GvMTy4xL3{snV46!l z&B%y3(tGg)3&9tkfW;-?F5tn^)IKn+z#;P<0P-h6Wo#a#z`+=g07@rO&c`PZ^fw^fGm|b8m9#!lXa=?d zr+_&w`5YtLYHZwvo#tQx!aaiihWG?Nd8P+wF(YCDwid*wgB!pJ^WSHfXPlAUh>`yS z&;~6Iun}1VtYPggpKE+afp38=z!>vvF|z3W5&!nC1Z;U3Sc0Iy0fXJ|cKYx-x;H{W z;Z0x)Do&U!kC%egzjCbl4$x*UuC3++dQ)=I=t7izHHN6X0lbPzGNSbeA5y;R`p|Dg zrL`pp?}MbFgg|#<$u^QR8`zZpXUsDn92-tYa}Kt>4%L@Hh9TO5vXROa+y35-NP2dl z-eh1M!ehYe*gQ!`Qw49;o}l`C2XgB}`z2jhASwly0hAJsfpH#~*NNzk9M?BkRd{?7kvi0d!jdBXY@ SHh8K40000'; print ''; -print_barre_liste($langs->trans('TicketList'), $page, 'list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'img/ticketsup-32.png', 1); +print_barre_liste($langs->trans('TicketList'), $page, 'list.php', $param, $sortfield, $sortorder, '', $num, $num_total, 'title_ticketsup'); if ($mode == 'my_assign') { print '
' . $langs->trans('TicketAssignedToMeInfos') . '

'; diff --git a/htdocs/ticketsup/new.php b/htdocs/ticketsup/new.php index 3d1a3c7c9f2..e08361e1e77 100644 --- a/htdocs/ticketsup/new.php +++ b/htdocs/ticketsup/new.php @@ -72,7 +72,7 @@ $form = new Form($db); if ($action == 'create_ticket') { $formticket = new FormTicketsup($db); - print load_fiche_titre($langs->trans('NewTicket'), '', 'img/ticketsup-32.png', 1); + print load_fiche_titre($langs->trans('NewTicket'), '', 'title_ticketsup'); $formticket->withfromsocid = $socid ? $socid : $user->societe_id; $formticket->withfromcontactid = $contactid ? $contactid : '';