Expand Minimize
This topic has not yet been rated - Rate this topic

EntityType element: Timesheet (ProjectServerData service)

Office 2013

Published: July 16, 2012

The Timesheet entity type specifies the set of properties, including navigation properties, that define the reporting data that is available for a timesheet in the ProjectData service.

<EntityType Name="Timesheet">
  <Key>
    <PropertyRef Name="TimesheetId" />
  </Key>
  <Property Name="TimesheetId" Type="Edm.Guid" Nullable="false" />
  . . .
  <NavigationProperty Name="Lines" Relationship="ReportingData.TimesheetLine_Timesheet_Timesheet_Lines" ToRole="TimesheetLine_Timesheet" FromRole="Timesheet_Lines" />
  . . .
</EntityType>

Element

Description

Schema element: ReportingData

The schema for the reporting data in the ProjectData service.

Child elements are properties of a timesheet and navigation properties of that timesheet. 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 lines and periods, that are associated with a timesheet. A navigation property uses an Association element in a query for a related entity collection

The Key element specifies the property that is the primary key for a timesheet query. TimesheetId is the GUID of the timesheet.

Property elements

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

Attribute values for the Property elements of Timesheet

Name

Type

Nullable

Description

Comment

Edm.String

true

The text comment for the timesheet.

Description

Edm.String

true

The text field for the timesheet description.

EndDate

Edm.DateTime

false

The end date and time for the timesheet.

ModifiedDate

Edm.DateTime

false

The date and time that the timesheet was last modified.

PeriodId

Edm.Guid

false

The GUID for the timesheet period.

PeriodName

Edm.String

true

The name of the timesheet period.

PeriodStatusId

Edm.Byte

false

The status identifier of the timesheet period (open, closed, or all periods).

StartDate

Edm.DateTime

false

The start date and time of the timesheet.

StatusDescription

Edm.String

true

The description of the timesheet status (for example, Approved).

TimesheetId

Edm.Guid

false

The GUID of the timesheet.

TimesheetName

Edm.String

true

The name of the timesheet.

TimesheetOwner

Edm.String

true

The owner of the timesheet.

TimesheetOwnerId

Edm.Guid

false

The GUID of the owner of the timesheet.

TimesheetStatusId

Edm.Byte

false

The numerical value that represents the status of the timesheet (Progress=0, Submitted=1, Acceptable=2, Approved=3, and Rejected=4).

NavigationProperty elements

The following table lists attribute values for the NavigationProperty elements of the Timesheet 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 Lines navigation property, the primary type is TimesheetLine, and the secondary type is Timesheet. For this type of navigation, the FromRole is TimesheetLine_Timesheet, and the ToRole is Timesheet_Lines.

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

Attribute values for the NavigationProperty elements

Name

Relationship

Description

Lines

Association element: TimesheetLine_Timesheet_Timesheet_Lines

Establishes navigation from a collection of timesheet lines to a timesheet and from a timesheet to a timesheet line.

Periods

Association element: Timesheet_Periods

Establishes navigation from a collection of timesheets to a timesheet time period.

The following REST query uses the Timesheets entity set to get the collection of timesheets in ProjectData.

http://ServerName/ProjectServerName/_api/ProjectData/Timesheets

Reference

Other resources

Association element: Timesheet_Lines

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.