Skip to content

GetOwnerUsers

Returns an array of users to whom the work item is assigned.

1
myWorkItem.GetOwnerUsers(real: boolean):Array<Identity>

Parameters

boolean real
    Specifies whether to return real or simulated owners. Pass the value explicitly; omitted JavaScript arguments are treated as false by the current proxy.

Returns

An array of owner users.

Remarks

This method returns a dynamically calculated array of user-type identities. When the organization changes, such as when a user is added to or removed from a position, the return value also changes.

Examples

Collect the e-mail addresses of the assigned users

1
2
3
4
5
6
7
var addresses = $WorkItem.GetOwnerUsers(true)
    .filter(function (user) {
        return !!user.EMailAddress;
    })
    .map(function (user) {
        return user.EMailAddress;
    });

See Also