-
Problem report
-
Resolution: Fixed
-
Trivial
-
5.0.19rc1, 5.4.9rc1, 6.0.0beta1
-
Sprint 83 (Dec 2021), Sprint 84 (Jan 2022), Sprint 85 (Feb 2022), Sprint 86 (Mar 2022), Sprint 87 (Apr 2022)
-
1
User mactros are not detected and not resolved by "Test item" dialog if they are used in the calculated item formula.
Steps to reproduce:
- Create a host with a numeric item (for example with agent.ping key)
- Create the following user macro for this host: {$H} => 5h
- Create a Calculated item for this host with the following formula:
avg(agent.ping,{$H})
- Click on "Test" button - notice that no macros are detected in this dialog
- In the opened overlay dialog click on "Get value and test" button
Result: macro is not resolved and the following error is displayed:
Cannot evaluate expression: "Cannot evaluate function "avg({$H})": invalid first parameter.".
Expected: Macros should be detected and an option to localy update its value should be present (the value should also be retrieved). The dialog should return the average value of key agent.ping over the last 5 hours