PublicAPI.Projects.Objects.ProjectTaskBaseELMA API Documentation
Project Task Base Class
Access path: PublicAPI.Projects.Objects.ProjectTaskBase
Methods

  NameDescription
Public methodCount 
Returns the total number of objects of this type
Public methodCount(IEntityFilter)
Get Total Number of Objects by Filter
Public methodCreate
Create New Entity (without a Database entry)
Public methodDelete
Delete Object
Public methodFind(FetchOptions)
Find objects according to fetch options
Public methodFind(String)
Find objects according to the filter in the EQL language
Public methodFind(IEntityFilter, FetchOptions)
Fing objects according to fetch options and filter
Public methodFindByIdArray
Find All Objects by Array IDs
Public methodIsDirty
Check, if there are unsaved changes in the object
Public methodIsNew
Check, if the object is new (not saved in the database)
Public methodLoad(Guid)
Load by UID. If not found, an exception is invoked
Public methodLoad(Int64)
Load by ID. If not found, an exception is invoked
Public methodLoadOrCreate(Guid)
Load by ID. If not found, the new object is returned
Public methodLoadOrCreate(Int64)
Load by ID. If not found, the new object is returned
Public methodLoadOrNull(Guid)
Load by UID. If not found, null is returned
Public methodLoadOrNull(Int64)
Load by ID. If not found, null is returned
Public methodRefresh
Refresh (read over) Object from Database
Public methodSave
Save Object to Database
Back to Top
Properties

  NameDescription
Public propertyMilestone
Milestone
Public propertyProjectTask
Project Task
Public propertyWorkflowProjectTask
Business process project task
Back to Top
Remarks

Section containing methods for managing project tasks
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