YouTrack Standalone 2017.2 Help

Workflow

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

Module containing utility functions.

Module functions

 

check

static check(condition, message)

Checks if the passed object is `true`, throws an error otherwise.The error contains the message passed. The message is then shown to a user.

workflow.check(issue.fields.Assignee && ctx.currentUser.login === issue.fields.Assignee.login, 'Only Assignee can mark issue as Fixed.');

Parameters:

NameTypeDescription
condition boolean condition to check.
message string error message that is shown to the user in case the condition is false.

 

i18n

static i18n(messageId)

Returns a localized version of a message.WARNING: for internal use only! This method is not intended to be used in custom workflows.

Parameters:

NameTypeDescription
messageId string message id.

Returns:

TypeDescription
Object object containing a representation of the message. toString method of the object returnsthe message with parameters filled.

 

message

static message(messageText)

Displays a message on UI page.

Parameters:

NameTypeDescription
messageText string message text.

 

Last modified: 9 August 2017