Uploaded image for project: 'Runtime'
  1. Runtime
  2. RUNTIME-4299

[ScriptEditor] Misleading doc and warning when using script parameters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 4.9.7, 4.10.0
    • 4.9.6, 4.10.0
    • None
    • None
    • 4.10 M5

      Following parametrized scripts example leads to issues and doing it the right way is triggering a visual error when it should not.

      The example :

      /*$
       * @param {String} myFirstParam="default value" The first parameter
       * It is a mandatory parameter with a default value
       * @param {Long;minValue:3;maxValue:10} [otherParam=3] An other parameter
       * This number is optionnal and have a default value
       * @param {String;widget:edition.userpopulation} pop Population
       */
      let myFirstParam:string, otherParam:number, pop:string; // facultative declaration of the parameters for the script

       

      The problems :

      The declaration of the parameters overrides the value retrieved in the dialog box. In this example, all parameters declared are going to be "undefined".

      Removing the declaration works, the script can be executed successfully, but an error is displayed, which is misleading:

            raphael Raphaël Franchet
            tcorre Thalya Corré
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: