Difference between revisions of "Group getTimeUsed"
Nguyenduyan (talk | contribs) |
Nguyenduyan (talk | contribs) |
||
Line 26: | Line 26: | ||
== Return type == | == Return type == | ||
Array. It's array of Analyze_Used_Time array with follow constant: | Array. It's array of Analyze_Used_Time array with follow constant: | ||
+ | |||
+ | {| class="tableintopic" style="border: 1px solid rgb(1, 1, 1); border-collapse: collapse" border="1" cellpadding="2" cellspacing="0" width="875" | ||
+ | |- align="left" valign="top" | ||
+ | | style="border: 1px solid rgb(1, 1, 1)" bgcolor="#c0c0c0" width="292" | | ||
+ | '''Index''' | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" bgcolor="#c0c0c0" width="92" | | ||
+ | '''Data type''' | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" bgcolor="#c0c0c0" width="491" | | ||
+ | '''Value''' | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="292" | | ||
+ | GROUP_RESOURCE_ID | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="92" | | ||
+ | <span class="normalise">number</span> | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="491" | | ||
+ | Resource id of the group | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="292" | | ||
+ | GROUP_NAME | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="92" | | ||
+ | <span class="normalise">string</span> | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="491" | | ||
+ | Name of the group | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="292" | | ||
+ | GROUP_TEMPLATE_RESOURCE_ID | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="92" | | ||
+ | <span class="normalise">number</span> | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="491" | | ||
+ | Group template's resource id | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="292" | | ||
+ | GROUP_PARENT_RESOURCE_ID | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="92" | | ||
+ | <span class="normalise">number</span> | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="491" | | ||
+ | Parent's resource id | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="292" | | ||
+ | GROUP_TIME_REGISTRATION | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="92" | | ||
+ | <span class="normalise">bool</span> | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="491" | | ||
+ | If time registration is allowed on the group | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="292" | | ||
+ | GROUP_MAN_HOURS | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="92" | | ||
+ | <span class="normalise">number</span> | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="491" | | ||
+ | The budget time for the group | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="292" | | ||
+ | GROUP_CALCULATED_MAN_HOURS | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="92" | | ||
+ | <span class="normalise">bool</span> | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="491" | | ||
+ | If the budget time is calculated based on time set in Team tab | ||
+ | |||
+ | |- align="left" valign="top" | ||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="292" | | ||
+ | GROUP_RULES | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="92" | | ||
+ | <span class="normalise">array</span> | ||
+ | |||
+ | | style="border: 1px solid rgb(1, 1, 1)" width="491" | | ||
+ | Group rules array | ||
+ | |||
+ | |} | ||
== Example == | == Example == |
Revision as of 09:15, 11 January 2018
Group_getTimeUsed
Get time used of on users on the group
Syntax
Group_getTimeUsed (groupRId, includeUnverifiedHour, timeFrom, timeTo, includeDeleted, includeDisabled);
Arguments
number groupRId
bool includeUnverifiedHour
dateTime array timeFrom
dataTime array timeTo
bool includeDeleted
bool includeDisabled
Return type
Array. It's array of Analyze_Used_Time array with follow constant:
Index |
Data type |
Value |
GROUP_RESOURCE_ID |
number |
Resource id of the group |
GROUP_NAME |
string |
Name of the group |
GROUP_TEMPLATE_RESOURCE_ID |
number |
Group template's resource id |
GROUP_PARENT_RESOURCE_ID |
number |
Parent's resource id |
GROUP_TIME_REGISTRATION |
bool |
If time registration is allowed on the group |
GROUP_MAN_HOURS |
number |
The budget time for the group |
GROUP_CALCULATED_MAN_HOURS |
bool |
If the budget time is calculated based on time set in Team tab |
GROUP_RULES |
array |
Group rules array |
Example
number groupRId = 15599634 ;
bool includeUnverifiedHour = true;
array timeFrom = DateTime_getByYMD(2017,1,1);
array timeTo = DateTime_getByYMD(2018,2,1);
bool includeDeleted = true;
bool includeDisabled = true;
array a = Group_getTimeUsed (groupRId, includeUnverifiedHour, timeFrom, timeTo, includeDeleted, includeDisabled);// {{32,10768810,{2017,9,27,0,0,0,0,39,65},1,15596351,60,1}, ....}
array timeUsage = a[0];//{32,10768810,{2017,9,27,0,0,0,0,39,65},1,15596351,60,1}
print(timeUsage[ANALYZE_USED_TIME_USER_RESOURCE_ID]);//10768810
print(timeUsage[ANALYZE_USED_TIME_DATE]);//{2017,9,27,0,0,0,0,39,65}
print(timeUsage[ANALYZE_USED_TIME_STATUS_ID]);//1
print(timeUsage[ANALYZE_USED_TIME_RESOURCE_ID]);//15596351
print(timeUsage[ANALYZE_USED_TIME_TOTAL_TIME]);//60
print(timeUsage[ANALYZE_USED_TIME_INTEGER_FORMAT]);//1