YouTrack Standalone 2017.2 Help

Requirements

The `Requirements` object serves two purposes. First, it functions as a safety net. It specifies the set of entities that must exist for a rule to work as expected. Whenever one or more rule requirements are not met, corresponding errors are shown in the workflow administration UI. The rule is not executed until all of the problems are fixed. Second, it functions as a reference. Each entity in the requirements is plugged into the `context` object, so you can reference entities from inside your context-dependent functions (like an `action` function). There are two types of requirements: project-wide and system-wide. Project-wide requirements contain a list of custom fields that must be attached to each project that uses the rule as well as the required values from the sets of values for each custom field. System-wide requirements contain a list of other entities that must be available in YouTrack. This includes users, groups, projects, issues, tags, saved searches, and issue link types.

requirements: { P: { type: entities.EnumField.fieldType, name: 'Priority', M: { name: 'Major' }, Normal: {} }, ImportantPerson: { type: entities.User, login: 'superadmin' }, OurTeam: { type: entities.UserGroup, name: 'integration-team' }, Int: { type: entities.Project, name: 'Integration' }, Ref: { type: entities.Issue, id: 'INT-483' }, ToBeReleased: { type: entities.IssueTag, name: 'To be released' }, Untested: { type: entities.SavedQuery, name: 'Not tested yet' }, Depend: { type: entities.IssueLinkPrototype, outward: 'is required for', inward: 'depends on' } }

Last modified: 7 March 2019