CLI Reference > Workflows and Documents Commands > im settimeentries
  
im settimeentries
creates, edits, or deletes time entries
Synopsis
im settimeentries [--actionDefinition=value] [--actionDefinitionFile=value] [--[no]processBatch] [--port=value] [--password=value] [--user=value] [(-?|--usage)] [(-g|--gui)] [(-F file|--selectionFile=file)] [(-N|--no)] [(-Y|--yes)] [--[no]batch] [--cwd=directory] [--forceConfirm=[yes|no]]
Description
Once an issue has been created and assigned to you, you can record time spent working on the issue by creating a time entry. A time entry records the duration of time spent working on the issue in hours for a specific day, and, optionally, any relevant notes.
If you have the TimeTrackingAdmin permission assigned to you, you can also create time entries on the behalf of other users. This is useful if your organization has a designated role for entering employee time entries.
You can also edit existing time entries to correct durations and notes, and delete time entries.
To create a time entry, note the following:
Typically, you create a time entry for an issue assigned to you; however, you can create a time entry for any issue that you have visibility to.
Your administrator configures which states allow the creation of time entries.
The issue type must allow time entries. Your administrator configures which types allow time entries.
To edit or delete a time entry, note the following:
Typically, you edit or delete a time entry for an issue assigned to you; however, you can edit or delete a time entry for any issue that you have visibility to.
Your administrator configures which states allow the editing or deletion of time entries.
The time entry must be created by you, or you must have the TimeTrackingAdmin permission assigned to you.
Options
This command takes the universal options available to all im commands, as well as some general options. See the options reference page for descriptions.
--actionDefinition=value
specifies a set of time entry actions to perform using XML tags.
Note the following:
For create, edit, and delete operations, each time entry consists of the issue ID, user, entry date, and source. If these values are not specified, the source defaults to the built-in “Windchill RV&S” source.
If the duration or notes are not included in the operation, existing values are ignored. If these values are included and empty, the value in the corresponding time entry is cleared.
Durationvalues can be any positive floating point number or 0.
Notes values can be any amount of text or an empty string.
Time entry actions are performed on the Windchill RV&S Server in the order they are written in the XML file. Errors occur if you attempt to edit or delete a time entry that does not exist (either created earlier in the XML file or in a previous command invocation).
The following filters can be specified in a delete all time entries operation: issue:ID, user:user name, fromDate:date, toDate:date, source:source name.
Dates are locale specific; the format you specify appears when you view the time entry. For example, if you are in Japan and you specify yyyy/MM/dd, the same date format displays when you view the time entry.
To create a time entry, type the following:
<ActionList>
<Create issueId="issue ID" user="user name" entryDate="date">
<Duration>hours</Duration>
<Notes>text string</Notes>
</Create>
</ActionList>
To edit a time entry, type the following:
<ActionList>
<Edit issueId="issue ID" user="user name" entryDate="date">
<Duration>hours</Duration>
<Notes>text string</Notes>
</Edit>
</ActionList>
To delete a time entry, type the following:
<ActionList>
<Delete issueId="issue ID" user="user name" entryDate="date"/>
</ActionList>
* 
This operation requires theTimeTrackingAdmin permission.
<ActionList>
<DeleteAll issueId="issue ID" filter="value"/>
</ActionList>
To perform multiple time entry actions, specify additional create, edit, or delete time entry tags within the <ActionList></ActionList> tags, for example:
<ActionList>
<Create issueId="50546" user="jriley" entryDate="7/25/2005" source="mks_integrity">
<Duration>6.5</Duration>
<Notes>finished print feature</Notes>
</Create>
<Create issueId="50546" user="jriley" entryDate="7/25/2005">
<Duration>6</Duration>
<Notes>sent out for code review</Notes>
</Create>
<Delete issueId="50545" user="user2" entryDate="7/25/2005"/>
<DeleteAll issueId="issue ID" user="jriley" toDate="7/28/2006"/>
<Edit issueId="50545" user="jriley" entryDate="7/25/2005">
<Duration>10.5</Duration>
<Notes>worked overtime</Notes>
</Edit>
<Edit issueId="50546" user="jriley" entryDate="7/25/2005">
<Duration>8.5</Duration>
<Notes></Notes>
</Edit>
</ActionList>
--actionDefinitionFile=value
specifies a file containing the XML time entry actions to perform. See --actionDefinition=value for the file format.
--[no]processBatch
specifies whether to submit the time entry actions as a batch operation.
See Also
Commands: im timeentries
Miscellaneous: options