Represents the task entity from Coretex.ai\n
Contains properties that describe the task
Definition at line 26 of file task.py.
◆ createTask()
Optional[Self] coretex.entities.project.task.Task.createTask |
( |
|
cls, |
|
|
str |
name, |
|
|
int |
projectId, |
|
|
Optional[str] |
description = None |
|
) |
| |
Creates a new task with the provided name and description
Task is added to the project with provided project id
Parameters
----------
name : str
task name
projectId : int
project id the task belongs to
description : Optional[str]
task description
Returns
-------
Optional[Self] -> The created task object
Example
-------
>>> from coretex import Task
\b
>>> dummyTask = Task.createTask(
name = "dummyTask",
projectId = 23,
description = "This is dummy task"
)
>>> if dummyTask is None:
print("Failed to create task")
Definition at line 44 of file task.py.
44 def createTask(cls, name: str, projectId: int, description: Optional[str]=
None) -> Optional[Self]:
46 Creates a new task with the provided name and description
47 Task is added to the project with provided project id
54 project id the task belongs to
55 description : Optional[str]
60 Optional[Self] -> The created task object
64 >>> from coretex import Task
66 >>> dummyTask = Task.createTask(
69 description = "This is dummy task"
71 >>> if dummyTask is None:
72 print("Failed to create task")
75 if not isEntityNameValid(name):
76 raise ValueError(
">> [Coretex] Task name is invalid. Requirements: alphanumeric characters (\"a-z\", and \"0-9\") and dash (\"-\") with length between 3 to 50")
80 parent_id = projectId,
81 description = description
The documentation for this class was generated from the following file: