다음을 통해 공유


EntityType: Task (ProjectData service)

In this article
Definition
Parent element
Child elements

Contains the properties that define the reporting data for a task in the ProjectData service.

Example

The following REST query uses the Tasks entity set and the TaskId key to get the specified task and properties. The query is all on one line.

https://<pwa_url>/_api/ProjectData/Tasks
    ?$filter=TaskId eq guid'2f333a57-f817-e211-9d84-00155d346c3f'
    &$select=TaskPercentCompleted,TaskDuration,TaskFinishDate

The following statement uses LINQ query syntax to retrieve Task entity data from the OData interface of the Project Server reporting tables. To use the statement in an application, set a service reference to the ProjectDataService, and initialize the ReportingData context. The Tasks entity set can then be accessed as context.Tasks. For more information, see Querying OData feeds for Project 2013 reporting data.

var query =
    from t in Tasks
    where (t.TaskIndex > 0)
    orderby t.ProjectName, t.TaskIndex
    select new
    {
        Project = t.ProjectName,
        Task = t.TaskName,
        TaskWork = t.TaskWork,
        TaskCost = t.TaskCost,
        TaskDuration = t.TaskDuration,
        TaskDurationVariance = t.TaskDurationVariance,
        TaskCostVariance = t.TaskCostVariance
    };

The preceding statement can be written by using Lambda expression syntax, as follows:

var query = Tasks
    .Where(t => (t.TaskIndex > (Int32)0))
    .OrderBy(t => t.ProjectName)
    .ThenBy(t => t.TaskIndex)
    .Select(t => new
    {
        Project = t.ProjectName,
        Task = t.TaskName,
        TaskWork = t.TaskWork,
        TaskCost = t.TaskCost,
        TaskDuration = t.TaskDuration,
        TaskDurationVariance = t.TaskDurationVariance,
        TaskCostVariance = t.TaskCostVariance
    });

Both preceding statements create the following REST URL (all on one line).

http://<pwa_url>/_api/ProjectData/Tasks
    ?$filter=TaskIndex gt 0
    &$orderby=ProjectName,TaskIndex
    &$select=ProjectName,TaskName,TaskWork,TaskCost,TaskDuration,TaskDurationVariance,TaskCostVariance

All three of the sample queries get the same data.

Sample results of the Task query

Project

Task

TaskWork

TaskCost

TaskDuration

TaskDurationVariance

TaskCostVariance

ProjectA

T1

24.0 hrs

$404.00

24.0 hrs

0.0 hrs

$0.00

ProjectA

T2

8.0 hrs

$156.00

8.0 hrs

-16.0 hrs

-$272.00

ProjectA

T3

32.0 hrs

$564.00

32.0 hrs

8.0 hrs

$136.00

ProjectB

T1

48.0 hrs

$836.00

48.0 hrs

16.0 hrs

$272.00

ProjectB

T2

24.0 hrs

$428.00

24.0 hrs

0.0 hrs

$0.00

ProjectB

T3

40.0 hrs

$740.00

40.0 hrs

0.0 hrs

$0.00

ProjectB

T4

8.0 hrs

$168.00

8.0 hrs

-8.0 hrs

-$168.00

Definition

<EntityType Name="Task">
  <Key>
    <PropertyRef Name="ProjectId" />
    <PropertyRef Name="TaskId" />
  </Key>
  <Property Name="ProjectId" Type="Edm.Guid" Nullable="false" />
  . . .
  <NavigationProperty Name="Assignments" Relationship="ReportingData.Assignment_Task_Task_Assignments" ToRole="Assignment_Task" FromRole="Task_Assignments" />
  . . .
</EntityType>

Parent element

Element

Description

ReportingData

The schema for the reporting data in the ProjectData service.

Child elements

Child elements are properties of a task and navigation properties of that task. Attributes of the Property elements specify the property name and type, and whether the property can be a null value. The NavigationProperty elements specify collections of entities, such as tasks and assignments, that are associated with a task. A navigation property uses an Association element in a query for a related entity collection

