Table of contents
API
TOC
Collapse the table of content
Expand the table of content

DraftTask class

Nadin Merali|Last Updated: 5/6/2017

inherits members from Task

Represents a task in a checked-out project.

Syntax

CSOM

class DraftTask 

JSOM

PS.DraftTask

REST Interface

This resource supports GET, POST, PUT, PATCH, MERGE, and DELETE HTTP commands.

PS.DraftTask

http://contoso.sharepoint.com/sites/pwa/api/ProjectServer/Projects('{projectid}')/Draft/Tasks('{taskid}')

Members

✓ - Read Support       ✓ʷ - Write Support

Properties

Name.NETJSOMRESTTypeDescription
[]✓ʷDictionary<string, Object>Gets or sets an item in the draft task.
ActualCost✓ʷ✓ʷ✓ʷDoubleGets or set costs incurred for work already performed on a task, together with any other recorded costs that are associated with a task.
ActualFinish✓ʷ✓ʷ✓ʷDateTimeGets or sets a date and time when a task is complete.
ActualStart✓ʷ✓ʷ✓ʷDateTimeGets or sets a date and time that a task actually began, based on progress information that has been entered.
ActualWork✓ʷ✓ʷ✓ʷStringGets or sets the amount of work that has already been performed on a task.
ActualWorkMilliseconds✓ʷ✓ʷIntegerGets or sets the time interval, expressed in milliseconds, for the amount of work that has already been performed on a task.
ActualWorkTimeSpan✓ʷ✓ʷTimeSpanGets or sets the time interval for the amount of work that has already been performed on a task.
AddAfterIdGuidId of the task that immediately precedes the current task.
AssignmentsDraftAssignmentCollectionGets the assignments for a task.
BudgetWork✓ʷ✓ʷ✓ʷStringGets or sets the amount of work that is estimated to be performed on a task.
BudgetWorkMilliseconds✓ʷ✓ʷIntegerGets or sets the time interval, expressed in milliseconds, for the amount of work that is estimated to be performed on a task.
BudgetWorkTimeSpan✓ʷ✓ʷTimeSpanGets or sets the time interval for the amount of work that is estimated to be performed on a task.
Calendar✓ʷ✓ʷ✓ʷCalendarGets or sets the task calendar.
Completion✓ʷ✓ʷ✓ʷDateTimeGets or sets a completion date for a task.
ConstraintStartEnd✓ʷ✓ʷ✓ʷDateTimeGets or sets a constraint start date or end date for a task.
ConstraintType✓ʷ✓ʷ✓ʷConstraintTypeGets or sets the time constraint type for a task.
Cost✓ʷ✓ʷ✓ʷDoubleGets or sets the total scheduled or projected cost based on costs already incurred for work performed on a task, in addition to the costs planned for the remaining work.
Deadline✓ʷ✓ʷ✓ʷDateTimeGets or sets the date that was entered as a deadline for a task.
Duration✓ʷ✓ʷ✓ʷStringGets or sets the amount of time that it takes to complete a task.
DurationMilliseconds✓ʷ✓ʷIntegerGets or sets the time interval, expressed in milliseconds, for the amount of time that it takes to complete a task.
DurationTimeSpan✓ʷ✓ʷTimeSpanGets or sets the time interval for the amount of time that it takes to complete a task.
FieldValuesDictionary<string, Object>Gets the collection of custom fields that have values set for the draft task.
Finish✓ʷ✓ʷ✓ʷDateTimeGets or sets a task finish date.
FinishText✓ʷ✓ʷ✓ʷStringGets or sets a string representation of the task finish date.
FixedCost✓ʷ✓ʷ✓ʷDoubleGets or sets any non-resource task expense.
IsActive✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether a task is active.
IsLockedByManager✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether a task has been locked for changes by a manager.
IsManual✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether a task is manually scheduled.
IsMarked✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether a task has been marked as having special meaning.
IsMilestone✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether a task is a milestone.
Item✓ʷDictionary<string, Object>Gets or sets an item in the draft task.
LevelingAdjustsAssignments✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether leveling can delay or split assignments (rather than the task itself) to resolve overallocations.
LevelingCanSplit✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether leveling can interrupt and split a task.
Name✓ʷ✓ʷ✓ʷStringGets or sets the name of a task.
OutlineLevel✓ʷ✓ʷ✓ʷIntegerGets or sets the task outline level in a hierarchical task list.
ParentDraftTaskGets the parent task.
ParentIdGuidGets the Guid of the parent task in a hierarchical task list.
PercentComplete✓ʷ✓ʷ✓ʷIntegerGets or sets the percent of duration completed on a task.
PercentPhysicalWorkComplete✓ʷ✓ʷ✓ʷIntegerGets or sets the percentage of physical work completed on a task.
PredecessorsDraftTaskLinkCollectionGets the links to the predecessor tasks that the current task depends on.
Priority✓ʷ✓ʷ✓ʷIntegerGets or sets the task priority.
RemainingDuration✓ʷ✓ʷ✓ʷStringGets or sets the remaining task duration.
RemainingDurationMilliseconds✓ʷ✓ʷIntegerGets or sets the time interval, expressed in milliseconds, for the remaining task duration.
RemainingDurationTimeSpan✓ʷ✓ʷTimeSpanGets or sets the time interval for the remaining task duration.
Start✓ʷ✓ʷ✓ʷDateTimeGets or sets the task start date.
StartText✓ʷ✓ʷ✓ʷStringGets or sets a string representation of the task start date.
StatusManager✓ʷ✓ʷ✓ʷSPUserGets or sets the task status manager.
SuccessorsDraftTaskLinkCollectionGets links to tasks that depend on the current task.
TaskType✓ʷ✓ʷ✓ʷTaskTypeGets or sets the task type.
UsePercentPhysicalWorkComplete✓ʷ✓ʷ✓ʷBooleanGets or sets a value that indicates whether to use PercentPhysicalWorkComplete orPercentComplete to compute earned value.
Work✓ʷ✓ʷ✓ʷStringGets or sets the total time scheduled for a task.
WorkMilliseconds✓ʷ✓ʷIntegerGets or sets the time interval, expressed in milliseconds, for the total time scheduled for a task.
WorkTimeSpan✓ʷ✓ʷTimeSpanGets or sets the time interval for the total time scheduled for a task.

Methods

Name.NETJSOMRESTReturn TypeDescription
DeleteObject()voidDeletes the draft task object.
SetCustomFieldValue(String fieldName, Object value)voidSets a custom field on the draft task.


Method Details

DeleteObject()

Deletes the draft task object.

Syntax
void DeleteObject()
Parameters

None

Return Value

void

SetCustomFieldValue(String fieldName, Object value)

Sets a custom field on the draft task.

Syntax
void SetCustomFieldValue(String fieldName, Object value)
Parameters
NameTypeDescription
fieldNameStringThe InternalName of the custom field to update.
valueObjectNew value of the custom field.
Return Value

void

See Also

DraftAssignment
DraftTaskCollection
DraftTaskLink
SPUser
TaskCreationInformation

© 2018 Microsoft