YouTrack Server
 
2019.2
Get YouTrack Standalone
You are viewing the documentation for an earlier version of YouTrack Server. View this page in the current documentation

Custom Scripts

Last modified: 17 December 2019

Custom scripts let you organize and reuse blocks of code. They don't contain any specific type of rule. Instead, they contain code that can be used in other scripts.

In any script, you can define whichever objects and functions you want to use in other scripts by assigning them as properties of the exports object.

Here's an example.

First, we'll create a custom script that defines a simple function.

Now you have a math object that contains the properties that you defined for the exports object. This means that you can access this function as math.f.

Next, we'll write an action rule that references this function.