The Key elements specify the properties that are the primary keys for a task query. ProjectId is the project GUID and TaskId is the task GUID.

Property elements

The following table lists the Property elements for the Task entity. The Name, Type, and Nullable columns contain attribute values for each property.

Attribute values for the Property elements of Task

Name

Type

Nullable

Description

FlagStatus

Edm.Boolean

true

Health

Edm.String

true

The Health assignment custom field.

ParentTaskId

Edm.Guid

true

The GUID of a parent task.

ParentTaskName

Edm.String

true

The name of a parent task.

ProjectId

Edm.Guid

false

Key
The GUID that identifies a project.

ProjectName

Edm.String

true

The name of a project.

TaskActualCost

Edm.Decimal

true

The cost for work that has already been performed on a task, along with any other recorded costs.

TaskActualDuration

Edm.Decimal

true

The actual working time for a task, based on the duration of the work that was performed on the task to completion.

TaskActualFinishDate

Edm.DateTime

true

The date and time that a task was completed.

TaskActualFixedCost

Edm.Decimal

true

The costs for a task that remain constant regardless of the task duration, the amount of work performed by the resource, and the number of assignment units.

TaskActualOvertimeCost

Edm.Decimal

true

The cost incurred for overtime work that has already been performed on a task.

TaskActualOvertimeWork

Edm.Decimal

true

The amount of overtime work that has already been performed on a task.

TaskActualRegularCost

Edm.Decimal

true

The cost of regular, non-overtime work that has already been performed on a task.

TaskActualRegularWork

Edm.Decimal

true

The regular, non-overtime work that has already been performed on a task.

TaskActualStartDate

Edm.DateTime

true

The date and time that a task actually began.

TaskActualWork

Edm.Decimal

true

The actual work that has already been performed on a task, usually expressed as the percent complete.

TaskACWP

Edm.Decimal

true

The actual cost of work that has already been performed on a task, up to the current date or status date.

TaskBCWP

Edm.Decimal

true

The budgeted cost of work that has already been performed on a task, up to the current date or the status date.

TaskBCWS

Edm.Decimal

true

The budgeted cost of work scheduled, up to the current date or the status date.

TaskBudgetCost

Edm.Decimal

false

The scheduled costs.

TaskBudgetWork

Edm.Decimal

false

The scheduled work.

TaskClientUniqueId

Edm.Int32

false

The GUID of a task client.

TaskCost

Edm.Decimal

true

The total scheduled or projected cost for a task.

TaskCostVariance

Edm.Decimal

true

The difference between the baseline cost and total cost for a task.

TaskCPI

Edm.Decimal

true

The Cost Performance Index, calculated by dividing the budgeted cost of work performed by the actual cost of work scheduled.

TaskCreatedDate

Edm.DateTime

false

The date and time that a task was added to the project.

TaskCreatedRevisionCounter

Edm.Int32

false

Represents the number of times that a task has been modified.

TaskCV

Edm.Decimal

true

The task earned value cost variance.

TaskCVP

Edm.Decimal

true

The task CVP, calculated by dividing the task cost variance by the task budgeted cost of work performed.

TaskDeadline

Edm.DateTime

true

The target date and time for when a task should be completed.

TaskDeliverableFinishDate

Edm.DateTime

true

The published deliverable finish date and time for a task.

TaskDeliverableStartDate

Edm.DateTime

true

The published deliverable start date and time for a task.

TaskDuration

Edm.Decimal

true

The total span of active working time for a task.

TaskDurationIsEstimated

Edm.Boolean

false

True if task duration is estimated.

TaskDurationString

Edm.String

true

The string value for the duration of a task.

TaskDurationVariance

Edm.Decimal

true

The difference between the baseline duration and the total duration (current estimate) of a task.

TaskEAC

Edm.Decimal

true

The task estimate at completion—the expected total cost of a task based on performance up to the status date.

TaskEarlyFinish

Edm.DateTime

true

The earliest date and time that a task can finish.

TaskEarlyStart

Edm.DateTime

true

