diff --git a/include/zbxserver.h b/include/zbxserver.h
index 1679b4a..d80f343 100644
--- a/include/zbxserver.h
+++ b/include/zbxserver.h
@@ -33,6 +33,7 @@
 #define MACRO_TYPE_MESSAGE             0x0006  /* (MACRO_TYPE_MESSAGE_SUBJECT | MACRO_TYPE_MESSAGE_BODY) */
 #define MACRO_TYPE_TRIGGER_EXPRESSION  0x0008
 #define MACRO_TYPE_TRIGGER_URL         0x0010
+#define MACRO_TYPE_TRIGGER_COMMENT     0x8000
 #define MACRO_TYPE_ITEM_KEY            0x0020
 #define MACRO_TYPE_INTERFACE_ADDR      0x0040
 #define MACRO_TYPE_INTERFACE_ADDR_DB   0x0080
@@ -44,6 +45,7 @@
 #define MACRO_TYPE_LLD_LIFETIME                0x2000
 #define MACRO_TYPE_SNMP_OID            0x4000

+
 #define STR_CONTAINS_MACROS(str)       (NULL != strchr(str, '{'))

 int    evaluate_function(char *value, DB_ITEM *item, const char *function, const char *parameters, time_t now);
diff --git a/src/libs/zbxserver/expression.c b/src/libs/zbxserver/expression.c
index 034249c..134a63e 100644
--- a/src/libs/zbxserver/expression.c
+++ b/src/libs/zbxserver/expression.c
@@ -2234,7 +2234,12 @@ int      substitute_simple_macros(DB_EVENT *event, zbx_uint64_t *hostid, DC_HOST *dc_
                                else if (0 == strcmp(m, MVAR_TRIGGER_COMMENT))
                                {
                                        if (0 != event->trigger.triggerid)
+                                       {
                                                replace_to = zbx_strdup(replace_to, event->trigger.comments);
+                                               substitute_simple_macros(event, hostid, dc_host, dc_item, escalation,
+                                                               &replace_to, MACRO_TYPE_TRIGGER_COMMENT,
+                                                               error, maxerrlen);
+                                       }
                                        else
                                                ret = FAIL;
                                }
@@ -2649,6 +2654,40 @@ int      substitute_simple_macros(DB_EVENT *event, zbx_uint64_t *hostid, DC_HOST *dc_
                                ret = DBget_interface_value(dc_host->hostid, &replace_to, ZBX_REQUEST_HOST_CONN, 0);
                }

+               else if (macro_type & MACRO_TYPE_TRIGGER_COMMENT)
+               {
+
+                       if (0 == strncmp(m, "{$", 2))   /* user defined macros */
+                               DBget_macro_value_by_triggerid(event->objectid, m, &replace_to);
+                       else if (0 == strcmp(m, MVAR_HOST_HOST) || 0 == strcmp(m, MVAR_HOSTNAME))
+                               ret = DBget_trigger_value(&event->trigger, &replace_to, N_functionid,
+                                               ZBX_REQUEST_HOST_HOST);
+                       else if (0 == strcmp(m, MVAR_HOST_NAME))
+                               ret = DBget_trigger_value(&event->trigger, &replace_to, N_functionid,
+                                               ZBX_REQUEST_HOST_NAME);
+                       else if (0 == strcmp(m, MVAR_HOST_IP) || 0 == strcmp(m, MVAR_IPADDRESS))
+                               ret = DBget_trigger_value(&event->trigger, &replace_to, N_functionid,
+                                               ZBX_REQUEST_HOST_IPADDRESS);
+                       else if (0 == strcmp(m, MVAR_HOST_DNS))
+                               ret = DBget_trigger_value(&event->trigger, &replace_to, N_functionid,
+                                               ZBX_REQUEST_HOST_DNS);
+                       else if (0 == strcmp(m, MVAR_HOST_CONN))
+                               ret = DBget_trigger_value(&event->trigger, &replace_to, N_functionid,
+                                               ZBX_REQUEST_HOST_CONN);
+                       else if (0 == strcmp(m, MVAR_ITEM_LASTVALUE))
+                               ret = DBget_item_lastvalue(&event->trigger, &replace_to, N_functionid);
+                       else if (0 == strcmp(m, MVAR_ITEM_VALUE))
+                               ret = DBget_item_value(&event->trigger, &replace_to, N_functionid,
+                                               event->clock, event->ns);
+                       else
+                       {
+                               *br = c;
+                               get_trigger_function_value(&event->trigger, &replace_to, bl, &br);
+                               c = *br;
+                               *br = '\0';
+                       }
+               }
+
                if (FAIL == ret)
                {
                        zabbix_log(LOG_LEVEL_DEBUG, "cannot resolve macro '%s'", bl);
