Developer Portal for YouTrack and Hub 2021.3 Help

Issue Property Combinations

This workflow blocks users from setting specific combinations of values for fields in an issue. You can customize this workflow to prevent any combination of values you want to avoid.



Previous Title

Issue Properties Combinations




Block incompatible value combinations for custom fields (on-change rule)

Use Case

This workflow helps to make sure that users do not create combinations of priorities and states that you want to avoid in your project.


This on-change rule checks the combination of Priority and State when an issue is created or updated. The following combinations are blocked:

  • Submitted and Show-stopper

  • Open and Unassigned

Block incompatible value combinations for custom fields

const entities = require('@jetbrains/youtrack-scripting-api/entities'); const workflow = require('@jetbrains/youtrack-scripting-api/workflow'); exports.rule = entities.Issue.onChange({ title: 'Block incompatible value combinations for custom fields', action: (ctx) => { const issueFields = ctx.issue.fields; workflow.check(!(, ctx.Priority.ShowStopper) &&, ctx.State.Submitted)), workflow.i18n('Denied fields combination detected (Submitted Show-stopper)')); workflow.check(!(!issueFields.Assignee &&, ctx.State.Open)), workflow.i18n('Denied fields combination detected (Open Unassigned)')); }, requirements: { Priority: { type: entities.EnumField.fieldType, ShowStopper: { name: 'Show-stopper' } }, State: { type: entities.State.fieldType, Submitted: {}, Open: {} }, Assignee: { type: entities.User.fieldType } } });
Last modified: 14 September 2021