YouTrack Standalone 2017.1 Help

UserGroups

Properties

The following properties of a group can be accessed with a workflow. These properties are read-only. See also Group-related Methods.

PropertyDescription
name: stringThe name of a group.
description: stringThe description of a group. Returns a null value if a description has not been set for the group.
addNewUser: BooleanTrue if new users are added to this group automatically.
allUsersGroup: BooleanTrue if this is the All Users group.

Methods

The following methods are available for use with groups.

getUsers(): sequence<User>
DescriptionReturns all of the users who are members of the specified group.
Example
var users = Assignees group.getUsers();
notifyAllUsers(subject: string, body: string)
ParameterssubjectThe subject line of the email notification.
bodyThe message text of the email notification.
DescriptionSends an email notification to all of the users who are members of the group.
Example
permittedGroup.oldValue.notifyAllUsers("Visibility has been changed", "The visibility group for the issue " + "<a href=\"" + issue.getUrl() + "\">" + issue.getId() + "</a> has been changed to " + permittedGroup.name);

Operations

The following operations are available for groups.

becomes(value: [field]): Boolean
ParametersvalueThe value to check for the specified field.
DescriptionChecks whether a specific value is set for a custom field in the current transaction.
Example
when State == {Verified} && !State.becomes({Verified}) { assert comments.added.isEmpty: l10n ( Commenting for fixed and verified issues is disabled. ); }
canBeReadBy(user: user): Boolean
ParametersuserThe user for whom the permission to read the field is checked.
DescriptionChecks whether a specific user has permission to read the custom field.
canBeWrittenBy(user: user): Boolean
ParametersuserThe user for whom the permission to update the field is checked.
DescriptionChecks whether a specific user has permission to update the custom field.
Example
when duplicates.added.isNotEmpty && State != {Duplicate} { if (State.canBeWrittenBy(loggedInUser)) { State = {Duplicate}; } }
changed(): Boolean
DescriptionChecks whether a the value of the custom field is changed in the current transaction.
Example
oldValue(): [field type]
DescriptionReturns the previous value of the specified custom field before an update was applied.
Example
when State == {Verified} && !State.becomes({Verified}) { assert comments.added.isEmpty: l10n ( Commenting for fixed and verified issues is disabled. ); }
required(message: string)
ParametersmessageThe message that is displayed to the user that describes the field requirement.
DescriptionAsserts that a value is set for a custom field. Can also be used for link types. If a value for the required field is not set, the field is highlighted in the issue and the specified message is displayed.
Example
state Approved { enter { Assignee.required("Please select an assignee"); }
Last modified: 18 April 2017