Project Task Base Class
Access path: PublicAPI.Projects.Objects.ProjectTaskBaseMethods
Name | Description | |
---|---|---|
Count |
Returns the total number of objects of this type
| |
Count(IEntityFilter) |
Get Total Number of Objects by Filter
| |
Create |
Create New Entity (without a Database entry)
| |
Delete |
Delete Object
| |
Find(FetchOptions) |
Find objects according to fetch options
| |
Find(String) |
Find objects according to the filter in the EQL language
| |
Find(IEntityFilter, FetchOptions) |
Fing objects according to fetch options and filter
| |
FindByIdArray |
Find All Objects by Array IDs
| |
IsDirty |
Check, if there are unsaved changes in the object
| |
IsNew |
Check, if the object is new (not saved in the database)
| |
Load(Guid) |
Load by UID. If not found, an exception is invoked
| |
Load(Int64) |
Load by ID. If not found, an exception is invoked
| |
LoadOrCreate(Guid) |
Load by ID. If not found, the new object is returned
| |
LoadOrCreate(Int64) |
Load by ID. If not found, the new object is returned
| |
LoadOrNull(Guid) |
Load by UID. If not found, null is returned
| |
LoadOrNull(Int64) |
Load by ID. If not found, null is returned
| |
Refresh |
Refresh (read over) Object from Database
| |
Save |
Save Object to Database
|
Properties
Name | Description | |
---|---|---|
Milestone |
Milestone
| |
ProjectTask |
Project Task
| |
WorkflowProjectTask |
Business process project task
|
Remarks
Examples
Create a task for the project created here
//task name var taskName = "Project Task"; //create a task var projectTask = PublicAPI.Projects.ProjectTask.CreateTask(myProject, taskName, context.User, DateTime.Now, DateTime.Now.AddWeeks(2), true);
Please save the object to the base to ensure its correct functioning
projectTask.Save();
Add a comment to the task
PublicAPI.Projects.ProjectTask.AddComment(projectTask, "A task is created successfully");
Add the task to the project plan
PublicAPI.Projects.ProjectTask.AddTaskToProjectPlan(projectTask);
Change the task end date
PublicAPI.Projects.ProjectTask.SetTaskEndDate(projectTask.Id, DateTime.Now.AddWeeks(2));
Define the task completion rate
PublicAPI.Projects.ProjectTask.SetTaskCompletePercent(projectTask, 60);
Create a sub-task for the created task
//task name var subTaskName = "Project Sub-Task"; //creating a task var subTask = PublicAPI.Projects.ProjectTask.CreateSubTask(projectTask, subTaskName, context.User, DateTime.Now, DateTime.Now.AddWeeks(1), true);
Please save the object in the base to ensure it's functioning properly
projectSubTask.Save();
Add the task's working time
PublicAPI.Projects.ProjectTask.SetFactWorkLogHours(projectTask.Id, 6, DateTime.Now);
Complete the task
PublicAPI.Projects.ProjectTask.CompleteTask(projectTask, "The task is completed successfully", true);
See Also