diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index b3ddc39b618..4b03886a714 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -294,16 +294,16 @@ class FormTicket
print $this->selectTypesTickets((GETPOST('type_code') ? GETPOST('type_code') : $this->type_code), 'type_code', '', '2');
print '';
- // Category
- print '
| ';
- print $this->selectCategoriesTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
- print ' |
';
-
// Severity
print ' | ';
print $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', '2');
print ' |
';
+ // Category
+ print ' | ';
+ print $this->selectAnalyticCodesTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
+ print ' |
';
+
// Notify thirdparty at creation
if (empty($this->ispublic))
{
@@ -520,7 +520,7 @@ class FormTicket
}
/**
- * Return html list of ticket categories
+ * Return html list of ticket anaytic codes
*
* @param string $selected Id categorie pre-selectionnée
* @param string $htmlname Nom de la zone select
@@ -532,7 +532,7 @@ class FormTicket
* @param string $morecss More CSS
* @return void
*/
- public function selectCategoriesTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
+ public function selectAnalyticCodesTickets($selected = '', $htmlname = 'ticketcategory', $filtertype = '', $format = 0, $empty = 0, $noadmininfo = 0, $maxlength = 0, $morecss = '')
{
global $langs, $user;
diff --git a/htdocs/core/modules/modTicket.class.php b/htdocs/core/modules/modTicket.class.php
index f98343865c2..3de9d609eab 100644
--- a/htdocs/core/modules/modTicket.class.php
+++ b/htdocs/core/modules/modTicket.class.php
@@ -63,7 +63,7 @@ class modTicket extends DolibarrModules
// (where XXX is value of numeric property 'numero' of module)
$this->description = "Incident/support ticket management";
// Possible values for version are: 'development', 'experimental' or version
- $this->version = 'experimental';
+ $this->version = 'dolibarr';
// Key used in llx_const table to save module status enabled/disabled
// (where MYMODULE is value of property name of module in uppercase)
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index d70e39c66a5..c59bce88a22 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -961,3 +961,4 @@ FileSharedViaALink=File shared via a link
SelectAThirdPartyFirst=Select a third party first...
YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode
Inventory=Inventory
+AnalyticCode=Analytic code
diff --git a/htdocs/langs/en_US/ticket.lang b/htdocs/langs/en_US/ticket.lang
index 1a9e4ca232d..72a3cfe93f2 100644
--- a/htdocs/langs/en_US/ticket.lang
+++ b/htdocs/langs/en_US/ticket.lang
@@ -28,7 +28,7 @@ Permission56004=Manage tickets
Permission56005=See tickets of all third parties (not effective for external users, always be limited to the third party they depend on)
TicketDictType=Tickets type
-TicketDictCategory=Tickets categories
+TicketDictCategory=Tickets analytic code
TicketDictSeverity=Tickets severity
TicketTypeShortBUGSOFT=Dysfonctionnement logiciel
TicketTypeShortBUGHARD=Dysfonctionnement matériel
@@ -67,7 +67,7 @@ Deleted=Deleted
# Dict
Type=Type
-Category=Category
+Category=Analytic code
Severity=Severity
# Email templates
@@ -80,7 +80,7 @@ TicketSetup=Ticket module setup
TicketSettings=Settings
TicketSetupPage=
TicketPublicAccess=A public interface requiring no identification is available at the following url
-TicketSetupDictionaries=The type of application categories and severity level are configurable from dictionaries
+TicketSetupDictionaries=The type of ticket, severity and analytic codes are configurable from dictionaries
TicketParamModule=Module variable setup
TicketParamMail=Email setup
TicketEmailNotificationFrom=Notification email from
@@ -147,7 +147,7 @@ CreatedBy=Created by
NewTicket=New Ticket
SubjectAnswerToTicket=Ticket answer
TicketTypeRequest=Request type
-TicketCategory=Category
+TicketCategory=Analytic code
SeeTicket=See ticket
TicketMarkedAsRead=Ticket has been marked as read
TicketReadOn=Read on
@@ -158,7 +158,7 @@ TicketHistory=Ticket history
AssignUser=Assign to user
TicketAssigned=Ticket is now assigned
TicketChangeType=Change type
-TicketChangeCategory=Change category
+TicketChangeCategory=Change analytic code
TicketChangeSeverity=Change severity
TicketAddMessage=Add a message
AddMessage=Add a message
diff --git a/htdocs/public/ticket/list.php b/htdocs/public/ticket/list.php
index f11583ac64d..1661807d634 100644
--- a/htdocs/public/ticket/list.php
+++ b/htdocs/public/ticket/list.php
@@ -471,7 +471,7 @@ if ($action == "view_ticketlist")
if (!empty($arrayfields['category.code']['checked'])) {
print '';
- $formTicket->selectCategoriesTickets($search_category, 'search_category', '', 2, 1, 1);
+ $formTicket->selectAnalyticCodesTickets($search_category, 'search_category', '', 2, 1, 1);
print ' | ';
}
diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php
index 4b9dc7fe0bd..631ee0d3c41 100644
--- a/htdocs/ticket/card.php
+++ b/htdocs/ticket/card.php
@@ -149,8 +149,8 @@ if ($action == "change_property" && GETPOST('btn_update_ticket_prop', 'alpha') &
$object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha'));
$object->type_code = GETPOST('update_value_type', 'az09');
- $object->category_code = GETPOST('update_value_category', 'az09');
$object->severity_code = GETPOST('update_value_severity', 'az09');
+ $object->category_code = GETPOST('update_value_category', 'az09');
$ret = $object->update($user);
if ($ret > 0) {
@@ -542,16 +542,16 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
print '';
print '';
print '| ';
- print $langs->trans('TicketChangeCategory');
+ print $langs->trans('TicketChangeSeverity');
print ' | ';
- print $formticket->selectCategoriesTickets($object->category_code, 'update_value_category', '', 2);
+ print $formticket->selectSeveritiesTickets($object->severity_code, 'update_value_severity', '', 2);
print ' | ';
print '
';
print '';
print '| ';
- print $langs->trans('TicketChangeSeverity');
+ print $langs->trans('TicketChangeCategory');
print ' | ';
- print $formticket->selectSeveritiesTickets($object->severity_code, 'update_value_severity', '', 2);
+ print $formticket->selectAnalyticCodesTickets($object->category_code, 'update_value_category', '', 2);
print ' | ';
print '
';
} else {
@@ -563,14 +563,6 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
}*/
print '';
- // Category
- print '| ' . $langs->trans("Category") . ' | ';
- print $langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label');
- /*if ($user->admin && !$noadmininfo) {
- print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
- }*/
- print ' |
';
-
// Severity
print '| ' . $langs->trans("TicketSeverity") . ' | ';
print $langs->getLabelFromKey($db, $object->severity_code, 'c_ticket_severity', 'code', 'label');
@@ -578,6 +570,14 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
}*/
print ' |
';
+
+ // Category
+ print '| ' . $langs->trans("AnalyticCode") . ' | ';
+ print $langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label');
+ /*if ($user->admin && !$noadmininfo) {
+ print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
+ }*/
+ print ' |
';
}
print ''; // End table actions
@@ -824,8 +824,9 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
$formticket->substit['__TICKETSUP_REF__'] = $object->ref;
$formticket->substit['__TICKETSUP_SUBJECT__'] = $object->subject;
$formticket->substit['__TICKETSUP_TYPE__'] = $object->type_code;
- $formticket->substit['__TICKETSUP_CATEGORY__'] = $object->category_code;
$formticket->substit['__TICKETSUP_SEVERITY__'] = $object->severity_code;
+ $formticket->substit['__TICKETSUP_CATEGORY__'] = $object->category_code; // For backward compatibility
+ $formticket->substit['__TICKETSUP_ANALYTIC_CODE__'] = $object->category_code;
$formticket->substit['__TICKETSUP_MESSAGE__'] = $object->message;
$formticket->substit['__TICKETSUP_PROGRESSION__'] = $object->progress;
if ($object->fk_user_assign > 0) {
diff --git a/htdocs/ticket/list.php b/htdocs/ticket/list.php
index 81f4678eb89..b9bf46ef83a 100644
--- a/htdocs/ticket/list.php
+++ b/htdocs/ticket/list.php
@@ -529,7 +529,7 @@ foreach($object->fields as $key => $val)
print '';
} elseif ($key == 'category_code') {
print '';
- $formTicket->selectCategoriesTickets(dol_escape_htmltag($search[$key]), 'search_'.$key.'', '', 0, 1, 1, 0, ($val['css']?$val['css']:'maxwidth200'));
+ $formTicket->selectAnalyticCodesTickets(dol_escape_htmltag($search[$key]), 'search_'.$key.'', '', 0, 1, 1, 0, ($val['css']?$val['css']:'maxwidth200'));
print ' | ';
} elseif ($key == 'severity_code') {
print '';
|