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 '</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
|
||||
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 '</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
|
||||
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;
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
@ -471,7 +471,7 @@ if ($action == "view_ticketlist")
|
||||
|
||||
if (!empty($arrayfields['category.code']['checked'])) {
|
||||
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>';
|
||||
}
|
||||
|
||||
|
||||
@ -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 '</tr>';
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $langs->trans('TicketChangeCategory');
|
||||
print $langs->trans('TicketChangeSeverity');
|
||||
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 '</tr>';
|
||||
print '<tr>';
|
||||
print '<td>';
|
||||
print $langs->trans('TicketChangeSeverity');
|
||||
print $langs->trans('TicketChangeCategory');
|
||||
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 '</tr>';
|
||||
} else {
|
||||
@ -563,14 +563,6 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
||||
}*/
|
||||
print '</td></tr>';
|
||||
|
||||
// Category
|
||||
print '<tr><td>' . $langs->trans("Category") . '</td><td>';
|
||||
print $langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label');
|
||||
/*if ($user->admin && !$noadmininfo) {
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
}*/
|
||||
print '</td></tr>';
|
||||
|
||||
// Severity
|
||||
print '<tr><td>' . $langs->trans("TicketSeverity") . '</td><td>';
|
||||
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 '</td></tr>';
|
||||
|
||||
// Category
|
||||
print '<tr><td>' . $langs->trans("AnalyticCode") . '</td><td>';
|
||||
print $langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label');
|
||||
/*if ($user->admin && !$noadmininfo) {
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
}*/
|
||||
print '</td></tr>';
|
||||
}
|
||||
print '</table>'; // 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) {
|
||||
|
||||
@ -529,7 +529,7 @@ foreach($object->fields as $key => $val)
|
||||
print '</td>';
|
||||
} elseif ($key == 'category_code') {
|
||||
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>';
|
||||
} elseif ($key == 'severity_code') {
|
||||
print '<td class="liste_titre'.($cssforfield?' '.$cssforfield:'').'">';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user