[Includes] Scripting - Command Palette
Like many modern IDEs, the Javascript editor for JMWE Cloud includes a command palette where you can access features and shortcuts common to programming tools. This includes adding cursors, line comments, find and replace, and numerous other editing shortcuts. More importantly, the command palette includes the Lookup Variable command, which lets you quickly look up Jira fields you may want to use in your scripts, including work item fields, user fields, and sprint fields. See below for more information.
To access the command palette, press F1 while working inside the editor; simply start typing the name of the function or shortcut to search. Hit Enter to accept your selection.
Note: The command palette is designed to be used entirely from the keyboard - no need to use your mouse!
Using Lookup Variables
The Lookup Variable (JMWE) command is a powerful tool for referencing Jira fields in your Javascript templates. Using the command, you can search for specific Jira fields for work items, users, and sprints and insert them directly into your scripts with just a few keystrokes!
To use a Lookup Variable, press F1 and start typing Lookup Variable; the command palette will surface the function. Hit Enter to select it, then use the arrow keys to select the type of the variable for which you want to search. Once a type is selected, you can search for the variable by typing its name or label, and then select it from the list of results. Lastly, for some variables, you may need to select whether to insert the ID or the Name.
The variable will be inserted into your script at the location of the cursor or cursors.