Toggle menu
862
3.8K
30.2K
279.1K
Catglobe Wiki
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Group getTimeUsed: Difference between revisions

From Catglobe Wiki
Nguyenduyan (talk | contribs)
No edit summary
Nguyenduyan (talk | contribs)
No edit summary
 
(One intermediate revision by the same user not shown)
Line 4: Line 4:
= Group_getTimeUsed =
= Group_getTimeUsed =


Get time used of on users on the group
Get time used of all users on the group


== Syntax ==
== Syntax ==
Line 27: Line 27:
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"
{| class="tableintopic" style="border: 1px solid rgb(1, 1, 1);  border-collapse: collapse" width="875" cellspacing="0" cellpadding="2" border="1"
|- align="left" valign="top"
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1)" bgcolor="#c0c0c0" width="292" |  
| style="border: 1px solid rgb(1, 1, 1)" width="292" bgcolor="#c0c0c0" |  
'''Index'''
'''Index'''


| style="border: 1px solid rgb(1, 1, 1)" bgcolor="#c0c0c0" width="92" |  
| style="border: 1px solid rgb(1, 1, 1)" width="92" bgcolor="#c0c0c0" |  
'''Data type'''
'''Data type'''


| style="border: 1px solid rgb(1, 1, 1)" bgcolor="#c0c0c0" width="491" |  
| style="border: 1px solid rgb(1, 1, 1)" width="491" bgcolor="#c0c0c0" |  
'''Value'''
'''Value'''


|- align="left" valign="top"
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
GROUP_RESOURCE_ID
ANALYZE_USED_TIME_USER_RESOURCE_ID


| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
Line 46: Line 46:


| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
Resource id of the group
User resource id


|- align="left" valign="top"
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
GROUP_NAME
ANALYZE_USED_TIME_DATE


| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
<span class="normalise">string</span>
<span class="normalise">array dateTime</span>


| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
Name of the group
date register time


|- align="left" valign="top"
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
GROUP_TEMPLATE_RESOURCE_ID
ANALYZE_USED_TIME_STATUS_ID


| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
Line 66: Line 66:


| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
Group template's resource id
time registered status


|- align="left" valign="top"
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
GROUP_PARENT_RESOURCE_ID
ANALYZE_USED_TIME_RESOURCE_ID


| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
Line 76: Line 76:


| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
Parent's resource id
resource id of resource which the user registered on


|- align="left" valign="top"
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
GROUP_TIME_REGISTRATION
ANALYZE_USED_TIME_TOTAL_TIME


| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
<span class="normalise">bool</span>
<span class="normalise">number</span>


| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
If time registration is allowed on the group
time registered by minutes


|- align="left" valign="top"
|- valign="top" align="left"
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
| style="border: 1px solid rgb(1, 1, 1)" width="292" |  
GROUP_MAN_HOURS
ANALYZE_USED_TIME_INTEGER_FORMAT


| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
| style="border: 1px solid rgb(1, 1, 1)" width="92" |  
Line 96: Line 96:


| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
| style="border: 1px solid rgb(1, 1, 1)" width="491" |  
The budget time for the group
time registered by hours
 
|- 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


|}
|}

Latest revision as of 08:24, 11 January 2018


Group_getTimeUsed

Get time used of all 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

ANALYZE_USED_TIME_USER_RESOURCE_ID

number

User resource id

ANALYZE_USED_TIME_DATE

array dateTime

date register time

ANALYZE_USED_TIME_STATUS_ID

number

time registered status

ANALYZE_USED_TIME_RESOURCE_ID

number

resource id of resource which the user registered on

ANALYZE_USED_TIME_TOTAL_TIME

number

time registered by minutes

ANALYZE_USED_TIME_INTEGER_FORMAT

number

time registered by hours

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