Last active
July 6, 2018 08:16
-
-
Save sethiele/1c2f6cc9cf0b4ef073405464a5c0287b to your computer and use it in GitHub Desktop.
YouTrack Workflows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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