PublicAPI.Portal.TaskBaseELMA API Documentation
Task Base Class
Access path: PublicAPI.Portal.TaskBase
Methods

  NameDescription
Public methodAddComment(TaskBase, CommentActionModel)
Add a comment to the task
Public methodAddComment(TaskBase, String)
Add a comment to the task
Public methodAddComment(TaskBase, String, User)
Public methodAddComment(TaskBase, String, IEnumerable Attachment )
Add a comment to the task
Public methodCompleteTask
Complete task
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 methodFilter
Creates an assistant for working with the "Task Base Class" object filter
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 methodReAssign(Int64, User)
Public methodReAssign(Int64, User, Comment)
Public methodReAssign(Int64, User, DateTime)
Reassign task
Public methodReAssign(Int64, User, String)
Public methodReAssign(Int64, User, DateTime, Comment)
Reassign task
Public methodReAssign(Int64, User, DateTime, DateTime)
Reassign task
Public methodReAssign(Int64, User, DateTime, String)
Reassign task
Public methodReAssign(Int64, User, DateTime, TaskPriority, String)
Reassign task
Public methodReAssign(Int64, User, DateTime, DateTime, Comment)
Reassign task
Public methodReAssign(Int64, User, DateTime, DateTime, TaskPriority)
Reassign task
Public methodReAssign(Int64, User, DateTime, DateTime, String)
Reassign task
Public methodReAssign(Int64, User, DateTime, DateTime, TaskPriority, Comment)
Reassign task
Public methodReAssign(Int64, User, DateTime, DateTime, TaskPriority, String)
Reassign task
Public methodRefresh
Refresh (read over) Object from Database
Public methodSave
Save Object to Database
Public methodSetFactWorkLog(Int64, Int64)
Set fact time report in minutes
Public methodSetFactWorkLog(Int64, Int64, DateTime)
Set fact time report in minutes
Public methodSetFactWorkLog(Int64, Int64, String)
Set fact time report in minutes
Public methodSetFactWorkLog(Int64, Int64, DateTime, String)
Set fact time report in minutes
Public methodSetFactWorkLogDays(Int64, Int64)
Set fact time report, in days
Public methodSetFactWorkLogDays(Int64, Int64, DateTime)
Set fact time report, in days
Public methodSetFactWorkLogDays(Int64, Int64, String)
Set fact time report, in days
Public methodSetFactWorkLogDays(Int64, Int64, DateTime, String)
Set fact time report, in days
Public methodSetFactWorkLogHours(Int64, Int64)
Set fact time report in hours
Public methodSetFactWorkLogHours(Int64, Int64, DateTime)
Set fact time report in hours
Public methodSetFactWorkLogHours(Int64, Int64, String)
Set fact time report in hours
Public methodSetFactWorkLogHours(Int64, Int64, DateTime, String)
Set fact time report in hours
Public methodSetTaskEndDate
Change the task end date
Back to Top
Properties

  NameDescription
Public propertyTask
Task
Public propertyTypeUid
Returns the unique object identifier "Task Base Class"
Back to Top
Remarks

Section containing methods for managing tasks
Examples

Create a task to work with

var myTask = PublicAPI.Portal.TaskBase.Task.Create();

Before any operations with the "myTask" variable, fill in it required fields

//task created on
myTask.CreationDate = DateTime.Now;
//task created by
myTask.CreationAuthor = PublicAPI.Security.User.GerCurrentUser();
//task subject
myTask.Subject = "Task Subject";
//task executor
myTask.Executor = context.UserExecutor;
//task start and end dates
myTask.StartDate = DateTime.Now;
myTask.EndDate = DateTime.Now.AddWeeks(3);

Please save the object in the base to ensure its proper functioning

myTask.Save();

Set a time report for the task

PublicAPI.Portal.TaskBase.SetFactWorkLogHours(myTask.Id, 4, DateTime.Now, "Description of Job for 4 hours");

Reassign the task to another user

PublicAPI.Portal.TaskBase.ReAssign(myTask.Id, context.UserNewExecutor, DateTime.Now.AddDays(4), "The task is reassigned");

Change the task end date

PublicAPI.Portal.TaskBase.SetTaskEndDate(myTask.Id, DateTime.Now.AddDays(5));

Finish the task

//fill in the task end model 
var model = new CompleteTaskModel();
model.alertCoexecuters = true;
//Filling "Started On" field
model.startDate = DateTime.Now;
//fill in the field "Time Report" (in minutes)
model.worklogMinutes = 360;
//complete the task
PublicAPI.Portal.TaskBase.CompleteTask(myTask.Id, model);

See Also