[ZBX-10051] Positional macros ($1-$9) in trigger name don't expand user macro in trigger expressions Created: 2015 Nov 06  Updated: 2017 May 30  Resolved: 2016 Jan 15

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Frontend (F)
Affects Version/s: 2.2.11rc1, 2.4.7rc1, 3.0.0alpha3
Fix Version/s: 3.0.0beta1

Type: Incident report Priority: Major
Reporter: Alexander Vladishev Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: triggers, usermacros
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Positional macros $1-$9 in trigger name can be used to refer to constant of trigger expression.
It works if the constant is fixed value, but it doesn't work with user defined macro in trigger expressions.



 Comments   
Comment by Gunars Pujats (Inactive) [ 2015 Nov 17 ]

(1) No translation strings changed.

sasha CLOSED

Comment by Gunars Pujats (Inactive) [ 2015 Nov 17 ]

RESOLVED in development branch svn://svn.zabbix.com/branches/dev/ZBX-10051

Comment by Alexander Vladishev [ 2015 Nov 19 ]

(2) Macros can be resolved recursively.

  • create host host with Visible name {$M}
  • create user macro {$M} with value abc
  • create trigger with name trigger {$M} {HOST.NAME}
  • trigger name must be resolved into trigger abc {$M} instead of trigger abc abc

gunarspujats RESOLVED in r56808

sasha CMacrosResolve::resolveTriggerNames() method shouldn't change "expression" field in the result.

REOPENED

gunarspujats RESOLVED in r57346

sasha CLOSED

Comment by Gunars Pujats (Inactive) [ 2016 Jan 15 ]

Fixed in:

  • pre-3.0.0beta1 (trunk) r57674
Comment by Oleksii Zagorskyi [ 2016 Mar 05 ]

related, server side fix is ZBX-9643

Comment by Oleksii Zagorskyi [ 2016 Mar 05 ]

Not sure it's ok that the ZBX-9643 has been fixed for many versions, but this one only for 3.0

Generated at Sat Apr 27 04:05:57 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.