Can edit a table of resolution code for tickets

This commit is contained in:
Laurent Destailleur 2020-02-07 12:48:41 +01:00
parent 11c6447096
commit cd58822d98
7 changed files with 102 additions and 11 deletions

View File

@ -120,16 +120,16 @@ class modTicket extends DolibarrModules
}
$this->dictionaries = array(
'langs' => 'ticket',
'tabname' => array(MAIN_DB_PREFIX . "c_ticket_type", MAIN_DB_PREFIX . "c_ticket_severity", MAIN_DB_PREFIX . "c_ticket_category"),
'tablib' => array("TicketDictType", "TicketDictSeverity", "TicketDictCategory"),
'tabsql' => array('SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM ' . MAIN_DB_PREFIX . 'c_ticket_type as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM ' . MAIN_DB_PREFIX . 'c_ticket_severity as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM ' . MAIN_DB_PREFIX . 'c_ticket_category as f'),
'tabsqlsort' => array("pos ASC", "pos ASC", "pos ASC"),
'tabfield' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
'tabfieldvalue' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
'tabfieldinsert' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
'tabrowid' => array("rowid", "rowid", "rowid"),
'tabcond' => array($conf->ticket->enabled, $conf->ticket->enabled, $conf->ticket->enabled),
'tabhelp' => array(array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1"))),
'tabname' => array(MAIN_DB_PREFIX."c_ticket_type", MAIN_DB_PREFIX."c_ticket_severity", MAIN_DB_PREFIX."c_ticket_category", MAIN_DB_PREFIX."c_ticket_resolution"),
'tablib' => array("TicketDictType", "TicketDictSeverity", "TicketDictCategory", "TicketDictResolution"),
'tabsql' => array('SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_type as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_severity as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_category as f', 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default FROM '.MAIN_DB_PREFIX.'c_ticket_resolution as f'),
'tabsqlsort' => array("pos ASC", "pos ASC", "pos ASC", "pos ASC"),
'tabfield' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
'tabfieldvalue' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
'tabfieldinsert' => array("pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default", "pos,code,label,use_default"),
'tabrowid' => array("rowid", "rowid", "rowid", "rowid"),
'tabcond' => array($conf->ticket->enabled, $conf->ticket->enabled, $conf->ticket->enabled, $conf->ticket->enabled),
'tabhelp' => array(array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1")), array('code'=>$langs->trans("EnterAnyCode"), 'use_default'=>$langs->trans("Enter0or1"))),
);
// Boxes

View File

@ -0,0 +1,22 @@
-- Copyright (C) 2018 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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 <https://www.gnu.org/licenses/>.
--
--
-- Contenu de la table llx_c_ticket_resolution
--
INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('SOLVED', '10', 'Solved', 1, 0, NULL);
INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('CANCELED', '50', 'Canceled', 1, 0, NULL);
INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('OTHER', '90', 'Other', 1, 0, NULL);

View File

@ -133,4 +133,25 @@ UPDATE llx_c_forme_juridique set libelle = 'SRL - Société à responsabilité l
ALTER TABLE llx_c_country ADD COLUMN eec integer;
UPDATE llx_c_country SET eec = 1 WHERE code IN ('AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GB','GR','HR','NL','HU','IE','IM','IT','LT','LU','LV','MC','MT','PL','PT','RO','SE','SK','SI','UK');
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG18-ASSOC', 'French foundation chart of accounts 2018', 1);
INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 1, 'PCG18-ASSOC', 'French foundation chart of accounts 2018', 1);
create table llx_c_ticket_resolution
(
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_ticket_resolution ADD UNIQUE INDEX uk_code (code, entity);
INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('SOLVED', '10', 'Solved', 1, 0, NULL);
INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('CANCELED', '50', 'Canceled', 1, 0, NULL);
INSERT INTO llx_c_ticket_resolution (code, pos, label, active, use_default, description) VALUES('OTHER', '90', 'Other', 1, 0, NULL);

View File

@ -0,0 +1,18 @@
-- Copyright (C) 2020 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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 2 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 <https://www.gnu.org/licenses/>.
--
--
ALTER TABLE llx_c_ticket_resolution ADD UNIQUE INDEX uk_code (code, entity);

View File

@ -0,0 +1,28 @@
-- Copyright (C) 2020 Laurent Destailleur <eldy@users.sourceforge.net>
--
-- 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 2 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 <https://www.gnu.org/licenses/>.
--
--
create table llx_c_ticket_resolution
(
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;

View File

@ -1794,6 +1794,7 @@ BackgroundTableLineEvenColor=Background color for even table lines
MinimumNoticePeriod=Minimum notice period (Your leave request must be done before this delay)
NbAddedAutomatically=Number of days added to counters of users (automatically) each month
EnterAnyCode=This field contains a reference to identify line. Enter any value of your choice, but without special characters.
Enter0or1=Enter 0 or 1
UnicodeCurrency=Enter here between braces, list of byte number that represent the currency symbol. For example: for $, enter [36] - for brazil real R$ [82,36] - for €, enter [8364]
ColorFormat=The RGB color is in HEX format, eg: FF0000
PositionIntoComboList=Position of line into combo lists

View File

@ -30,6 +30,7 @@ Permission56005=See tickets of all third parties (not effective for external use
TicketDictType=Ticket - Types
TicketDictCategory=Ticket - Groupes
TicketDictSeverity=Ticket - Severities
TicketDictResolution=Ticket - Resolution
TicketTypeShortBUGSOFT=Dysfonctionnement logiciel
TicketTypeShortBUGHARD=Dysfonctionnement matériel
TicketTypeShortCOM=Commercial question