createTimeEntry Mutation
Logs time into one day cell of a Timesheet row (a TimeItem).
Pass timeItemId (the parent row), date (the day the time
applies to), and seconds (time is stored in seconds; the UI
renders hours and minutes). With planned: true the value is
stored as planned effort (plannedSeconds); otherwise as actual
time worked (seconds). A day cell can carry both tracks
independently.
A row has one TimeEntry per day. The first call for a day creates
it; later calls for the same day add their seconds to it, and a
planned value replaces the day's plan. With externalId (the
sender's own id for these hours, for example a Jira work log id),
hours sent again with the same id replace what that id sent
before instead of adding to it. To change a logged value directly,
use updateTimeEntry; setting it to 0 removes the hours.
Without userId the parent row must belong to the calling user.
Pass userId to log time on another user's row; the caller must be
that user (with view access to the Todo on a Todo row), someone
with update permission on the Project (Project Admin, Stack Admin, or
Workspace Admin) on a Todo or Project row, or an admin of the
organization on a Non-Project Activity row. Returns the day's TimeEntry; unauthorized calls fail with
not_allowed.
Arguments
#
date
externalId
Your own id for these hours, for example a Jira work log id. Hours sent again with the same id on the same row replace the earlier hours instead of adding to them; a new id adds hours. Without it, hours are always added. After the day's hours are changed in Pie, a resent id adds only the difference from what it sent before, so a correction made in Pie is kept.
seconds
timeItemId
userEmail
Email address of the timesheet owner, instead of userId. With an organization access token it must belong to a member of the token's organization.
Response
#
Returns TimeEntry .
Example
#
createTextTag
