AssignmentModelMixin

Properties

5

Class hierarchy

isAssignmentModelMixin: Boolean= truereadonly
Identifies an object as an instance of AssignmentModelMixin class, or subclass thereof.
isAssignmentModelMixin: Boolean= truereadonlystatic
Identifies an object as an instance of AssignmentModelMixin class, or subclass thereof.

Other

eventName: Stringreadonly

Convenience property to get the name of the associated event.

isPersistable: Booleanreadonly

Returns true if the Assignment can be persisted (e.g. task and resource are not 'phantoms').

Note that when using single assignments, assignments are not persisted.

resourceName: Stringreadonly

Convenience property to get the name of the associated resource.

Functions

3

Editing

Set value for the specified field(s), triggering engine calculations immediately. See Model#set() for arguments.

assignment.set('resourceId', 2);
// assignment.resource is not yet resolved

await assignment.setAsync('resourceId', 2);
// assignment.resource is resolved
ParameterTypeDescription
fieldString | Object

The field to set value for, or an object with multiple values to set in one call

value*

Value to set

silentBoolean

Set to true to not trigger events automatically.

Other

Returns the resource associated with this assignment.

Returns: ResourceModel -

Instance of resource

Returns a textual representation of this assignment (e.g. Mike 50%).

Returns: String

Fields

3

Specify false to opt out of drawing dependencies from/to this assignment

eventId: String | Number

Id for the event to assign

resourceId: String | Number

Id for the resource to assign to