[ZBX-12623] Valid macros are not resolved if text contains invalid macros at the beginning. Created: 2017 Aug 29  Updated: 2024 Apr 10  Resolved: 2017 Sep 07

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Frontend (F)
Affects Version/s: 3.0.11rc1, 3.2.8rc1, 4.0.0alpha1
Fix Version/s: 3.0.11rc1, 3.2.8rc1, 3.4.2rc1, 4.0.0alpha1, 4.0 (plan)

Type: Problem report Priority: Trivial
Reporter: Miks Kronkalns Assignee: Vjaceslavs Bogdanovs
Resolution: Fixed Votes: 0
Labels: macros, map
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Team: Team C
Team: Team C
Sprint: Sprint 15, Sprint 16
Story Points: 0.5

 Description   

If text or label contains syntax error, it sometimes breaks the resolution of macros in text/label. For example, if text is {h1:} {h1:trap.last()}, the valid macros is not resolved. If the sequence is opposite {h1:trap.last()} {h1:}, the result is correct . Putting the erroneous macros between two valid macros {h1:trap.last()} {h1:} {h1:trap.last()} also makes no problem.

Steps to reproduce:
1) create a map, add to icons and link them together.
2) type a text "{h1:} {h1:trap.last()}" in the label field (replace host name and item to your own).
3) Observe that the valid macros is not resolved (make sure that "Expand macros" is enabled).

Expected: Valid macros should be resolved, invalid macros must be considered as a simple text.

Observed it in 2.4 and 3.4. Most likely all versions between them are affected.


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