Difference between revisions of "TeamMember new"
Nguyenduyan (talk | contribs) (→TeamMember_new) (Tag: visualeditor) |
Nguyenduyan (talk | contribs) |
||
Line 37: | Line 37: | ||
</source> | </source> | ||
+ | |||
+ | The team before add member | ||
+ | [[File:Team3.png]] | ||
+ | |||
+ | |||
+ | The team after add member | ||
+ | [[File:Team5.png]] |
Revision as of 07:37, 22 June 2017
TeamMember_new
Create a new team member (On GUI, Team is under Team tab of resource)
Need Team_addTeamMember to add the new TeamMember to a Team
Syntax
TeamMember_new(roleId, teamMemberRId, Manhours);
Arguments
number roleId: Id of Role (on GUI, you can find role at Administration/HR/Roles)
number teamMemberRId: UserRId
number Manhours: unit is minute
Return type
array of TeamMember object
Example
number projectRId = 15562383;
number teamTypeId = 1;
number groupRId = 15567436;
array team = Team_getTeamByResourceId (projectRId, teamTypeId, groupRId);
number roleId = 2;
number teamMemberRId = 15567438;
number Manhours = 30;
array teamMember = TeamMember_new(roleId,teamMemberRId, Manhours);
Team_addTeamMember(team, teamMember);
Team_save(team);