You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When editing a row in Survey, if the row's _savepoint_timestamp is greater than the latest checkpoint's _savepoint_timestamp the savepoint doesn't get saved as complete.
Steps to reproduce the problem
Write a CSV with a row such that the _savepoint_timestamp column contains a timestamp in the future
b.setLength(0);
b
.append(K_DATATABLE_ID_EQUALS_PARAM)
.append(S_AND)
.append(DataTableColumns.SAVEPOINT_TIMESTAMP)
.append(" NOT IN (SELECT MAX(")
.append(DataTableColumns.SAVEPOINT_TIMESTAMP)
.append(") FROM ")
.append(tableId)
.append(K_WHERE)
.append(K_DATATABLE_ID_EQUALS_PARAM)
.append(")");
db.delete(tableId, b.toString(), newObject[] { rowId, rowId });
This translates to
_id = ? AND _savepoint_timestamp NOT IN (SELECTMAX(_savepoint_timestamp) FROM tableId WHERE _id = ?
It keeps the row with the newest _savepoint_timestamp among all rows with the same id, but it should distinguish between checkpoint rows and non-checkpoint rows.
The text was updated successfully, but these errors were encountered:
This is one of the problems Caroline reported. In her case, she had a typo in the CSV so the timestamp was in the future.
But this could also happen if the timezone changes. For example, a user could pre-populate the timestamp field using the local timezone but Services calculates timezone using UTC.
that is the point of UTC is to convert from the local time to a global time. I am inclined to say that it should be problematic to have future times in savepointtimestamp
Software and hardware versions
Services 2.0.3
Survey 2.0.3
Tables 2.0.3
Problem description
When editing a row in Survey, if the row's
_savepoint_timestamp
is greater than the latest checkpoint's_savepoint_timestamp
the savepoint doesn't get saved as complete.Steps to reproduce the problem
_savepoint_timestamp
column contains a timestamp in the futureExpected behavior
Changes get persisted.
Other information
The problem is in ODKDatabaseImplUtils.java#L3952-L3957
This translates to
It keeps the row with the newest
_savepoint_timestamp
among all rows with the same id, but it should distinguish between checkpoint rows and non-checkpoint rows.The text was updated successfully, but these errors were encountered: