Difference between revisions of "Task new"
Line 1: | Line 1: | ||
− | + | {{HelpFiles}} | |
− | {{HelpFiles}} | ||
− | ==Task_new== | + | == Task_new == |
− | Create new task object | + | Create new task object |
− | '''Syntax''' | + | '''Syntax''' |
− | Task_new(taskname, parentResourceId[, taskTemplateResourceId][, taskDescription]) | + | Task_new(taskname, parentResourceId[, taskTemplateResourceId][, taskDescription]) |
− | '''Arguments''' | + | '''Arguments''' |
− | * taskname: is string. It is the name of new task | + | *taskname: is string. It is the name of new task |
− | * parentResourceId: is number. It is parent resource id of the new task | + | *parentResourceId: is number. It is parent resource id of the new task |
− | * taskTemplateResourceId: is number. It is the template resource Id | + | *taskTemplateResourceId: is number. It is the template resource Id |
− | * taskDescription: is string. It is journal's description of task | + | *taskDescription: is string. It is journal's description of task |
− | '''Return value''' | + | '''Return value''' |
− | Array which is Task object: | + | Array which is Task object: |
{| class="tableintopic" style="border-collapse: collapse" width="1067" cellpadding="2" | {| class="tableintopic" style="border-collapse: collapse" width="1067" cellpadding="2" | ||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" bgcolor="#C0C0C0" | | + | | style="border: 1px solid #010101" width="356" bgcolor="#C0C0C0" | |
− | '''Index''' | + | '''Index''' |
− | | style="border: 1px solid #010101" width="356" bgcolor="#C0C0C0" | | + | |
− | '''Data type''' | + | | style="border: 1px solid #010101" width="356" bgcolor="#C0C0C0" | |
− | | style="border: 1px solid #010101" width="356" bgcolor="#C0C0C0" | | + | '''Data type''' |
− | '''Initial Value''' | + | |
+ | | style="border: 1px solid #010101" width="356" bgcolor="#C0C0C0" | | ||
+ | '''Initial Value''' | ||
+ | |||
|- align="left" valign="top" style="border: 1px solid #010101" | |- align="left" valign="top" style="border: 1px solid #010101" | ||
− | | width="356" | | + | | width="356" | |
− | TASK_RESOURCE_ID | + | TASK_RESOURCE_ID |
− | | width="356" style="border: 1px solid #010101" | | + | |
− | number | + | | width="356" style="border: 1px solid #010101" | |
− | | width="356" style="border: 1px solid #010101" | | + | number |
− | 0 | + | |
+ | | width="356" style="border: 1px solid #010101" | | ||
+ | 0 | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_CASE_NUMBER | + | TASK_CASE_NUMBER |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | number | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | number |
− | 0 | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | 0 | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_NAME | + | TASK_NAME |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | string | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | string |
− | Entered value | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | Entered value | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_PARENT_RESOURCE_ID | + | TASK_PARENT_RESOURCE_ID |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | number | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | number |
− | Entered value | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | Entered value | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_TEMPLATE_RESOURCE_ID | + | TASK_TEMPLATE_RESOURCE_ID |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | number | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | number |
− | Entered value (default if it is not specified) | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | Entered value (default if it is not specified) | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_TIME_REGISTRATION | + | TASK_TIME_REGISTRATION |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | bool | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | bool |
− | TRUE | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | TRUE | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_COMPLETED | + | TASK_COMPLETED |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | bool (read only) | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | bool (read only) |
− | FALSE | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | FALSE | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_TESTCASE_RESOURCE_ID | + | TASK_TESTCASE_RESOURCE_ID |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | number | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | number |
− | 0 (Always = 0 if test case is not required) | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | 0 (Always = 0 if test case is not required) | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_RESPONSIBLE_RESOURCE_ID | + | TASK_RESPONSIBLE_RESOURCE_ID |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | number | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | number |
− | 0 | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | 0 | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_SUPERVISOR_RESOURCE_ID | + | TASK_SUPERVISOR_RESOURCE_ID |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | number | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | number |
− | 0 | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | 0 | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_OBSERVER | + | TASK_OBSERVER |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | array | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | array |
− | (Explanation *) | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | (Explanation *) | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_OBSERVER_INHERIT_ACCESS | + | TASK_OBSERVER_INHERIT_ACCESS |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | bool | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | bool |
− | FALSE | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | FALSE | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101" width="356" | | + | | style="border: 1px solid #010101" width="356" | |
− | TASK_STATUS | + | TASK_STATUS |
− | | style="border: 1px solid #010101" width="356" | | + | |
− | number (read only) | + | | style="border: 1px solid #010101" width="356" | |
− | | style="border: 1px solid #010101" width="356" | | + | number (read only) |
− | (Explanation **) | + | |
+ | | style="border: 1px solid #010101" width="356" | | ||
+ | (Explanation **) <br> | ||
+ | |||
+ | |} | ||
+ | |||
+ | '''''Explanation *''''' | ||
+ | |||
+ | TASK_OBSERVER: | ||
− | ' | + | {{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: | |
− | |||
− | |||
− | {| | + | {| width="444" cellspacing="0" cellpadding="2" border="1" style="border-collapse:collapse; border:1px solid #010101" class="tableintopic" |
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | | + | | width="120" bgcolor="#C0C0C0" style="border:1px solid #010101;" | |
'''Index''' | '''Index''' | ||
− | | | + | |
+ | | width="324" bgcolor="#C0C0C0" style="border:1px solid #010101;" | | ||
'''Constant name''' | '''Constant name''' | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101 | + | | width="120" style="border:1px solid #010101;" | |
0 | 0 | ||
− | | style="border: 1px solid #010101 | + | |
+ | | width="324" style="border:1px solid #010101;" | | ||
TASK_STATUS_NEEDACCEPTANCE | TASK_STATUS_NEEDACCEPTANCE | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101 | + | | width="120" style="border:1px solid #010101;" | |
1 | 1 | ||
− | | style="border: 1px solid #010101 | + | |
+ | | width="324" style="border:1px solid #010101;" | | ||
TASK_STATUS_INPROGRESS | TASK_STATUS_INPROGRESS | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101 | + | | width="120" style="border:1px solid #010101;" | |
2 | 2 | ||
− | | style="border: 1px solid #010101 | + | |
+ | | width="324" style="border:1px solid #010101;" | | ||
TASK_STATUS_APPROVED | TASK_STATUS_APPROVED | ||
+ | |||
|- align="left" valign="top" | |- align="left" valign="top" | ||
− | | style="border: 1px solid #010101 | + | | width="120" style="border:1px solid #010101;" | |
3 | 3 | ||
− | | style="border: 1px solid #010101 | + | |
+ | | width="324" style="border:1px solid #010101;" | | ||
TASK_STATUS_AWAITINGAPPROVAL | TASK_STATUS_AWAITINGAPPROVAL | ||
+ | |||
|} | |} | ||
− | |||
− | '''Example''' | + | <br> '''Example''' |
+ | |||
+ | string bulkMailName = "TestBulkMail"; | ||
− | + | number parentResourceId = 34778803; | |
− | number | + | number mailTemplateResourceId = 501537; |
− | + | array newBM = BulkMail_new(bulkMailName, parentResourceId, mailTemplateResourceId); | |
− | + | print(newBM); | |
− | + | '''Availability''' | |
− | + | Version 5.8 | |
− | + | __NOTOC__ <!-- imported from file: 7607.htm--> | |
− | + | [[Category:Task_Functions]] | |
− |
Revision as of 08:18, 17 February 2012
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 **) |
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