Add info to allow debug of email collector

This commit is contained in:
Laurent Destailleur 2021-06-14 19:58:12 +02:00
parent d6d419783e
commit a79afeaf02
4 changed files with 20 additions and 2 deletions

View File

@ -1539,7 +1539,7 @@ class EmailCollector extends CommonObject
// Make Operation
dol_syslog("Execute action ".$operation['type']." actionparam=".$operation['actionparam'].' thirdpartystatic->id='.$thirdpartystatic->id.' contactstatic->id='.$contactstatic->id.' projectstatic->id='.$projectstatic->id);
dol_syslog("Execute action fk_element_id=".$fk_element_id." fk_element_type=".$fk_element_type);
dol_syslog("Execute action fk_element_id=".$fk_element_id." fk_element_type=".$fk_element_type); // If a Dolibarr tracker id is found, we should now the id of object
$actioncode = 'EMAIL_IN';
// If we scan the Sent box, we use the code for out email

View File

@ -1117,3 +1117,4 @@ UpdateForAllLines=Update for all lines
OnHold=On hold
Civility=Civility
InformationOnLinkToContract=This amount is only the total of all the lines of the contract. No notion of time is taken into consideration.
EmailMsgID=Email MsgID

View File

@ -206,6 +206,7 @@ class Project extends CommonObject
'fk_user_creat' =>array('type'=>'integer', 'label'=>'UserCreation', 'enabled'=>1, 'visible'=>0, 'notnull'=>1, 'position'=>210),
'fk_user_modif' =>array('type'=>'integer', 'label'=>'UserModification', 'enabled'=>1, 'visible'=>0, 'position'=>215),
'import_key' =>array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>0, 'position'=>220),
'email_msgid'=>array('type'=>'varchar(255)', 'label'=>'EmailMsgID', 'enabled'=>1, 'visible'=>-1, 'position'=>250, 'help'=>'EmailMsgIDWhenSourceisEmail'),
'fk_statut' =>array('type'=>'smallint(6)', 'label'=>'Status', 'enabled'=>1, 'visible'=>1, 'notnull'=>1, 'position'=>500)
);
// END MODULEBUILDER PROPERTIES

View File

@ -25,7 +25,7 @@
/**
* \file htdocs/projet/list.php
* \ingroup projet
* \ingroup project
* \brief Page to list projects
*/
@ -300,6 +300,7 @@ if (count($listofprojectcontacttype) == 0) $listofprojectcontacttype[0] = '0'; /
$distinct = 'DISTINCT'; // We add distinct until we are added a protection to be sure a contact of a project and task is only once.
$sql = "SELECT ".$distinct." p.rowid as id, p.ref, p.title, p.fk_statut as status, p.fk_opp_status, p.public, p.fk_user_creat";
$sql .= ", p.datec as date_creation, p.dateo as date_start, p.datee as date_end, p.opp_amount, p.opp_percent, (p.opp_amount*p.opp_percent/100) as opp_weighted_amount, p.tms as date_update, p.budget_amount, p.usage_opportunity, p.usage_task, p.usage_bill_time";
$sql .= ", p.email_msgid";
$sql .= ", s.rowid as socid, s.nom as name, s.email";
$sql .= ", cls.code as opp_status_code";
// Add fields from extrafields
@ -668,6 +669,12 @@ if (!empty($arrayfields['p.tms']['checked']))
print '<td class="liste_titre">';
print '</td>';
}
if (!empty($arrayfields['p.email_msgid']['checked']))
{
// Email msg id
print '<td class="liste_titre">';
print '</td>';
}
if (!empty($arrayfields['p.fk_statut']['checked']))
{
print '<td class="liste_titre nowrap right">';
@ -710,6 +717,7 @@ $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // No
print $hookmanager->resPrint;
if (!empty($arrayfields['p.datec']['checked'])) print_liste_field_titre($arrayfields['p.datec']['label'], $_SERVER["PHP_SELF"], "p.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (!empty($arrayfields['p.tms']['checked'])) print_liste_field_titre($arrayfields['p.tms']['label'], $_SERVER["PHP_SELF"], "p.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
if (!empty($arrayfields['p.email_msgid']['checked'])) print_liste_field_titre($arrayfields['p.email_msgid']['label'], $_SERVER["PHP_SELF"], "p.email_msgid", "", $param, '', $sortfield, $sortorder, 'center ');
if (!empty($arrayfields['p.fk_statut']['checked'])) print_liste_field_titre($arrayfields['p.fk_statut']['label'], $_SERVER["PHP_SELF"], "p.fk_statut", "", $param, '', $sortfield, $sortorder, 'right ');
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'center maxwidthsearch ');
print "</tr>\n";
@ -948,6 +956,14 @@ while ($i < min($num, $limit))
print '</td>';
if (!$i) $totalarray['nbfield']++;
}
// Email MsgID
if (!empty($arrayfields['p.email_msgid']['checked']))
{
print '<td class="center">';
print $obj->email_msgid;
print '</td>';
if (!$i) $totalarray['nbfield']++;
}
// Status
if (!empty($arrayfields['p.fk_statut']['checked']))
{