Won't Fix Build
This workflow automatically sets the value of the Fixed in build field when the state changes to Won't fix.
Name | @jetbrains/youtrack-workflow-wont-fix-build |
---|---|
Auto-attached | no |
Modules | Set fixed in build to "Never" when state changes to "Won't fix" (on-change rule) |
Use Case
This workflow helps you prevent users from entering a value for Fixed in build for an issue that will never be fixed.
Modules
When the state of an issue is changed to Won't fix, this rule sets the value of the Fixed in build field to Never.
Set fixed in build to "Never" when state changes to "Won't fix"
var entities = require('@jetbrains/youtrack-scripting-api/entities');
var workflow = require('@jetbrains/youtrack-scripting-api/workflow');
exports.rule = entities.Issue.onChange({
title: workflow.i18n('Set fixed in build to "Never" when state changes to "Won\'t fix"'),
guard: function(ctx) {
return ctx.issue.fields.becomes(ctx.State, ctx.State.WontFix);
},
action: function(ctx) {
ctx.issue.fields.FixedInBuild = ctx.FixedInBuild.Never;
},
requirements: {
State: {
type: entities.State.fieldType,
WontFix: {
name: 'Won\'t fix'
}
},
FixedInBuild: {
type: entities.Build.fieldType,
name: 'Fixed in build',
Never: {}
}
}
});
Last modified: 30 March 2021