Debug ticket module
This commit is contained in:
parent
05c14e4f2f
commit
4f2a3d6bdd
@ -1265,7 +1265,6 @@ class EmailCollector extends CommonObject
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Do operations
|
// Do operations
|
||||||
foreach($this->actions as $operation)
|
foreach($this->actions as $operation)
|
||||||
{
|
{
|
||||||
@ -1476,7 +1475,7 @@ class EmailCollector extends CommonObject
|
|||||||
//$actioncomm->extraparams = $extraparams;
|
//$actioncomm->extraparams = $extraparams;
|
||||||
|
|
||||||
// Overwrite values with values extracted from source email
|
// Overwrite values with values extracted from source email
|
||||||
$errorforthisaction = $this->overwritePropertiesOfObject($actioncommn, $operation['actionparam'], $messagetext, $subject, $header);
|
$errorforthisaction = $this->overwritePropertiesOfObject($actioncomm, $operation['actionparam'], $messagetext, $subject, $header);
|
||||||
|
|
||||||
if ($errorforthisaction)
|
if ($errorforthisaction)
|
||||||
{
|
{
|
||||||
@ -1610,10 +1609,11 @@ class EmailCollector extends CommonObject
|
|||||||
$descriptionfull = dol_concatdesc($descriptionfull, $header);
|
$descriptionfull = dol_concatdesc($descriptionfull, $header);
|
||||||
|
|
||||||
$tickettocreate->title = $subject;
|
$tickettocreate->title = $subject;
|
||||||
|
$tickettocreate->message = $description;
|
||||||
$tickettocreate->type_code = 0;
|
$tickettocreate->type_code = 0;
|
||||||
$tickettocreate->category_code = 0;
|
$tickettocreate->category_code = 0;
|
||||||
$tickettocreate->severity_code = 0;
|
$tickettocreate->severity_code = 0;
|
||||||
$tickettocreate->origin_email = $fromstring;
|
$tickettocreate->origin_email = $from;
|
||||||
$tickettocreate->fk_user_create = $user->id;
|
$tickettocreate->fk_user_create = $user->id;
|
||||||
$tickettocreate->entity = $conf->entity;
|
$tickettocreate->entity = $conf->entity;
|
||||||
$tickettocreate->datec = $date;
|
$tickettocreate->datec = $date;
|
||||||
|
|||||||
@ -246,9 +246,10 @@ YourPasswordHasBeenReset=Your password has been reset successfully
|
|||||||
ApplicantIpAddress=IP address of applicant
|
ApplicantIpAddress=IP address of applicant
|
||||||
SMSSentTo=SMS sent to %s
|
SMSSentTo=SMS sent to %s
|
||||||
MissingIds=Missing ids
|
MissingIds=Missing ids
|
||||||
ThirdPartyCreatedByEmailCollector=Third party created by email collector from email ID %s
|
ThirdPartyCreatedByEmailCollector=Third party created by email collector from email MSGID %s
|
||||||
ContactCreatedByEmailCollector=Contact/address created by email collector from email ID %s
|
ContactCreatedByEmailCollector=Contact/address created by email collector from email MSGID %s
|
||||||
ProjectCreatedByEmailCollector=Project created by email collector from email ID %s
|
ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s
|
||||||
|
TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s
|
||||||
|
|
||||||
##### Export #####
|
##### Export #####
|
||||||
ExportsArea=Exports area
|
ExportsArea=Exports area
|
||||||
|
|||||||
@ -644,7 +644,6 @@ if ($action == 'create' || $action == 'presend')
|
|||||||
if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'add_message' || $action == 'close' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'reopen'
|
if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'add_message' || $action == 'close' || $action == 'delete' || $action == 'editcustomer' || $action == 'progression' || $action == 'reopen'
|
||||||
|| $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink')
|
|| $action == 'editsubject' || $action == 'edit_extras' || $action == 'update_extras' || $action == 'edit_extrafields' || $action == 'set_extrafields' || $action == 'classify' || $action == 'sel_contract' || $action == 'edit_message_init' || $action == 'set_status' || $action == 'dellink')
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($res > 0)
|
if ($res > 0)
|
||||||
{
|
{
|
||||||
// or for unauthorized internals users
|
// or for unauthorized internals users
|
||||||
@ -959,12 +958,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
$actionobject->viewTicketOriginalMessage($user, $action, $object);
|
$actionobject->viewTicketOriginalMessage($user, $action, $object);
|
||||||
|
|
||||||
|
|
||||||
/***************************************************
|
// Classification of ticket
|
||||||
*
|
|
||||||
* Classification and actions on ticket
|
|
||||||
*
|
|
||||||
***************************************************/
|
|
||||||
|
|
||||||
print '<form method="post" name="formticketproperties" action="' . $url_page_current . '">';
|
print '<form method="post" name="formticketproperties" action="' . $url_page_current . '">';
|
||||||
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
print '<input type="hidden" name="token" value="' . $_SESSION['newtoken'] . '">';
|
||||||
print '<input type="hidden" name="action" value="change_property">';
|
print '<input type="hidden" name="action" value="change_property">';
|
||||||
@ -991,19 +985,14 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
print '</tr>';
|
print '</tr>';
|
||||||
if (GETPOST('set', 'alpha') == 'properties' && $user->rights->ticket->write) {
|
if (GETPOST('set', 'alpha') == 'properties' && $user->rights->ticket->write) {
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
|
// Type
|
||||||
print '<td class="titlefield">';
|
print '<td class="titlefield">';
|
||||||
print $langs->trans('TicketChangeType');
|
print $langs->trans('TicketChangeType');
|
||||||
print '</td><td>';
|
print '</td><td>';
|
||||||
print $formticket->selectTypesTickets($object->type_code, 'update_value_type', '', 2);
|
print $formticket->selectTypesTickets($object->type_code, 'update_value_type', '', 2);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '<tr>';
|
// Group
|
||||||
print '<td>';
|
|
||||||
print $langs->trans('TicketChangeSeverity');
|
|
||||||
print '</td><td>';
|
|
||||||
print $formticket->selectSeveritiesTickets($object->severity_code, 'update_value_severity', '', 2);
|
|
||||||
print '</td>';
|
|
||||||
print '</tr>';
|
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>';
|
print '<td>';
|
||||||
print $langs->trans('TicketChangeCategory');
|
print $langs->trans('TicketChangeCategory');
|
||||||
@ -1011,6 +1000,14 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
print $formticket->selectGroupTickets($object->category_code, 'update_value_category', '', 2);
|
print $formticket->selectGroupTickets($object->category_code, 'update_value_category', '', 2);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
// Severity
|
||||||
|
print '<tr>';
|
||||||
|
print '<td>';
|
||||||
|
print $langs->trans('TicketChangeSeverity');
|
||||||
|
print '</td><td>';
|
||||||
|
print $formticket->selectSeveritiesTickets($object->severity_code, 'update_value_severity', '', 2);
|
||||||
|
print '</td>';
|
||||||
|
print '</tr>';
|
||||||
} else {
|
} else {
|
||||||
// Type
|
// Type
|
||||||
print '<tr><td class="titlefield">' . $langs->trans("Type") . '</td><td>';
|
print '<tr><td class="titlefield">' . $langs->trans("Type") . '</td><td>';
|
||||||
@ -1019,15 +1016,6 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
}*/
|
}*/
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
// Severity
|
|
||||||
print '<tr><td>' . $langs->trans("TicketSeverity") . '</td><td>';
|
|
||||||
print $langs->getLabelFromKey($db, $object->severity_code, 'c_ticket_severity', 'code', 'label');
|
|
||||||
/*if ($user->admin && !$noadmininfo) {
|
|
||||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
|
||||||
}*/
|
|
||||||
print '</td></tr>';
|
|
||||||
|
|
||||||
// Group
|
// Group
|
||||||
print '<tr><td>' . $langs->trans("TicketGroup") . '</td><td>';
|
print '<tr><td>' . $langs->trans("TicketGroup") . '</td><td>';
|
||||||
print $langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label');
|
print $langs->getLabelFromKey($db, $object->category_code, 'c_ticket_category', 'code', 'label');
|
||||||
@ -1035,6 +1023,13 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
}*/
|
}*/
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
// Severity
|
||||||
|
print '<tr><td>' . $langs->trans("TicketSeverity") . '</td><td>';
|
||||||
|
print $langs->getLabelFromKey($db, $object->severity_code, 'c_ticket_severity', 'code', 'label');
|
||||||
|
/*if ($user->admin && !$noadmininfo) {
|
||||||
|
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||||
|
}*/
|
||||||
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
print '</table>'; // End table actions
|
print '</table>'; // End table actions
|
||||||
|
|
||||||
@ -1215,7 +1210,6 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
$action = 'presend';
|
$action = 'presend';
|
||||||
}
|
}
|
||||||
|
|
||||||
//if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'dellink' || $action == 'delete' || $action == 'edit_message_init')
|
|
||||||
if ($action != 'add_message')
|
if ($action != 'add_message')
|
||||||
{
|
{
|
||||||
print '<div class="fichecenter"><div class="fichehalfleft">';
|
print '<div class="fichecenter"><div class="fichehalfleft">';
|
||||||
@ -1236,7 +1230,7 @@ if (empty($action) || $action == 'view' || $action == 'addlink' || $action == 'd
|
|||||||
print '</div><!-- fichecenter -->';
|
print '</div><!-- fichecenter -->';
|
||||||
print '<br style="clear: both">';
|
print '<br style="clear: both">';
|
||||||
}
|
}
|
||||||
elseif ($action == 'add_message')
|
else
|
||||||
{
|
{
|
||||||
$action='new_message';
|
$action='new_message';
|
||||||
$modelmail='ticket_send';
|
$modelmail='ticket_send';
|
||||||
|
|||||||
@ -286,6 +286,8 @@ class ActionsTicket
|
|||||||
public function viewTicketOriginalMessage($user, $action, $object)
|
public function viewTicketOriginalMessage($user, $action, $object)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
|
print '<!-- initial message of ticket -->'."\n";
|
||||||
if (!empty($user->rights->ticket->manage) && $action == 'edit_message_init') {
|
if (!empty($user->rights->ticket->manage) && $action == 'edit_message_init') {
|
||||||
// MESSAGE
|
// MESSAGE
|
||||||
|
|
||||||
@ -326,14 +328,15 @@ class ActionsTicket
|
|||||||
|
|
||||||
//print '<div>' . $object->message . '</div>';
|
//print '<div>' . $object->message . '</div>';
|
||||||
}
|
}
|
||||||
|
if ($user->rights->ticket->manage && $action == 'edit_message_init') {
|
||||||
|
print '<div class="center">';
|
||||||
|
print ' <input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
||||||
|
print ' <input type="submit" class="button" name="cancel" value="' . $langs->trans('Cancel') . '">';
|
||||||
|
print '</div>';
|
||||||
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
print '</table>';
|
print '</table>';
|
||||||
if ($user->rights->ticket->manage && $action == 'edit_message_init') {
|
|
||||||
print ' <input type="submit" class="button" value="' . $langs->trans('Modify') . '">';
|
|
||||||
print ' <input type="submit" class="button" name="cancel" value="' . $langs->trans('Cancel') . '">';
|
|
||||||
print '</form>';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* View html list of message for ticket
|
* View html list of message for ticket
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user