The earliest date and time that a task can begin.

TaskFinishDate

Edm.DateTime

true

The date and time that a task is scheduled to be completed.

TaskFinishDateString

Edm.String

true

The string value of the task finish date and time.

TaskFinishVariance

Edm.Decimal

true

Task variance at the finish date and time.

TaskFixedCost

Edm.Decimal

true

A set cost for a task that remains constant regardless of the task duration or the work performed by a resource.

TaskFixedCostAssignmentId

Edm.Guid

false

The GUID of the fixed cost assignment.

TaskFreeSlack

Edm.Decimal

true

The amount of time a task can be delayed without delaying successor tasks.

TaskHyperLinkAddress

Edm.String

true

A hyperlink that is associated with a task.

TaskHyperLinkFriendlyName

Edm.String

true

The text to display for a task hyperlink.

TaskHyperLinkSubAddress

Edm.String

true

The subaddress of a task hyperlink.

TaskId

Edm.Guid

false

Key
The GUID that identifies a task.

TaskIgnoresResourceCalendar

Edm.Boolean

false

True if a task ignores resource calendars.

TaskIndex

Edm.Int32

true

The number of a task in the local project.

TaskIsActive

Edm.Boolean

false

True if a task is active.

TaskIsCritical

Edm.Boolean

true

True if a task is on a critical path.

TaskIsEffortDriven

Edm.Boolean

false

True if a task is effort-driven.

TaskIsExternal

Edm.Boolean

false

True if a task is linked from another project.

TaskIsManuallyScheduled

Edm.Boolean

false

True if a task is manually scheduled.

TaskIsMarked

Edm.Boolean

false

True if a task is marked.

TaskIsMilestone

Edm.Boolean

true

True if a task is a milestone.

TaskIsOverallocated

Edm.Boolean

true

True if a task is overallocated.

TaskIsProjectSummary

Edm.Boolean

true

True if a task is a project summary task.

TaskIsRecurring

Edm.Boolean

false

True if a task is part of a series of recurring tasks.

TaskIsSummary

Edm.Boolean

true

True if a task is a summary task.

TaskLateFinish

Edm.DateTime

true

The latest date and time that a task can finish without delaying the project finish.

TaskLateStart

Edm.DateTime

true

The latest date and time that a task can start without delaying the project finish date.

TaskLevelingDelay

Edm.Decimal

true

The amount of time that a task is to be delayed from its early start date as a result of resource leveling.

TaskModifiedDate

Edm.DateTime

false

The date and time that a task was modified.

TaskModifiedRevisionCounter

Edm.Int32

false

The number of times that task data has been modified.

TaskName

Edm.String

true

The name of a task.

TaskOutlineLevel

Edm.Int16

true

The position of a task in the project outline hierarchy, as indicated by a number.

TaskOutlineNumber

Edm.String

true

The position of a task in the project outline hierarchy, as indicated by a text value.

TaskOvertimeCost

Edm.Decimal

true

The cost of overtime work on a task.

TaskOvertimeWork

Edm.Decimal

true

The amount of overtime work scheduled to be performed by all resources that are assigned to a task.

TaskPercentCompleted

Edm.Int16

true

The current task status, expressed as the percent of the task duration that is completed.

TaskPercentWorkCompleted

Edm.Int16

true

The current status of a task, expressed as the percentage of work completed.

TaskPhysicalPercentCompleted

Edm.Int16

true

