次の方法で共有


EntityType: Risk (ProjectData service)

In this article
Definition
Parent element
Child elements

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

Example

The following REST query uses the Risks entity set and the RiskId key to get the specified risk and properties. The query is all on one line.

https://<pwa_url>/_api/ProjectData/Risks
    ?$filter=RiskId eq guid'50569763-3ec4-4ab5-9c89-0ff07ae70c95'
    &$select=Title,Status,Tasks

Definition

<EntityType Name="Risk">
  <Key>
    <PropertyRef Name="ProjectId" />
    <PropertyRef Name="RiskId" />
  </Key>
  <Property Name="ProjectId" Type="Edm.Guid" Nullable="false" />
  . . .
  <NavigationProperty Name="Project" Relationship="ReportingData.Project_Risks_Risk_Project" ToRole="Project_Risks" FromRole="Risk_Project" />
  . . .
</EntityType>

Parent element

Element

Description

ReportingData

The schema for the reporting data in the ProjectData service.

Child elements

Child elements are properties of a risk and navigation properties of that risk. 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 related issues and affected tasks, that are associated with a risk. 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 risk query. ProjectId is the project GUID and RiskId is the risk GUID.

Property elements

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

Attribute values for the Property elements of Risk

Name

Type

Nullable

Description

AssignedToResource

Edm.String

true

The resource to which a risk is assigned.

Category

Edm.String

true

The category of a risk.

ContingencyPlan

Edm.String

true

The contingency plan for a risk.

Cost

Edm.Double

true

The total projected cost for a risk.

CostExposure

Edm.Double

true

The overall threat of risk, calculated by multiplying the cost by the risk probability.

CreateByResource

Edm.String

true

The resource that created a risk.

CreatedDate

Edm.DateTime

true

The date and time when a risk was created.

Description

Edm.String

true

The text field for a risk description.

DueDate

Edm.DateTime

true

The due date for a risk.

Exposure

Edm.Double

true

The overall threat of a risk, calculated by multiplying the risk probability by the impact.

Impact

Edm.Double

true

The magnitude of the impact if a risk happens.

IsFolder

Edm.Boolean

false

True if the risk is a folder in the SharePoint list.

ItemRelativeUrlPath

Edm.String

true

The relative URL of the risk.

MitigationPlan

Edm.String

true

A plan for handling problems that are related to risk factors.

ModifiedByResource

Edm.String

true

The user who modified a risk.

ModifiedDate

Edm.DateTime

true

The date and time when a risk was modified.

NumberOfAttachments

Edm.Int32

true

The number of attachments for a risk.

Owner

Edm.String

true

The owner of a risk.

Probability

Edm.Double

true

The percent probability that a risk will happen.

ProjectId

Edm.Guid

false

Key
The GUID that identifies a project with a risk.

ProjectName

Edm.String

true

The name of the associated project.

RiskId

Edm.Guid

false

Key
The GUID of a risk.

Status

Edm.String

true

The status of a risk.

Title

Edm.String

true

The title or name of a risk.

TriggerDescription

Edm.String

true

The description of the trigger that causes a risk.

TriggerTask

Edm.String

true

The condition that triggers the contingency plan (for example, date, exposure over threshold, tasks not completed, or other user-assigned values).

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

There are two types of Relationship attributes. One type contains 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 Project navigation property, the primary type is Project, and the secondary type is Risk. For this type of navigation, the FromRole is Project_Risks, and the ToRole is Risk_Project.

The other type of Relationship attribute contains a single pair of names. The first name in the pair is the primary type in the navigation. The second name in the pair is the secondary type in the navigation. For example, in the Project navigation property relationship, Project_Risks is the primary type and Risk_Project is the secondary type.

Attribute values for the NavigationProperty elements

Name

Relationship

Description

Project

Project_Risks_Risk_Project

Relates a project to a collection of risks and a risk to a project.

RelatedIssues

Issue_RelatedRisks_Risk_RelatedIssues

Relates a collection of issues to related risks and a collection of risks to related issues.

SubRisks

Risk_Subrisks

Relates a collection of risks to a subrisk.

Tasks

Risk_Tasks_Task_Risks

Relates the collection of tasks associated with a risk to the collection of risks associated with a task.

See also

Reference

Risks

ReportingData

Concepts

Querying OData feeds for Project 2013 reporting data