v7.3.0
SupportExamplesFree Trial

TimePhasedProjectModel

The class extends the default ProjectModel with time-phased assignments support. It changes the default related models to TimePhasedTaskModel for tasks and TimePhasedAssignmentModel for assignments.

No results

Fields

Fields belong to a Model class and define the Model data structure
  • true to enable automatic % done calculation for summary tasks, false to disable it.

  • When true (default) adjacent or overlapping task segments get merged automatically.

  • Deprecated:

    Please use autoPostponeConflicts field name.

    If this field is set to true scheduling conflicts will not show the conflict resolution popup but instead will be saved into tasks postponedConflict field.

  • The project calendar.

  • dependenciesCalendar : 'ToEvent'/'FromEvent'/'Project'/'AllWorking''ToEvent'
    ProjectModel

    The source of the calendar for dependencies (the calendar used for taking dependencies lag into account). Possible values are:

    • ToEvent - successor calendar will be used (default);
    • FromEvent - predecessor calendar will be used;
    • Project - the project calendar will be used.
    • AllWorking - the project 24/7 elapsed calendar will be used.
  • Description of the project

  • Name of the project

  • Specifies how started tasks are scheduled. Possible values are:

    • Auto - (default) tasks are scheduled regardless of whether they are started or not
    • Manual - started tasks preserve their current positions ignoring their dependencies The rationale behind this is a started task implies its start date is already established and thus should not be calculated dynamically.
  • Start expanded or not (only valid for tree data)

  • This is a read-only field provided in server synchronization packets to specify which position the node takes in the parent's ordered children array. This index is set on load and gets updated on reordering nodes in tree. Sorting and filtering have no effect on it.

  • Deprecated:

    This field has been deprecated. Please read the guide to find out if your app needs to use the new isFullyLoaded field.

    This field is added to the class at runtime when the Store is configured with lazyLoad. The number specified should reflect the total amount of children of a parent node, including nested descendants.

Configs

