Skip to content

Instantly share code, notes, and snippets.

@sethiele
Last active July 6, 2018 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save sethiele/1c2f6cc9cf0b4ef073405464a5c0287b to your computer and use it in GitHub Desktop.
Save sethiele/1c2f6cc9cf0b4ef073405464a5c0287b to your computer and use it in GitHub Desktop.
YouTrack Workflows
var entities = require('@jetbrains/youtrack-scripting-api/entities');
var workflow = require('@jetbrains/youtrack-scripting-api/workflow');
exports.rule = entities.Issue.onChange({
title: workflow.i18n('Remove Assignee on move'),
guard: function(ctx) {
var issue = ctx.issue;
return issue.fields.isChanged(ctx.Stage);
},
action: function(ctx) {
var issue = ctx.issue;
issue.fields.Assignees = [];
},
requirements: {
Stage: {
type: entities.State.fieldType
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment