Difference between revisions of "Team addTeamMember"

From Catglobe Wiki
Jump to: navigation, search
(Blanked the page)
 
(4 intermediate revisions by the same user not shown)
Line 1: Line 1:
 +
[[Category:Team_Functions]]
 +
{{HelpFiles}}
  
 +
= Team_addTeamMember =
 +
 +
Add a member into a Team (On GUI, Team is under Team tab of resource)
 +
 +
== Syntax ==
 +
 +
Team_addTeamMember(team, teamMember);
 +
 +
== Arguments ==
 +
 +
team: is Team object. See [[Team_new]], [[Team_getTeamByResourceId]]
 +
 +
teamMember: is TeamMember Object. See [[TeamMember_new]]
 +
 +
== Return type ==
 +
empty
 +
 +
== Example ==
 +
 +
<source lang="javascript">
 +
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);
 +
 +
</source>
 +
 +
The team before add member
 +
[[File:Team3.png]]
 +
 +
 +
The team after add member
 +
[[File:Team5.png]]

Latest revision as of 07:38, 22 June 2017


Team_addTeamMember

Add a member into a Team (On GUI, Team is under Team tab of resource)

Syntax

Team_addTeamMember(team, teamMember);

Arguments

team: is Team object. See Team_new, Team_getTeamByResourceId

teamMember: is TeamMember Object. See TeamMember_new

Return type

empty

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);

The team before add member Team3.png


The team after add member Team5.png