This section covers specific use cases in workflow editor, which are either separate constructions or procedures, not complete rules:
Sometimes a use case requires automatic creation of a new issue while executing workflow. Creating of a new issue is applied on behalf of currently logged in user (use loggedInUser method).
To create an issue, you should use loggedInUser.createNewIssue("projectID") method. When applied, this method will create an issue with default (or empty) values set for each field (configured in a project). To be able to create an issue with specific values for fields, you can use variable declaration (see the sample below).
The following sample code shows creating a new issue in the project with 'RM' projectId, specifying needed fields values, and adding for the current issue a 'depends on' link to the issue to be created:
Bundles of values downloaded from YouTrack usually differ in different projects. When editing a rule, such values, which are used not in all available projects, will be underscored and a tooltip will be shown for them pointing in which projects a value is not used.
In this case, you can opt to add the value to any project, where the value is currently not used.
To add a value to all available bundles: