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

Add script item/webhook parameter name restriction to the documentation

XMLWordPrintable

    • Icon: Problem report Problem report
    • Resolution: Fixed
    • Icon: Major Major
    • 5.4 (plan)
    • 5.0.5, 5.2.1
    • Documentation (D)
    • None
    • Sprint 70 (Nov 2020)

      Steps to reproduce:

      1. Create script item type
      2. Set 'some-api-variable' parameter:
      request.AddHeader('x-api-key: '+params.some-api-parameter);
      

      Result:

      Cannot execute script: ReferenceError: identifier 'api' undefined
              at [anon] (duktape.c:81729) internal
              at [anon] (function:7) preventsyield
      

      Expected in documentation:

      The names of variables, called identifiers, conform to certain rules. A JavaScript identifier must start with a letter, underscore ( _ ), or dollar sign ( $ ). Subsequent characters can also be digits ( 0 – 9 ).

      https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Grammar_and_types

            martins-v Martins Valkovskis
            edgar.akhmetshin Edgar Akhmetshin
            Team D
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: