The XOG output error is:
XOG-2028: Cannot create new time sheet because one already exists for resource: 'resid_example' in timeperiod : 2017-09-25T00:00:00.0
When trying to insert actuals via XOG for a one day time period using the below XML file
<NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_timeperiod.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header version="6.0.11" action="write" objectType="timeperiod" externalSource="NIKU"/>
<TimePeriods>
<TimePeriod start="2017-09-25T00:00:00.0" finish="2017-09-25T00:00:00.0">
<TimeSheets>
<TimeSheet ID="-1" resourceID="12345" version="1" status="0" action="add">
<TimeSheetEntries>
<TimeSheetEntry taskID="~rmw" internalTaskID="5123456" projectID="PR1234" userValue1="User1">
<DailyActuals>
<Actual actualDate="2017-09-25" amount="5"/>
</DailyActuals>
</TimeSheetEntry>
</TimeSheetEntries>
</TimeSheet>
</TimeSheets>
</TimePeriod>
</TimePeriods>
</NikuDataBus>
The XOG throws the below error
XOG-2028: Cannot create new time sheet because one already exists for resource: 12345 in timeperiod : 2017-09-25T00:00:00.0
All
Even though the actuals are inserted for a single day, the start and finish date cannot be the same in the XOG file. The finish date should always be one day ahead of the start date for a single day time period.
For example, in the above case, the timeperiod start and end date is 25th Sept 2017.
But if this timeperiod is xogged out, the finish date will show as finish="2017-09-26T00:00:00.0"
The XOG XML for single day time period (25-Sept-2017) should look like - The finish date should be changed to 2017-09-26
<NikuDataBus xsi:noNamespaceSchemaLocation="../xsd/nikuxog_timeperiod.xsd" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Header version="6.0.11" action="write" objectType="timeperiod" externalSource="NIKU"/>
<TimePeriods>
<TimePeriod start="2017-09-25T00:00:00.0" finish="2017-09-26T00:00:00.0">
<TimeSheets>
<TimeSheet ID="-1" resourceID="12345" version="1" status="0" action="add">
<TimeSheetEntries>
<TimeSheetEntry taskID="~rmw" internalTaskID="5123456" projectID="PR1234" userValue1="User1">
<DailyActuals>
<Actual actualDate="2017-09-25" amount="5"/>
</DailyActuals>
</TimeSheetEntry>
</TimeSheetEntries>
</TimeSheet>
</TimeSheets>
</TimePeriod>
</TimePeriods>
</NikuDataBus>