YouTrack Standalone 2017.1 Help

Guidelines for Creating Issues and Adding Values to Sets

This section covers specific use cases in workflow editor, which are either separate constructions or procedures, not complete rules:

Create a New Issue from the Workflow Editor

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:

var i = loggedInUser.createNewIssue("RM"); i.Assignee = Marketing; i.Due Date = Due Date - 1 month; i.summary = "Write text for mailing list"; i.Version = Version; i.Product = Product; depends on.add(i);

Add a Value to a Set

Sets of values for issue fields in YouTrack usually differ in different projects. When you edit a rule that specifies a value for a field, the value is underscored when it is not available in all of the projects that use the field. A tooltip shows which projects do not contain the value.

You can add the value to any of these projects in the workflow editor.

To add a value to all available sets of values:

  1. Move the pointer over the value.
  2. Click the notification bulb or press Alt + Enter to open the context menu.
  3. Click the command in the context menu and confirm the action.

Last modified: 18 April 2017