Using alternative Log-Code to log comments added by Text-API or Email Interface
search cancel

Using alternative Log-Code to log comments added by Text-API or Email Interface

book

Article ID: 27832

calendar_today

Updated On:

Products

CA Service Desk Manager CA Service Management - Service Desk Manager

Issue/Introduction

We know that including "%LOG=<log message>" in email processed by maileater (or text api), a new activity log is added to the specified ticket.

The activity log is visible from the ticket, under Logs tab->Activities. Under "Type" column will appear "Log Comment" and under "Description" column will appear the <log message> we wrote.

However what if instead of the default behavior, we need the type of the log comment be other different than "Log Comment". For instance, "Field update" or "Close".

If no log code is added to the log message, by default the product will assume the log code "Log Comment"

Environment

Release: 14.1 or higher
Component:  CA Service Desk Manager

Resolution

In the file $NX_ROOT/site/text_api.cfg is says that:
# DEFAULT_LOG_CODE = Default is "LOG" for "Log Comment".

In $NX_ROOT/bin/Text_api.pl file the perl script parses the "%LOG=<text>" parameter.
It searched for a regular expression build like this:
"%LOG={{<log_code>}}<log_message>
And if it doesn't find that pattern it uses the default-log-code.

That means using the email-interface or Text-API, You may write the following line (as an example):
%LOG={{CL}}Some log text

Where we know "CL" is the log-code for Close. So in this case, the type of the log comment would be "Close" instead of "Log Comment", and as description would appear "Some log text".

Additional Information

NOTE: This has been successfully tested in r14.1, but it should also work for previous releases.

To achieve this in the Classic Web UI requires additional custom coding which is unsupported.

xFlow does not have a facility to introduce custom coding and as such does not support changing the log type of a comment at its interface.