How to prevent an email notifications for a "Created Via Email" Activity.

Document ID : KB000021898
Last Modified Date : 02/07/2018
Show Technical Document Details
Introduction:

Symptom:

When users update Service desk Tickets using Maileater, they find two “log comment” activities getting added to the Activity tab. By default one of the activities is "Created Via Email". This may result in Service Desk Manager sending two email notification to same client, one for each activity.

Environment: 

This situation is not environment specific.

Cause:

Whenever a text api update request comes to the pdm_text_cmd daemon, the text api would take the log code from text_api.cfg file and would set the activity type for the update request.

The Text_api.cfg configuration file has default log code set to 'LOG' which is 'Log Comment' activity type. The same activity log type is assigned to updates made via Mail eater or CMD interfaces and for log comment updates coming from '%LOG' parameter in the mail body.

Hence, double activities of type 'Log comment' were logged whenever mail eater update request comes to Service Desk. Some customers have requirement of sending mails for both '%LOG' and mail eater update. If you do not want the double log comment activities to be logged then please follow and implement below customizable solution in your environment.

Workaround:

Below is the customizable solution to avoid multiple mails problem caused by double log comment activities.

  1. Log in Service Desk Manager web interface as Administrator. 
  2. Navigate to 'Administration' tab -> 'Notifications' node -> 

    'Activity Notifications' and create a new activity notification with following details by clicking 'Create New' button: 
    1. Set 'Symbol' field as 'Custom Log Comment'. 
    2. Set 'Code' field as 'CLOG' 
    3. Select the check boxes for 'Activity Valid for' section: 
      'Requests/Incidents/Problems' 
      'Change Orders' 
      'Issues' 
    4. Click 'Save & Continue' button. 
    5. Save activity notification. Do not associate any 'Notification rule' or 'Message template' to the activity notification'. Keep it empty under 'Notification Rules' tab. 
  3. Next, go to the server where service desk server is installed.
  4. Go to the '$NX_ROOT\site' folder. Edit text_api.cfg file.
  5. Search for 'DEFAULT_LOG_CODE=LOG' string in text_api.cfg file.
  6. Add below line under 'DEFAULT_LOG_CODE=LOG' line in text_api.cfg file: CUSTOM_LOG_CODE=CLOG
  7. Next, navigate to '$NX_ROOT\bin' directory. Edit text_api.pl file.
  8. Search for this item:  

# Valid options from Config file:

    use vars qw($ALLOW_REQUEST_UPDATES $ALLOW_CHANGE_UPDATES $ALLOW_ISSUE_UPDATES);

    use vars qw($ALLOW_INCIDENT_UPDATES $ALLOW_PROBLEM_UPDATES);

    use vars qw($TAB_TO_SPACE $KEYWORD_PREFIX $INCOMING_DATE_FMT $DEFAULT_LOG_CODE);

    use vars qw($LINEFEEDS_ALLOWED $UPDATE_DESC_IS_LOG $VALID_TABLE_LIST $TNG_USE_TABLE);

 Alter it to become:

# Valid options from Config file:
    use vars qw($ALLOW_REQUEST_UPDATES $ALLOW_CHANGE_UPDATES $ALLOW_ISSUE_UPDATES);
    use vars qw($ALLOW_INCIDENT_UPDATES $ALLOW_PROBLEM_UPDATES);
    use vars qw($TAB_TO_SPACE $KEYWORD_PREFIX $INCOMING_DATE_FMT $DEFAULT_LOG_CODE $CUSTOM_LOG_CODE);
    use vars qw($LINEFEEDS_ALLOWED $UPDATE_DESC_IS_LOG $VALID_TABLE_LIST $TNG_USE_TABLE);

 

  1. Within the same file search for:
$LOG_CODE,    # This is the default Activity Notification code value

 
Alter it to become:
$CUSTOM_LOG_CODE,    # This is the default Activity Notification code value
  
  1. Recycle the Service Desk services.

 

Additional Information:  

 

Please be aware that migrating to a newer release of Service Desk Manager could revert the customization to the text_api.cfg and text_api.pl, and the customizations will need to be redone again.

Instructions:
Please Update This Required Field