Project
Access path: PublicAPI.Projects.ProjectMethods
Name | Description | |
---|---|---|
AddUserToProject |
Add a user to the list of project participants, if the user is not added yet
| |
ChangeProjectManager(Project, User) |
Change the project manager
| |
ChangeProjectManager(Project, User, String) |
Change the project manager
| |
ChangeProjectStage |
Change the project stage
| |
CloseProject(Project) |
Close project (send to archive)
| |
CloseProject(Project, WorkflowInstance) |
Close project (send to archive)
| |
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)
| |
Create(ProjectMetadataHead) | Obsolete.
Create a new project by its type settings.
Entity is not saved to the database!
Only general information is copied from the template: project name, start date, end date, manager.
| |
Create(String, ProjectMetadataHead, DateTime, DateTime, User) |
Create a project.
Entity is saved to the database
| |
Create(String, ProjectMetadataHead, DateTime, DateTime, User, Folder) |
Create a project.
Entity is saved to the database
| |
CreatePhase(Project, String) |
Create a new project phase
| |
CreatePhase(Project, String, String) |
Create a new project phase
| |
CreatePhase(Project, String, String, Int64) |
Create a new project phase
| |
CreateProject | Obsolete.
Create a project
| |
CreateProjectPhase(ProjectMetadataHead, String) | Obsolete.
Create a new phase in the project budget.
Creates an object, without saving in the database
| |
CreateProjectPhase(ProjectMetadataHead, String, String) | Obsolete.
Create a new phase in the project budget.
Creates an object, without saving in the database
| |
Delete |
Delete Object
| |
Filter |
Creates an assistant for working with the "Base Project Type" 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
| |
GetDraftProjectPlans |
Get all the project plan drafts. If there are none, returns the clone of the current published plan
| |
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
| |
PublishProject |
Publish the project
| |
Refresh |
Refresh (read over) Object from Database
| |
ReOpenProject |
Reopen project (extract from archive)
| |
Save |
Saves the project.
| |
SaveNew | Obsolete.
Saves the new project, copying the necessary data from the template.
| |
SendMessageToInfoChannel |
Send a message to the project channel
| |
SetLimitPlanWorkLog | Obsolete.
Enable or disable submitting time reports
| |
SetPlanWorkLog |
Set the project time limit (minutes)
| |
SetPlanWorkLogDays |
Set the project time limit (days)
| |
SetPlanWorkLogHours |
Set the project time limit (hours)
| |
SetPlanWorkLogMinutes |
Set the project time limit (minutes)
|
Properties
Name | Description | |
---|---|---|
TypeUid |
Returns the unique object identifier "Base Project Type"
|
Remarks
Examples
Create a project to work with
//create a project template to create a project var projectTemplate = PublicAPI.Projects.ProjectTemplate.Load(1); //project name var name = "New test project"; //project manager var manager = context.UserProjectManager; //create a project var myProject = PublicAPI.Projects.Project.CreateProject(name, projectTemplate, DateTime.Now, DateTime.Now.AddMonths(1), manager);
Enable submission of project time report
PublicAPI.Projects.Project.SetLimitPlanWorkLog(myProject, true);
define the limit of working days
//load the occupation by ID var worklogActivity = PublicAPI.Portal.Objects.Tasks.WorkLogActivity.Load(3); //define the working time limit PublicAPI.Projects.Project.SetPlanWorkLogDays(myProject, worklogActivity, 5);
change the working-time approver for the project
PublicAPI.Projects.Project.ChangeHarmonizator(myProject, context.NewHarmonizator);
When project roles and project tasks are created, publish the project
PublicAPI.Projects.Project.PublishProject(myProject);
Change the project manager
PublicAPI.Projects.Project.ChangeProjectManager(myProject, context.UserNewManager, "The project manager is changed");
Send a message to the project channel
//message texr var text = "Please note! The project manager is changed"; //message subject var subject = "Changing project manager"; PublicAPI.Projects.Project.SendMessageToInfoChannel(myProject, text, subject, context.CurrentUser);
After work with the project's budget and risks, close the project
PublicAPI.Projects.Project.CloseProject(myProject);
See Also