NEW Module ticket is available as a stable module
This commit is contained in:
parent
9353cf976d
commit
f0e56abac7
@ -294,16 +294,16 @@ class FormTicket
|
|||||||
print $this->selectTypesTickets((GETPOST('type_code') ? GETPOST('type_code') : $this->type_code), 'type_code', '', '2');
|
print $this->selectTypesTickets((GETPOST('type_code') ? GETPOST('type_code') : $this->type_code), 'type_code', '', '2');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Category
|
|
||||||
print '<tr><td><span class="fieldrequired"><label for="selectcategory_code">' . $langs->trans("TicketCategory") . '</span></label></td><td>';
|
|
||||||
print $this->selectCategoriesTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Severity
|
// Severity
|
||||||
print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">' . $langs->trans("TicketSeverity") . '</span></label></td><td>';
|
print '<tr><td><span class="fieldrequired"><label for="selectseverity_code">' . $langs->trans("TicketSeverity") . '</span></label></td><td>';
|
||||||
print $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', '2');
|
print $this->selectSeveritiesTickets((GETPOST('severity_code') ? GETPOST('severity_code') : $this->severity_code), 'severity_code', '', '2');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
|
// Category
|
||||||
|
print '<tr><td><span class="fieldrequired"><label for="selectcategory_code">' . $langs->trans("TicketCategory") . '</span></label></td><td>';
|
||||||
|
print $this->selectAnalyticCodesTickets((GETPOST('category_code') ? GETPOST('category_code') : $this->category_code), 'category_code', '', '2');
|
||||||
|
print '</td></tr>';
|
||||||
|
|
||||||
// Notify thirdparty at creation
|
// Notify thirdparty at creation
|
||||||
if (empty($this->ispublic))
|
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 $selected Id categorie pre-selectionnée
|
||||||
* @param string $htmlname Nom de la zone select
|
* @param string $htmlname Nom de la zone select
|
||||||
@ -532,7 +532,7 @@ class FormTicket
|
|||||||
* @param string $morecss More CSS
|
* @param string $morecss More CSS
|
||||||
* @return void
|
* @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;
|
global $langs, $user;
|
||||||
|
|
||||||
|
|||||||
@ -63,7 +63,7 @@ class modTicket extends DolibarrModules
|
|||||||
// (where XXX is value of numeric property 'numero' of module)
|
// (where XXX is value of numeric property 'numero' of module)
|
||||||
$this->description = "Incident/support ticket management";
|
$this->description = "Incident/support ticket management";
|
||||||
// Possible values for version are: 'development', 'experimental' or version
|
// 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
|
// Key used in llx_const table to save module status enabled/disabled
|
||||||
// (where MYMODULE is value of property name of module in uppercase)
|
// (where MYMODULE is value of property name of module in uppercase)
|
||||||
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
|
$this->const_name = 'MAIN_MODULE_' . strtoupper($this->name);
|
||||||
|
|||||||
@ -961,3 +961,4 @@ FileSharedViaALink=File shared via a link
|
|||||||
SelectAThirdPartyFirst=Select a third party first...
|
SelectAThirdPartyFirst=Select a third party first...
|
||||||
YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode
|
YouAreCurrentlyInSandboxMode=You are currently in the %s "sandbox" mode
|
||||||
Inventory=Inventory
|
Inventory=Inventory
|
||||||
|
AnalyticCode=Analytic code
|
||||||
|
|||||||
@ -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)
|
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
|
TicketDictType=Tickets type
|
||||||
TicketDictCategory=Tickets categories
|
TicketDictCategory=Tickets analytic code
|
||||||
TicketDictSeverity=Tickets severity
|
TicketDictSeverity=Tickets severity
|
||||||
TicketTypeShortBUGSOFT=Dysfonctionnement logiciel
|
TicketTypeShortBUGSOFT=Dysfonctionnement logiciel
|
||||||
TicketTypeShortBUGHARD=Dysfonctionnement matériel
|
TicketTypeShortBUGHARD=Dysfonctionnement matériel
|
||||||
@ -67,7 +67,7 @@ Deleted=Deleted
|
|||||||
|
|
||||||
# Dict
|
# Dict
|
||||||
Type=Type
|
Type=Type
|
||||||
Category=Category
|
Category=Analytic code
|
||||||
Severity=Severity
|
Severity=Severity
|
||||||
|
|
||||||
# Email templates
|
# Email templates
|
||||||
@ -80,7 +80,7 @@ TicketSetup=Ticket module setup
|
|||||||
TicketSettings=Settings
|
TicketSettings=Settings
|
||||||
TicketSetupPage=
|
TicketSetupPage=
|
||||||
TicketPublicAccess=A public interface requiring no identification is available at the following url
|
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
|
TicketParamModule=Module variable setup
|
||||||
TicketParamMail=Email setup
|
TicketParamMail=Email setup
|
||||||
TicketEmailNotificationFrom=Notification email from
|
TicketEmailNotificationFrom=Notification email from
|
||||||
@ -147,7 +147,7 @@ CreatedBy=Created by
|
|||||||
NewTicket=New Ticket
|
NewTicket=New Ticket
|
||||||
SubjectAnswerToTicket=Ticket answer
|
SubjectAnswerToTicket=Ticket answer
|
||||||
TicketTypeRequest=Request type
|
TicketTypeRequest=Request type
|
||||||
TicketCategory=Category
|
TicketCategory=Analytic code
|
||||||
SeeTicket=See ticket
|
SeeTicket=See ticket
|
||||||
TicketMarkedAsRead=Ticket has been marked as read
|
TicketMarkedAsRead=Ticket has been marked as read
|
||||||
TicketReadOn=Read on
|
TicketReadOn=Read on
|
||||||
@ -158,7 +158,7 @@ TicketHistory=Ticket history
|
|||||||
AssignUser=Assign to user
|
AssignUser=Assign to user
|
||||||
TicketAssigned=Ticket is now assigned
|
TicketAssigned=Ticket is now assigned
|
||||||
TicketChangeType=Change type
|
TicketChangeType=Change type
|
||||||
TicketChangeCategory=Change category
|
TicketChangeCategory=Change analytic code
|
||||||
TicketChangeSeverity=Change severity
|
TicketChangeSeverity=Change severity
|
||||||
TicketAddMessage=Add a message
|
TicketAddMessage=Add a message
|
||||||
AddMessage=Add a message
|
AddMessage=Add a message
|
||||||
|
|||||||
@ -471,7 +471,7 @@ if ($action == "view_ticketlist")
|
|||||||
|
|
||||||
if (!empty($arrayfields['category.code']['checked'])) {
|
if (!empty($arrayfields['category.code']['checked'])) {
|
||||||
print '<td class="liste_titre">';
|
print '<td class="liste_titre">';
|
||||||
$formTicket->selectCategoriesTickets($search_category, 'search_category', '', 2, 1, 1);
|
$formTicket->selectAnalyticCodesTickets($search_category, 'search_category', '', 2, 1, 1);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -149,8 +149,8 @@ if ($action == "change_property" && GETPOST('btn_update_ticket_prop', 'alpha') &
|
|||||||
$object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha'));
|
$object->fetch(GETPOST('id', 'int'), '', GETPOST('track_id', 'alpha'));
|
||||||
|
|
||||||
$object->type_code = GETPOST('update_value_type', 'az09');
|
$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->severity_code = GETPOST('update_value_severity', 'az09');
|
||||||
|
$object->category_code = GETPOST('update_value_category', 'az09');
|
||||||
|
|
||||||
$ret = $object->update($user);
|
$ret = $object->update($user);
|
||||||
if ($ret > 0) {
|
if ($ret > 0) {
|
||||||
@ -542,16 +542,16 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $langs->trans('TicketChangeCategory');
|
print $langs->trans('TicketChangeSeverity');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $formticket->selectCategoriesTickets($object->category_code, 'update_value_category', '', 2);
|
print $formticket->selectSeveritiesTickets($object->severity_code, 'update_value_severity', '', 2);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $langs->trans('TicketChangeSeverity');
|
print $langs->trans('TicketChangeCategory');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $formticket->selectSeveritiesTickets($object->severity_code, 'update_value_severity', '', 2);
|
print $formticket->selectAnalyticCodesTickets($object->category_code, 'update_value_category', '', 2);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
} else {
|
} else {
|
||||||
@ -563,17 +563,17 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
}*/
|
}*/
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Category
|
// Severity
|
||||||
print '<tr><td>' . $langs->trans("Category") . '</td><td>';
|
print '<tr><td>' . $langs->trans("TicketSeverity") . '</td><td>';
|
||||||
print $langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label');
|
print $langs->getLabelFromKey($db, $object->severity_code, 'c_ticket_severity', 'code', 'label');
|
||||||
/*if ($user->admin && !$noadmininfo) {
|
/*if ($user->admin && !$noadmininfo) {
|
||||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
}*/
|
}*/
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Severity
|
// Category
|
||||||
print '<tr><td>' . $langs->trans("TicketSeverity") . '</td><td>';
|
print '<tr><td>' . $langs->trans("AnalyticCode") . '</td><td>';
|
||||||
print $langs->getLabelFromKey($db, $object->severity_code, 'c_ticket_severity', 'code', 'label');
|
print $langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label');
|
||||||
/*if ($user->admin && !$noadmininfo) {
|
/*if ($user->admin && !$noadmininfo) {
|
||||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
}*/
|
}*/
|
||||||
@ -824,8 +824,9 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
$formticket->substit['__TICKETSUP_REF__'] = $object->ref;
|
$formticket->substit['__TICKETSUP_REF__'] = $object->ref;
|
||||||
$formticket->substit['__TICKETSUP_SUBJECT__'] = $object->subject;
|
$formticket->substit['__TICKETSUP_SUBJECT__'] = $object->subject;
|
||||||
$formticket->substit['__TICKETSUP_TYPE__'] = $object->type_code;
|
$formticket->substit['__TICKETSUP_TYPE__'] = $object->type_code;
|
||||||
$formticket->substit['__TICKETSUP_CATEGORY__'] = $object->category_code;
|
|
||||||
$formticket->substit['__TICKETSUP_SEVERITY__'] = $object->severity_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_MESSAGE__'] = $object->message;
|
||||||
$formticket->substit['__TICKETSUP_PROGRESSION__'] = $object->progress;
|
$formticket->substit['__TICKETSUP_PROGRESSION__'] = $object->progress;
|
||||||
if ($object->fk_user_assign > 0) {
|
if ($object->fk_user_assign > 0) {
|
||||||
|
|||||||
@ -529,7 +529,7 @@ foreach($object->fields as $key => $val)
|
|||||||
print '</td>';
|
print '</td>';
|
||||||
} elseif ($key == 'category_code') {
|
} elseif ($key == 'category_code') {
|
||||||
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
||||||
$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 '</td>';
|
print '</td>';
|
||||||
} elseif ($key == 'severity_code') {
|
} elseif ($key == 'severity_code') {
|
||||||
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user