Configs are options you supply in a configuration object when creating an instance of this class
  • Set to true to reset the undo/redo queues of the internal StateTrackingManager after the Project has loaded. Defaults to false

  • Configuration options to provide to the STM manager

    Has a corresponding runtime stm property.

  • true to automatically persist store changes after edits are made in any of the stores monitored. Please note that sync request will not be invoked immediately but only after autoSyncTimeout interval.

  • The timeout in milliseconds to wait before persisting changes to the server. Used when autoSync is set to true.

  • Configuration of the JSON encoder used by the Crud Manager.

    • requestData : Object

      Static data to send with the data request.

      new CrudManager({
          // add static "foo" property to all requests data
          encoder : {
              requestData : {
                  foo : 'Bar'
              }
          },
          ...
      });
      

      The above snippet will result adding "foo" property to all requests data:

          {
              "requestId"   : 756,
              "type"        : "load",
      
              "foo"         : "Bar",
      
              "stores"      : [
                  ...
      
  • Specify as true to force sync requests to be sent when calling sync(), even if there are no local changes. Useful in a polling scenario, to keep client up to date with the backend.

    Has a corresponding runtime forceSync property.

  • Set to true to make STM ignore changes coming from the backend. This will allow user to only undo redo local changes.

    Has a corresponding runtime ignoreRemoteChangesInSTM property.

  • Field name to be used to transfer a phantom record identifier.

  • Field name to be used to transfer a phantom parent record identifier.

  • True to reset identifiers (defined by idField config) of phantom records before submitting them to the server.

  • When true treats parsed responses without success property as successful. In this mode a parsed response is treated as invalid if it has explicitly set success : false.

  • If true, project changes API will also report project model changes: start/end date, calendar, effort, duration, etc.

    Has a corresponding runtime trackProjectModelChanges property.

  • When true forces the CRUD manager to process responses depending on their type attribute. So load request may be responded with sync response for example. Can be used for smart server logic allowing the server to decide when it's better to respond with a complete data set (load response) or it's enough to return just a delta (sync response).

  • true to write all fields from the record to the server. If set to false it will only send the fields that were modified. Note that any fields that have persist set to false will still be ignored and fields having alwaysWrite set to true will always be included.

  • Internal listeners, that cannot be removed by the user.

  • Data use to fill the assignmentStore. Should be an array of AssignmentModels or its configuration objects.

    Has a corresponding runtime assignments property.

  • Data use to fill the calendarManagerStore. Should be a CalendarModel array or its configuration objects.

    Has a corresponding runtime calendars property.

  • Data use to fill the dependencyStore. Should be an array of DependencyModels or its configuration objects.

    Has a corresponding runtime dependencies property.

  • Data use to fill the resourceStore. Should be an array of ResourceModels or its configuration objects.

    Has a corresponding runtime resources property.

  • Data use to fill the taskStore. Should be an array of TaskModels or its configuration objects.

    Has a corresponding runtime tasks property.

  • Data use to fill the timeRangeStore. Should be an array of TimeRangeModels or its configuration objects.

    Has a corresponding runtime timeRanges property.

  • The number of Resource records each page should contain, when using remotePaging

  • Deprecated:

    6.3.0 Use assignments instead

    The initial data, to fill the assignmentStore with. Should be an array of AssignmentModels or configuration objects.

  • Deprecated:

    6.3.0 Use calendars instead

    The initial data, to fill the calendarManagerStore with. Should be an array of CalendarModels or configuration objects.

  • Deprecated:

    6.3.0 Use dependencies instead

    The initial data, to fill the dependencyStore with. Should be an array of DependencyModels or configuration objects.

  • Deprecated:

    6.3.0 Use tasks instead

    Alias to tasksData.

  • Deprecated:

    6.3.0 This config will be removed when the eventsData, resourcesData etc. properties are removed in a future release.

    Whether to include legacy data properties in the JSON / inlineData output. The legacy data properties are the xxData (eventsData, resourcesData etc.) properties that are deprecated and will be removed in the future.

    Has a corresponding runtime includeLegacyDataProperties property.

  • Deprecated:

    6.3.0 Use resources instead

    The initial data, to fill the resourceStore with. Should be an array of ResourceModels or configuration objects.

  • Deprecated:

    6.3.0 Use tasks instead

    The initial data, to fill the taskStore with. Should be an array of TaskModels or configuration objects.

  • Deprecated:

    6.3.0 Use timeRanges instead

    The initial data, to fill the timeRangeStore with. Should be an array of TimeRangeModels or configuration objects.

  • The constructor of the assignment model class, to be used in the project. Will be set as the modelClass property of the assignmentStore

  • An AssignmentStore instance or a config object.

    Has a corresponding runtime assignmentStore property.

  • The constructor to create a dependency store instance with. Should be a class, subclassing the AssignmentStore

  • A CalendarManagerStore instance or a config object.

    Has a corresponding runtime calendarManagerStore property.

  • The constructor to create a calendar store instance with. Should be a class, subclassing the CalendarManagerStore

  • The constructor of the calendar model class, to be used in the project. Will be set as the modelClass property of the calendarManagerStore

  • The constructor of the dependency model class, to be used in the project. Will be set as the modelClass property of the dependencyStore

  • A DependencyStore instance or a config object.

    Has a corresponding runtime dependencyStore property.

  • The constructor to create a dependency store instance with. Should be a class, subclassing the DependencyStore

  • A TaskStore instance or a config object.

    Has a corresponding runtime eventStore property.

  • The constructor of the resource model class, to be used in the project. Will be set as the modelClass property of the resourceStore

  • A ResourceStore instance or a config object.

    Has a corresponding runtime resourceStore property.

  • The constructor to create a dependency store instance with. Should be a class, subclassing the ResourceStore

  • The constructor of the event model class, to be used in the project. Will be set as the modelClass property of the eventStore

  • An alias for the eventStore.

    Has a corresponding runtime taskStore property.

  • The constructor to create an task store instance with. Should be a class, subclassing the TaskStore

  • Store that holds time ranges - instances of TimeRangeModel for the TimeRanges feature. A store will be automatically created if none is specified.

    Has a corresponding runtime timeRangeStore property.

  • Deprecated:

    The flag is added as a temporary solution and is going to be removed in a next release. Please contact us if you need that old behavior.

    Enables backward compatible conflicts postponing logic covering only conflicts between a task constraint and its incoming dependencies.

  • The project calendar.

Properties

Properties are getters/setters or publicly accessible variables on this class
  • Identifies an object as an instance of AbstractCrudManagerMixin class, or subclass thereof.
  • Identifies an object as an instance of AbstractCrudManagerValidation class, or subclass thereof.
  • isAjaxTransport : Booleantrue
    READONLY
    static
    ADVANCED
    AjaxTransport
    Identifies an object as an instance of AjaxTransport class, or subclass thereof.
  • isDelayable : Booleantrue
    READONLY
    static
    ADVANCED
    Delayable
    Identifies an object as an instance of Delayable class, or subclass thereof.
  • isEvents : Booleantrue
    READONLY
    static
    ADVANCED
    Events
    Identifies an object as an instance of Events class, or subclass thereof.
  • isJsonEncoder : Booleantrue
    READONLY
    static
    ADVANCED
    JsonEncoder
    Identifies an object as an instance of JsonEncoder class, or subclass thereof.
  • isLazyLoadCrudManager : Booleantrue
    READONLY
    static
    ADVANCED
    LazyLoadCrudManager
    Identifies an object as an instance of LazyLoadCrudManager class, or subclass thereof.
  • isModelStm : Booleantrue
    READONLY
    static
    ADVANCED
    ModelStm
    Identifies an object as an instance of ModelStm class, or subclass thereof.
  • Identifies an object as an instance of ProjectChangeHandlerMixin class, or subclass thereof.
  • isProjectCrudManager : Booleantrue
    READONLY
    static
    ADVANCED
    ProjectCrudManager
    Identifies an object as an instance of ProjectCrudManager class, or subclass thereof.
  • isProjectModelCommon : Booleantrue
    READONLY
    static
    ADVANCED
    ProjectModelCommon
    Identifies an object as an instance of ProjectModelCommon class, or subclass thereof.
  • Identifies an object as an instance of ProjectModelTimeZoneMixin class, or subclass thereof.
  • Identifies an object as an instance of ProjectRevisionHandlerMixin class, or subclass thereof.
  • isTimePhasedProjectModel : Booleantrue
    READONLY
    static
    ADVANCED
    Identifies an object as an instance of TimePhasedProjectModel class, or subclass thereof.
  • isTreeNode : Booleantrue
    READONLY
    static
    ADVANCED
    TreeNode
    Identifies an object as an instance of TreeNode class, or subclass thereof.
  • properties : Object
    internal
    static
    ProjectModel

    A class property getter for the default values of internal properties for this class.

  • An array containing all the defined fields for this Model class. This will include all superclass's defined fields.

  • fieldMap : Object<String, DataField>
    READONLY
    static
    ProjectModel

    An object containing all the defined fields for this Model class. This will include all superclass's defined fields through its prototype chain. So be aware that Object.keys and Object.entries will only access this class's defined fields.

  • The data source for the id field which provides the ID of instances of this Model.

  • Returns the data from all CrudManager crudStores in a format that can be consumed by inlineData.

  • Enables/disables the calculation progress notifications.

    Has a corresponding enableProgressNotifications config.

  • emptyArray : Array
    internal
    READONLY
    ProjectModel

    An empty array that can be used as a default value.

  • emptyObject : Object
    internal
    READONLY
    ProjectModel

    An empty object that can be used as a default value.

  • The server revision stamp. The revision stamp is a number which should be incremented after each server-side change. This property reflects the current version of the data retrieved from the server and gets updated after each load and sync call.

  • A list of registered stores whose server communication will be collected into a single batch. Each store is represented by a store descriptor.

    Has a corresponding crudStores config.

  • Specify as true to force sync requests to be sent when calling sync(), even if there are no local changes. Useful in a polling scenario, to keep client up to date with the backend.

    Has a corresponding forceSync config.

  • Set to true to make STM ignore changes coming from the backend. This will allow user to only undo redo local changes.

    Has a corresponding ignoreRemoteChangesInSTM config.

  • Returns true if changes tracking is suspended

  • Returns true if the crud manager is currently loading data

  • Returns true if the crud manager is currently syncing data

  • Generates unique request identifier.

  • An array of stores presenting an alternative sync responses apply order. Each store is represented by a store descriptor.

    Has a corresponding syncApplySequence config.

  • If true, project changes API will also report project model changes: start/end date, calendar, effort, duration, etc.

    Has a corresponding trackProjectModelChanges config.

  • isModel : Booleantrue
    READONLY
    ADVANCED
    ProjectModel
    Identifies an object as an instance of Model class, or subclass thereof.
  • isProjectModel : Booleantrue
    READONLY
    ADVANCED
    ProjectModel
    Identifies an object as an instance of ProjectModel class, or subclass thereof.
  • isTimePhasedProjectModel : Booleantrue
    READONLY
    ADVANCED
    Identifies an object as an instance of TimePhasedProjectModel class, or subclass thereof.
  • For copied records, this property links to the original model instance from which it was copied.

  • True if this Model is currently batching its changes.

  • True if this models changes are currently being committed.

  • True if this model has any uncommitted changes.

  • Check if record has valid data. Default implementation returns true, override in your model to do actual validation.

  • Get a map of the modified fields in form of an object. The field´s dataSource is used as the property name in the returned object. The record's id is included unless its persist config is false.

  • Get a map of the modified data fields along with any alwaysWrite fields, in form of an object. The field´s dataSource is used as the property name in the returned object. Used internally by AjaxStore / CrudManager when sending updates.

  • persistableData : Object
    internal
    READONLY
    ProjectModel

    Returns data for allpersistable fields in form of an object, using dataSource if present.

  • Returns a map of the modified persistable fields

  • Returns the string value for display purposes of an instance of this Model class. Needs to be overridden in subclasses.

  • When called on a group header row returns list of records in that group. Returns undefined otherwise.

  • Returns true for a group header record

  • Gets the records internalId. It is assigned during creation, guaranteed to be globally unique among models.

  • Returns true if the record is new and has not been persisted (and received a proper id).

  • If set to true, or a config object, this makes the CrudManager load records only when needed. When a record or a date range that is not already loaded is requested, a load request will be made to the specified URL. More more details about lazy loading, see the guide

    Has a corresponding lazyLoad config.

  • Deprecated:

    6.3.0 This config will be removed when the eventsData, resourcesData etc. properties are removed in a future release.

    Whether to include legacy data properties in the JSON / inlineData output. The legacy data properties are the xxData (eventsData, resourcesData etc.) properties that are deprecated and will be removed in the future.

    Has a corresponding includeLegacyDataProperties config.

  • config : Object
    READONLY
    ADVANCED
    ProjectModel

    Returns a copy of the full configuration which was used to configure this object.

  • isConstructing : Boolean
    READONLY
    ADVANCED
    ProjectModel

    This property is set to true before the constructor returns.

  • isDestroying : Boolean
    READONLY
    ADVANCED
    ProjectModel

    This property is set to true on entry to the destroy method. It remains on the objects after returning from destroy(). If isDestroyed is true, this property will also be true, so there is no need to test for both (for example, comp.isDestroying || comp.isDestroyed).

  • Is this record linked to another record?

  • Get the original record this record is linked to.

  • Get the first store that this model is assigned to.

  • Reference to STM manager, if used

    Has a corresponding stm config.

  • This yields true if this record is eligible for syncing with the server. It can yield false if the record is in the middle of a batched update, or if it is a tentative record yet to be confirmed as a new addition.

  • isRemoved : Boolean
    internal
    READONLY
    ProjectModel

    Returns true if this record is not part of any store.

  • Retrieve all children, excluding filtered out nodes (by traversing sub nodes)

  • Retrieve all children, including filtered out nodes (by traversing sub nodes)

  • Depth in the tree at which this node exists. First visual level of nodes are at level 0, their direct children at level 1 and so on.

  • Count all children (including sub-children) for a node (in its `firstStore´)

  • Get the first child of this node

  • indexPath : Number[]
    private
    READONLY
    ProjectModel

    Returns index path to this node. This is the index of each node in the node path starting from the topmost parent. (only relevant when its part of a tree store).

  • Is a leaf node in a tree structure?

  • Returns true for parent nodes with children loaded (there might still be no children)

  • Is a parent node in a tree structure?

  • Returns true if this node is the root of the tree

  • Get the last child of this node

  • Get the next sibling of this node

  • parent : Model
    READONLY
    TreeNode

    This is a read-only property providing access to the parent node.

  • Get the previous sibling of this node

  • Returns count of all preceding sibling nodes (including their children).

  • Array of tree nodes without any filter applied. On first filter, will take order from sorted children, but is not thereafter kept in sorted order, so order should not be relied upon.

  • Count visible (expanded) children (including sub-children) for a node (in its firstStore)

  • Returns values of the persistable tree-defining fields: parentId, orderedParentIndex, and parentIndex or sparseIndex. parentIndex is omitted when sparseIndex is used.

Functions

Functions are methods available for calling on the class
  • onClassMixedIn( )
    internal
    static
    ProjectModel

    This optional class method is called when a class is mixed in using the mixin() method.

  • initClass( )
    static
    ADVANCED
    ProjectModel

    Registers this class type with its Factory

  • exposeRelations( )
    internal
    static
    ProjectModel

    Makes getters and setters for related records. Populates a Model#relation array with the relations, to allow it to be modified later when assigning stores.

  • Accepts all changes in all stores, resets the modification tracking:

    • Clears change tracking for all records
    • Clears added
    • Clears modified
    • Clears removed Leaves the store in an "unmodified" state.
  • Reverts all changes in all stores and re-inserts any records that were removed locally. Any new uncommitted records will be removed.

  • Suspends automatic sync upon store changes. Can be called multiple times (it uses an internal counter).

  • Suspends hasChanges and noChanges events.

  • Cancels current batch operation. Any changes during the batch are discarded.

  • Internal function used to hook destroy() calls when using thisObj

  • Internal function used restore hooked destroy() calls when using thisObj

  • doDestroy( )
    internal
    Events

    Auto detaches listeners registered from start, if set as detachable

  • once( )
    private
    Events

    Internal function used to run a callback function after an event is triggered

  • Removes all listeners registered to this object by the application.

  • Called from insertChild to notify StateTrackingManager about children insertion. Provides it with all necessary context information collected in beforeInsertChild required to undo/redo the action.

  • Called from removeChild to notify StateTrackingManager about children removing. Provides it with all necessary context information collected in beforeRemoveChild required to undo/redo the action.

  • Called during creation to also turn any children into Models joined to the same stores as this model

  • Initializes model relations. Called from store when adding a record.

  • propagate( )
    ASYNC
    PROPAGATING
    ProjectModel

    Causes the scheduling engine to re-evaluate the task data and all associated data and constraints and apply necessary changes.

  • Suspend propagation processing. When propagation is suspended, calls to propagate do not proceed, instead a propagate call is deferred until a matching resumePropagate is called.

  • clear( )
    private
    TreeNode

    Removes all records from the rootNode

Events

Events are triggered for certain actions in this class and can be listened for to react to those actions in your code

Event handlers

Event handlers are callbacks called as a result of certain actions in this class