getavalibleuserstoassign.js revision 601f63c54242cbfe25637728c498c5061af3c380
getUserById = function(userId) {
if (!user) {
}
return user;
}
getUserByName = function(userName) {
var params = {
"_queryId": "for-userName",
"uid": userName
};
}
if (!user) {
}
return user;
}
getDisplayableOf = function(user) {
} else {
}
}
throw "Required param: taskId";
}
if (!task) {
throw "Task Not Found";
}
var taskDefinitionQueryParams = {
"_queryId": "query-taskdefinition",
};
var usersToAdd = {};
var candidateUsers = [];
var candidateGroups = [];
}
}
var candidateGroup = candidateGroups[i];
var params = {
"_queryId": "get-users-of-role",
"role": candidateGroup
};
}
}
}
}
}
var candidateUser = candidateUsers[i];
}
var avalibleUsersToAssign = { users : []};
for (var userName in usersToAdd) {
if (user) {
avalibleUsersToAssign.users.push({_id: user._id, username: userName, displayableName: getDisplayableOf(user)});
}
}
if (user) {
avalibleUsersToAssign.assignee = {_id: user._id, username: assigneeUserName, displayableName: getDisplayableOf(user)};
}
}