The percentage of a task that is completed. Used for calculating earned value (BCWP.

TaskPriority

Edm.Int16

true

The level of importance of a task, represented by a value from 0 to 1000.

TaskRegularCost

Edm.Decimal

true

The cost of the regular, nonovertime work on a task.

TaskRegularWork

Edm.Decimal

true

The regular, nonovertime work on a task.

TaskRemainingCost

Edm.Decimal

true

The cost of the work that remains to be done on a task.

TaskRemainingDuration

Edm.Decimal

true

The duration of the work that remains to be done on a task.

TaskRemainingOvertimeCost

Edm.Decimal

true

The cost of the overtime work that remains to be done on a task.

TaskRemainingOvertimeWork

Edm.Decimal

true

The overtime work that remains to be done on a task.

TaskRemainingRegularCost

Edm.Decimal

true

The cost of the regular, nonovertime work that remains to be performed on a task.

TaskRemainingRegularWork

Edm.Decimal

true

The regular, nonovertime work that remains to be performed on a task.

TaskRemainingWork

Edm.Decimal

true

The work that remains to be done on a task.

TaskResourcePlanWork

Edm.Decimal

false

The total work of all resources on tasks.

TaskSPI

Edm.Decimal

true

A value that indicates whether the project is on schedule, calculated by dividing budgeted cost of work performed by the budgeted cost of work scheduled.

TaskStartDate

Edm.DateTime

true

The date and time that an assigned resource is scheduled to begin work on a task.

TaskStartDateString

Edm.String

true

The string value for a task start date and time.

TaskStartVariance

Edm.Decimal

true

Task start variance is the difference between a baseline start date and the currently scheduled start date.

TaskSV

Edm.Decimal

true

Task schedule variance is the cost difference between the current progress and the baseline plan of a task.

TaskSVP

Edm.Decimal

true

Task schedule variance percentage (schedule variance divided by the TaskBCWS).

TaskTCPI

Edm.Decimal

true

The cost performance index (the ratio of the work that remains to be done, to funds remaining to be spent) as of the task status date.

TaskTotalSlack

Edm.Decimal

true

The amount of time that a task finish date can be delayed without delaying the project finish date.

TaskVAC

Edm.Decimal

true

The task variance at completion of the task.

TaskWBS

Edm.String

true

Work breakdown structure code that is used to represent the task position within the hierarchical structure of a project.

TaskWork

Edm.Decimal

true

The total time scheduled on a task for all assigned resources.

TaskWorkVariance

Edm.Decimal

true

The difference between baseline work and currently scheduled work.

The following table lists attribute values for the NavigationProperty elements of the Prioritization entity. The Name and Relationship columns contain attribute values for each navigation property.

Each Relationship attribute has two pairs of names; each pair of names indicates a navigation direction. The first pair starts with the entity type that has the primary, or starting, role in the navigation. The second pair starts with the entity type that has the secondary, or dependent, role in the navigation. For example, for the Assignments navigation property, the primary type is Assignment, and the secondary type is Task. For this type of navigation, the FromRole is Assignment_Task, and the ToRole is Task_Assignments.

Attribute values for the NavigationProperty elements

Name

Relationship

Description

Assignments

Assignment_Task_Task_Assignments

Establishes navigation from a collection of assignments to a task and from a task to a collection of assignments.

AssignmentsBaselines

AssignmentBaseline_Task_Task_AssignmentsBaselines

Establishes navigation from a collection of assignment baselines to a task and from a task to a collection of assignment baselines.

AssignmentsBaselineTimephasedData

AssignmentBaselineTimephasedData_Tasks_Task_AssignmentsBaselineTimephasedData

Establishes navigation from a collection of assignment baseline timephased data to a task and from a task to a collection of assignment baseline timephased data.

Baselines

TaskBaseline_Task_Task_Baselines

Establishes navigation from a collection of task baselines to a task and from a task to a collection of task baselines.

BaselinesTimephasedDataSet

TaskBaselineTimephasedData_Task_Task_BaselinesTimephasedDataSet

Establishes navigation from a collection of task baseline timephased data to a task and from a task to a collection of task baseline timephased data.

Issues

Issue_Tasks_Task_Issues

Project

Project_Tasks_Task_Project

Establishes navigation from a project to a collection of tasks and from a collection of tasks to a project.

Risks

Risk_Tasks_Task_Risks

TimephasedInfo

TaskTimephasedData_Task_Task_TimephasedInfo

Establishes navigation from a collection of task timephased data to a task and from a task to a collection of task timephased data.

See also

Reference

Tasks

ReportingData

Concepts

Querying OData feeds for Project 2013 reporting data