Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-26251

JS preprocessing macro resolving failure

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • 7.0.11, 7.2.5, 7.4.0alpha1
    • Proxy (P), Server (S)
    • Support backlog

      Steps to reproduce:

      1. Add several macros at any level (host/template/global..)
      2. Create JS preprocessing that uses existing macros and at least one non-existing macro.
      3. Define a variable with a non-existent macro not last in the variable list.
      var test1 = '{$TEST1}';
      var test2 = '{$TEST2}';
      var test3 = '{$TEST3}';
      return test1+' '+test2+' '+test3; 
      var test1 = '{$TEST1}';
      var test3 = '{$TEST3}';
      var test2 = '{$TEST2}';
      return test1+' '+test2+' '+test3; 

      Result:
      If some macro can't be resolved other macros after it will not be resolved.

      Expected:
      JavaScript preprocessing step must resolve all macros, regardless of where they are defined in the script.

      Test_JS_preprocessing_macros.yaml host added.

            zabbix.dev Zabbix Development Team
            yuriip Yurii Polenok
            Votes:
            3 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: