NEW Printing the initial message from ticket creation just like any new message in tickets Events/Agenda view (#37713)
* Printing the initial message from ticket creation just like any new message * Using the same dolPrintHTML parameters regardless of message origin * remove empty line * Use functions names to make PHAN happy --------- Co-authored-by: Jon Bendtsen <jonbendtsen@jonb.dk>
This commit is contained in:
parent
a821937f1f
commit
6f2f56b0dc
2 changed files with 10 additions and 5 deletions
|
|
@ -16253,6 +16253,7 @@ function dolForgeSQLCriteriaCallback($matches)
|
|||
*/
|
||||
function getTimelineIcon($actionstatic, &$histo, $key)
|
||||
{
|
||||
dol_syslog('getTimelineIcon::begin', LOG_DEBUG);
|
||||
global $langs;
|
||||
|
||||
$out = '<!-- timeline icon -->' . "\n";
|
||||
|
|
@ -16360,6 +16361,7 @@ function getActionCommEcmList($object)
|
|||
*/
|
||||
function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null, $noprint = 0, $actioncode = '', $donetodo = 'done', $filters = array(), $sortfield = 'a.datep,a.id', $sortorder = 'DESC')
|
||||
{
|
||||
dol_syslog('show_actions_messaging::begin', LOG_DEBUG);
|
||||
global $user, $conf;
|
||||
global $form;
|
||||
|
||||
|
|
@ -17022,14 +17024,17 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
|
|||
$out .= '</h3>';
|
||||
|
||||
// Message
|
||||
if ($actionstatic->code == 'AC_TICKET_CREATE') {
|
||||
$newmess = $filterobj->message;
|
||||
} else {
|
||||
$newmess = $histo[$key]['message'];
|
||||
}
|
||||
if (
|
||||
!empty($histo[$key]['message'] && $histo[$key]['message'] != $libelle)
|
||||
&& $actionstatic->code != 'AC_TICKET_CREATE'
|
||||
!empty($newmess && $newmess != $libelle)
|
||||
&& $actionstatic->code != 'AC_TICKET_MODIFY'
|
||||
) {
|
||||
$out .= '<div class="timeline-body wordbreak small">';
|
||||
$truncateLines = getDolGlobalInt('MAIN_TRUNCATE_TIMELINE_MESSAGE', 3);
|
||||
$newmess = $histo[$key]['message'];
|
||||
$truncatedText = dolGetFirstLineOfText($newmess, $truncateLines);
|
||||
if ($truncateLines > 0 && strlen($newmess) > strlen($truncatedText)) {
|
||||
$out .= '<div class="readmore-block --closed" >';
|
||||
|
|
@ -17045,9 +17050,8 @@ function show_actions_messaging($conf, $langs, $db, $filterobj, $objcon = null,
|
|||
$out .= ' </div>';
|
||||
$out .= '</div>';
|
||||
} else {
|
||||
$out .= dolPrintHTML($newmess, 0, array('pre', 'code'));
|
||||
$out .= dolPrintHTML($newmess, 0, array('pre', 'code'));
|
||||
}
|
||||
|
||||
$out .= '</div>';
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -200,6 +200,7 @@ class ActionsTicket extends CommonHookActions
|
|||
*/
|
||||
public function viewTicketOriginalMessage($user, $action, $object)
|
||||
{
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
global $langs;
|
||||
|
||||
$closeStatuses = [Ticket::STATUS_CLOSED, Ticket::STATUS_CANCELED];
|
||||
|
|
|
|||
Loading…
Reference in a new issue