Script item: TEST does not work when using MACRO in parameters

XMLWordPrintable

    • Type: Problem report
    • Resolution: Duplicate
    • Priority: Major
    • None
    • Affects Version/s: 7.0.0alpha7
    • Component/s: Frontend (F)
    • None
    • Support backlog

      Similar problem as ZBX-21818{}

      Steps to reproduce:

      1. create host macro
      2. create Script item
      3. add param with value from example host macro
      4. add basic script (whatever you want)
        • var param=JSON.parse(value);
          return JSON.stringify(param);
      5. apply
      6. test
      7. get value and test
      8. return error
        • Cannot execute script: SyntaxError: invalid json (at offset 1) at [anon] (duktape.c:37568) internal at parse () native strict preventsyield at [anon] (function:1) preventsyield

      bug_script_item.mp4

      Result:
      The problem seems to be in passing the macro to the test script. When I save the item and press execute now, zabbix returns the correct value in latest data.

            Assignee:
            Zabbix Development Team
            Reporter:
            Marek Rysavy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: