Magidoc

updateGoal
Mutation

Updates a Hive goal. Display progress supports null, number, or actions measurements; display number also supports overdue; display status requires status measurement. Actions or overdue use actions/projects units, number uses currency/custom/percentage, and status uses subGoals. Unit values and symbols follow createGoal's rules. Ongoing, recurring, and fixed date-range modes are mutually exclusive; a fixed range requires startDate before endDate. Action and project IDs require their corresponding unit.

Arguments

#

_id

ID !
Non-null

Goal ID to update

name

Goal name (cannot be empty string if provided)

initialValue

Initial numeric value

currentValue

Current numeric value

currentValueDate

Reporting timestamp for currentValue; requires currentValue. Omit to record the update time.

historicalValues

Up to 100 dated values for a manual number goal. Corrects the same goal/timestamp without changing currentValue; recorded-at audit metadata is retained.

goalValue

Target numeric value

actionIds

[ID !]

Action IDs to track (requires measurementType actions/overdue + measurementUnit actions + measurementUnitValue 'actions')

addActionIds

[ID !]

Action IDs to add while preserving concurrent links through a guarded save (same measurement requirements as actionIds)

removeActionIds

[ID !]

Action IDs to remove while preserving other concurrent links through a guarded save

includeSubActions

Whether to include sub-actions in tracking

projectIds

[ID !]

Project IDs to track (requires measurementType actions/overdue + measurementUnit projects + measurementUnitValue 'projects')

associatedProjectIds

[ID !]

Project IDs associated with the goal for dashboard/reporting filters (not measurement; independent of projectIds)

parentId

Parent goal ID

description

Goal description in HTML format

owners

[ID !]

User IDs who own this goal

teamOwners

[ID !]

Team IDs who own this goal

startDate

Start date (requires endDate, cannot combine with ongoingDate/recurringDate)

endDate

End date (must be after startDate, cannot combine with ongoingDate/recurringDate)

ongoingDate

Whether goal is ongoing (cannot combine with recurringDate or dates)

recurringDate

Recurring schedule (cannot combine with ongoingDate or dates)

includeSubGoals

Whether to include sub-goals

status

Goal status

statusDetails

Status details/notes

measurementType

How goal value is measured - affects which measurementUnit values are valid

measurementUnit

Unit for measurement - must match measurementType rules

measurementUnitValue

Specific value for unit - must match measurementUnit (e.g., 'USD', 'actions', 'projects')

measurementUnitSymbol

Symbol for unit - must match measurementUnitValue (e.g., '$', '%')

displayType

How goal is displayed - must match measurementType rules

isFixedLimit

Whether this number goal uses a fixed limit instead of expected progress by today.

isHigherBetter

Whether higher values are healthier for a fixed-limit goal.

statusWarningValue

Boundary above or below the fixed goal value. Values between them are at risk, including both boundaries.

statusUpdateMode

Status update mode

statusUpdateRange

Status update range rules

rankInput

Ranking input for goal positioning

recurringUpdateReminder

Recurring update reminder settings

sharingType

Who can access this goal

sharingWith

[ID !]

User IDs to share with (only valid when sharingType is custom)

sourceWidgetId

PivotNumbers widget backing automated currentValue updates; pass null to clear

expectedSourceWidgetId

Source observed by the editor; when supplied, reject a source change if it no longer matches. Null means no source.

expectedCurrentValueRevision

Reject a linked manual override if a current-value write occurred since this observed revision. Null or omission disables the client-revision check; legacy goals use zero.

workspaceId

When passed, the goal must belong to this workspace

Response

#

Returns Goal .

Example

#