YouTrack InCloud 2017.2 Help

Entities

Workflow module Entities from package @jetbrains/youtrack-scripting-api

Entities module.

Module types

Module functions

 

actionFunction

actionFunction(ctx, ctx.issue, ctx.currentUser)

This function is called on certain events, depending on rule type:when issue is changed (on-change rules), when command is executed (action rules),or according to schedule (scheduled rules). This function is called separatelyfor each related issue.

action: function(ctx) { console.log('Action for issue ' + ctx.issue.id); }

Parameters:

NameTypeDescription
ctx Object execution context. Along with the params mentioned below,the context also contains objects that you describe in Requirements .
ctx.issue Issue current issue.
ctx.currentUser User a user by which this rule is executed.

 

guardFunction

guardFunction(ctx, ctx.issue, ctx.currentUser)

This function is called to check if an action rule is applicable to an issue.

guard: function(ctx) { return ctx.issue.State.isResolved; }

Parameters:

NameTypeDescription
ctx Object execution context. Along with the params mentioned below,the context also contains objects that you describe in Requirements .
ctx.issue Issue current issue.
ctx.currentUser User a user by which this rule is executed.

 

Last modified: 9 August 2017