Private
categoryPrivate
creationPrivate
dirtyPrivate
downPrivate
fieldPrivate
fieldPrivate
historyPrivate
idPrivate
isPrivate
labelsPrivate
maxPrivate
titleProtected
toPrivate
typePrivate
upAdd a new downlink to the item. Does nothing if the item is already represented
the id of the item to add.
Optional
title: stringoptional. The title is just for convenience. It is neither saved nor representative of the actual title of the item.
the Item
Error if the passed id matches the id of the current item.
Private
addOptional
title: stringAdd a new uplink to the item. Does nothing if the item is already represented
the id of the item to add.
Optional
title: stringoptional. The title is just for convenience. It is neither saved nor representative of the actual title of the item.
the Item
Error if the passed id matches the id of the current item.
Create a Todo attached to this item.
an array of user names
A comma-separated list of Todo ids (integers), relative to the Item.
Sometimes you've been given an Item with a restrictive ItemFieldMask, however, you'd like to set a value for a field that was not in the mask. With this method, you can expand the field mask to include the field given by the fieldId (easily obtained from the Category object).
This field will be added to the mask, and the associated Field object will be returned with an empty value, which you could set. The object will be marked as "dirty" at this point, because we don't know if the server has an empty value for this field or not, so we assume the pessimistic case.
a valid fieldId from the Category of the item.
the Field object
if the fieldId is already in the ItemFieldMask, or if the fieldId is not valid for the Category.
Return any downlinks.
An array of downlinks (may be undefined)
Returns all fields within the mask which match the fieldName.
an array of Fields. Note that if the mask has limited the set of fields from the Category which are tracked for this particular item, the number of returned Field objects may be less than you expect.
Returns all fields within the mask which match the fieldType.
an array of Fields. Note that if the mask has limited the set of fields from the Category which are tracked for this particular item, the number of returned Field objects may be less than you expect.
Return the history for an item, if present.
an IItemHistory array
Return the Todos associated with this item.
Optional
includeDone: booleanif true, includes done todos
Optional
includeAllUsers: booleanif true, includes all todos for all users.
Optional
includeFuture: booleanfalse by default. If true, includes future todos.
Information on the Todos
Return any uplinks.
An array of uplinks (may be undefined)
In case the Item is masked (hasAllFields() returns false), one or more Fields may not be tracked. hasFieldId() allows you to check if the field is present.
a valid field id within the Category
true if the Item's mask allows for this field.
Error if fieldId is not valid within the Category
Private
hasPrivate
isPrivate
labelsPrivate
removePrivate
setInitializes the data fields for the item from an IItemGet structure
Optional
item: IItemGetPrivate
setReplace the current array of downlinks with a new one.
the Item itself
Replace the current array of uplinks with a new one.
the Item itself
Private
stringPrivate
verifyGenerated using TypeDoc
An Item represents a database item. Every Item must have at least a category. If it has an id, then it was retrieved from the database and may be altered and later saved (use needsSave() to determine if the Item needs saving). If it doesn't have an id, it needs to be saved. When an item is saved, it's data is re-initialized from the database.