Task Base Class
Access path: PublicAPI.Portal.TaskBaseMethods
Name | Description | |
---|---|---|
AddComment(TaskBase, CommentActionModel) |
Add a comment to the task
| |
AddComment(TaskBase, String) |
Add a comment to the task
| |
AddComment(TaskBase, String, User) | ||
AddComment(TaskBase, String, IEnumerable Attachment ) |
Add a comment to the task
| |
CompleteTask |
Complete task
| |
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
| |
Filter |
Creates an assistant for working with the "Task Base Class" object filter
| |
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
| |
ReAssign(Int64, User) | ||
ReAssign(Int64, User, Comment) | ||
ReAssign(Int64, User, DateTime) |
Reassign task
| |
ReAssign(Int64, User, String) | ||
ReAssign(Int64, User, DateTime, Comment) |
Reassign task
| |
ReAssign(Int64, User, DateTime, DateTime) |
Reassign task
| |
ReAssign(Int64, User, DateTime, String) |
Reassign task
| |
ReAssign(Int64, User, DateTime, TaskPriority, String) |
Reassign task
| |
ReAssign(Int64, User, DateTime, DateTime, Comment) |
Reassign task
| |
ReAssign(Int64, User, DateTime, DateTime, TaskPriority) |
Reassign task
| |
ReAssign(Int64, User, DateTime, DateTime, String) |
Reassign task
| |
ReAssign(Int64, User, DateTime, DateTime, TaskPriority, Comment) |
Reassign task
| |
ReAssign(Int64, User, DateTime, DateTime, TaskPriority, String) |
Reassign task
| |
Refresh |
Refresh (read over) Object from Database
| |
Save |
Save Object to Database
| |
SetFactWorkLog(Int64, Int64) |
Set fact time report in minutes
| |
SetFactWorkLog(Int64, Int64, DateTime) |
Set fact time report in minutes
| |
SetFactWorkLog(Int64, Int64, String) |
Set fact time report in minutes
| |
SetFactWorkLog(Int64, Int64, DateTime, String) |
Set fact time report in minutes
| |
SetFactWorkLogDays(Int64, Int64) |
Set fact time report, in days
| |
SetFactWorkLogDays(Int64, Int64, DateTime) |
Set fact time report, in days
| |
SetFactWorkLogDays(Int64, Int64, String) |
Set fact time report, in days
| |
SetFactWorkLogDays(Int64, Int64, DateTime, String) |
Set fact time report, in days
| |
SetFactWorkLogHours(Int64, Int64) |
Set fact time report in hours
| |
SetFactWorkLogHours(Int64, Int64, DateTime) |
Set fact time report in hours
| |
SetFactWorkLogHours(Int64, Int64, String) |
Set fact time report in hours
| |
SetFactWorkLogHours(Int64, Int64, DateTime, String) |
Set fact time report in hours
| |
SetTaskEndDate |
Change the task end date
|
Properties
Name | Description | |
---|---|---|
Task |
Task
| |
TypeUid |
Returns the unique object identifier "Task Base Class"
|
Remarks
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