Difference between revisions of "Task new"
Nguyenduyan (talk | contribs) |
Nguyenduyan (talk | contribs) (Tag: visualeditor) |
||
Line 21: | Line 21: | ||
{| class="tableintopic" style="border-collapse: collapse" width="1067" cellpadding="2" | {| class="tableintopic" style="border-collapse: collapse" width="1067" cellpadding="2" | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" bgcolor="#C0C0C0" | | | style="border: 1px solid #010101" width="356" bgcolor="#C0C0C0" | | ||
'''Index''' | '''Index''' | ||
Line 31: | Line 31: | ||
'''Initial Value''' | '''Initial Value''' | ||
− | |- | + | |- style="border: 1px solid #010101" valign="top" align="left" |
| width="356" | | | width="356" | | ||
TASK_RESOURCE_ID | TASK_RESOURCE_ID | ||
− | | | + | | style="border: 1px solid #010101" width="356" | |
number | number | ||
− | | | + | | style="border: 1px solid #010101" width="356" | |
0 | 0 | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_CASE_NUMBER | TASK_CASE_NUMBER | ||
Line 51: | Line 51: | ||
0 | 0 | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_NAME | TASK_NAME | ||
Line 61: | Line 61: | ||
Entered value | Entered value | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_PARENT_RESOURCE_ID | TASK_PARENT_RESOURCE_ID | ||
Line 71: | Line 71: | ||
Entered value | Entered value | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_TEMPLATE_RESOURCE_ID | TASK_TEMPLATE_RESOURCE_ID | ||
Line 81: | Line 81: | ||
Entered value (default if it is not specified) | Entered value (default if it is not specified) | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_TIME_REGISTRATION | TASK_TIME_REGISTRATION | ||
Line 91: | Line 91: | ||
TRUE | TRUE | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_COMPLETED | TASK_COMPLETED | ||
Line 101: | Line 101: | ||
FALSE | FALSE | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_TESTCASE_RESOURCE_ID | TASK_TESTCASE_RESOURCE_ID | ||
Line 111: | Line 111: | ||
0 (Always = 0 if test case is not required) | 0 (Always = 0 if test case is not required) | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_RESPONSIBLE_RESOURCE_ID | TASK_RESPONSIBLE_RESOURCE_ID | ||
Line 121: | Line 121: | ||
0 | 0 | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_SUPERVISOR_RESOURCE_ID | TASK_SUPERVISOR_RESOURCE_ID | ||
Line 131: | Line 131: | ||
0 | 0 | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_OBSERVER | TASK_OBSERVER | ||
Line 141: | Line 141: | ||
(Explanation *) | (Explanation *) | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_OBSERVER_INHERIT_ACCESS | TASK_OBSERVER_INHERIT_ACCESS | ||
Line 151: | Line 151: | ||
FALSE | FALSE | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_STATUS | TASK_STATUS | ||
Line 161: | Line 161: | ||
(Explanation **) <br> | (Explanation **) <br> | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_ACCEPTANCE_DEADLINE | TASK_ACCEPTANCE_DEADLINE | ||
Line 170: | Line 170: | ||
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_COMPLETION_DEADLINE | TASK_COMPLETION_DEADLINE | ||
Line 179: | Line 179: | ||
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_APPROVAL_DEADLINE | TASK_APPROVAL_DEADLINE | ||
Line 188: | Line 188: | ||
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_ACTUAL_START_DATE | TASK_ACTUAL_START_DATE | ||
Line 197: | Line 197: | ||
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_ACTUAL_END_DATE | TASK_ACTUAL_END_DATE | ||
Line 206: | Line 206: | ||
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
− | |- | + | |- valign="top" align="left" |
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
TASK_APPROVED_DATE | TASK_APPROVED_DATE | ||
Line 214: | Line 214: | ||
| style="border: 1px solid #010101" width="356" | | | style="border: 1px solid #010101" width="356" | | ||
− | + | |- | |
+ | |TASK_MAN_HOURS | ||
+ | |number | ||
+ | | | ||
+ | |- | ||
+ | |TASK_DESCRIPTION | ||
+ | |string | ||
+ | | | ||
+ | |- | ||
+ | | | ||
+ | |number | ||
+ | | | ||
+ | |- | ||
+ | |TASK_CREATED_DATE | ||
+ | |array DateTime | ||
+ | | | ||
+ | |- | ||
+ | |TASK_MODIFIED_DATE | ||
+ | |array DateTime | ||
+ | | | ||
+ | |- | ||
+ | |TASK_RESPONSIBLE_NAME | ||
+ | |string | ||
+ | | | ||
+ | |- | ||
+ | |TASK_SUPERVISOR_NAME | ||
+ | |string | ||
+ | | | ||
+ | |- | ||
+ | |TASK_CURRENT_USER_IS_RESPONSIBLE | ||
+ | |bool | ||
+ | | | ||
+ | |- | ||
+ | |TASK_CURRENT_USER_IS_SUPERVISOR | ||
+ | |bool | ||
+ | | | ||
|} | |} | ||
Line 225: | Line 260: | ||
List of user or group which is observer of this task { {observer's resource id, control access},...} | List of user or group which is observer of this task { {observer's resource id, control access},...} | ||
− | Ex: {{1,"RESOURCE_ACCESS_OBSERVER"},{2,"RESOURCE_ACCESS_MANAGER"}} | + | Ex: <nowiki>{{1,"RESOURCE_ACCESS_OBSERVER"},{2,"RESOURCE_ACCESS_MANAGER"}}</nowiki> |
In which, control access constants are: | In which, control access constants are: | ||
Line 241: | Line 276: | ||
Constants: | Constants: | ||
− | + | {| class="tableintopic" style="border-collapse:collapse; border:1px solid #010101" width="444" cellspacing="0" cellpadding="2" border="1" | |
− | + | |- valign="top" align="left" | |
− | {| | + | | style="border:1px solid #010101;" width="120" bgcolor="#C0C0C0" | |
− | |||
− | | | ||
'''Index''' | '''Index''' | ||
− | | width="324" bgcolor="#C0C0C0 | + | | style="border:1px solid #010101;" width="324" bgcolor="#C0C0C0" | |
'''Constant name''' | '''Constant name''' | ||
− | |- | + | |- valign="top" align="left" |
− | | | + | | style="border:1px solid #010101;" width="120" | |
0 | 0 | ||
− | | | + | | style="border:1px solid #010101;" width="324" | |
TASK_STATUS_NEEDACCEPTANCE | TASK_STATUS_NEEDACCEPTANCE | ||
− | |- | + | |- valign="top" align="left" |
− | | | + | | style="border:1px solid #010101;" width="120" | |
1 | 1 | ||
− | | | + | | style="border:1px solid #010101;" width="324" | |
TASK_STATUS_INPROGRESS | TASK_STATUS_INPROGRESS | ||
− | |- | + | |- valign="top" align="left" |
− | | | + | | style="border:1px solid #010101;" width="120" | |
2 | 2 | ||
− | | | + | | style="border:1px solid #010101;" width="324" | |
TASK_STATUS_APPROVED | TASK_STATUS_APPROVED | ||
− | |- | + | |- valign="top" align="left" |
− | | | + | | style="border:1px solid #010101;" width="120" | |
3 | 3 | ||
− | | | + | | style="border:1px solid #010101;" width="324" | |
TASK_STATUS_AWAITINGAPPROVAL | TASK_STATUS_AWAITINGAPPROVAL | ||
Line 297: | Line 330: | ||
Version 5.8 | Version 5.8 | ||
− | + | __FORCETOC__ <!-- imported from file: 7607.htm--> | |
[[Category:Task_Functions]] | [[Category:Task_Functions]] |
Revision as of 11:20, 16 October 2017
Contents
Task_new
Create new task object
Syntax
Task_new(taskname, parentResourceId[, taskTemplateResourceId][, taskDescription])
Arguments
- taskname: is string. It is the name of new task
- parentResourceId: is number. It is parent resource id of the new task
- taskTemplateResourceId: is number. It is the template resource Id
- taskDescription: is string. It is journal's description of task
Return value
Array which is Task object:
Index |
Data type |
Initial Value |
TASK_RESOURCE_ID |
number |
0 |
TASK_CASE_NUMBER |
number |
0 |
TASK_NAME |
string |
Entered value |
TASK_PARENT_RESOURCE_ID |
number |
Entered value |
TASK_TEMPLATE_RESOURCE_ID |
number |
Entered value (default if it is not specified) |
TASK_TIME_REGISTRATION |
bool |
TRUE |
TASK_COMPLETED |
bool (read only) |
FALSE |
TASK_TESTCASE_RESOURCE_ID |
number |
0 (Always = 0 if test case is not required) |
TASK_RESPONSIBLE_RESOURCE_ID |
number |
0 |
TASK_SUPERVISOR_RESOURCE_ID |
number |
0 |
TASK_OBSERVER |
array |
(Explanation *) |
TASK_OBSERVER_INHERIT_ACCESS |
bool |
FALSE |
TASK_STATUS |
number (read only) |
(Explanation **) |
TASK_ACCEPTANCE_DEADLINE |
array DateTime |
|
TASK_COMPLETION_DEADLINE |
array DateTime |
|
TASK_APPROVAL_DEADLINE |
array DateTime |
|
TASK_ACTUAL_START_DATE |
array DateTime |
|
TASK_ACTUAL_END_DATE |
array DateTime |
|
TASK_APPROVED_DATE |
array DateTime |
|
TASK_MAN_HOURS | number | |
TASK_DESCRIPTION | string | |
number | ||
TASK_CREATED_DATE | array DateTime | |
TASK_MODIFIED_DATE | array DateTime | |
TASK_RESPONSIBLE_NAME | string | |
TASK_SUPERVISOR_NAME | string | |
TASK_CURRENT_USER_IS_RESPONSIBLE | bool | |
TASK_CURRENT_USER_IS_SUPERVISOR | bool |
Explanation *
TASK_OBSERVER:
Template:Current user's resource id, "FullControl"
List of user or group which is observer of this task { {observer's resource id, control access},...}
Ex: {{1,"RESOURCE_ACCESS_OBSERVER"},{2,"RESOURCE_ACCESS_MANAGER"}}
In which, control access constants are:
- RESOURCE_ACCESS_OBSERVER
- RESOURCE_ACCESS_MANAGER
- RESOURCE_ACCESS_ADMINISTRATOR
Explanation **
TASK_STATUS:
Default value is 0
Constants:
Index |
Constant name |
0 |
TASK_STATUS_NEEDACCEPTANCE |
1 |
TASK_STATUS_INPROGRESS |
2 |
TASK_STATUS_APPROVED |
3 |
TASK_STATUS_AWAITINGAPPROVAL |
Example
string bulkMailName = "TestBulkMail";
number parentResourceId = 34778803;
number mailTemplateResourceId = 501537;
array newBM = BulkMail_new(bulkMailName, parentResourceId, mailTemplateResourceId);
print(newBM);
Availability
Version 5.8