Agile Central: WSAPI - What does the error mean: "Could not update: Could not write changes in Unit of work" ?

Document ID : KB000095485
Last Modified Date : 11/05/2018
Show Technical Document Details
Question:
When creating artifacts , we get this error: "Could not update: Could not write changes in Unit of work" . What does it mean and how can we resolve it?

In this example we're creating a Test Case Result, but it's happening with other artifacts as well:

JSON request:
User-added image

Result:
User-added image
 
Answer:
This error means that one of the payload fields has an inaccurate wrongly formatted unit. This refers to Date or Time fields. 
In the request example above the problem is with the Date field in the JSON request. As you see it is set to "MMDDYYYY" (05102018), but the Date format needs to be "YYYY-MM-DD". Below you can see the correct request which will work and not produce the error:

User-added image

Note:
Do not confuse the Date format setting which is defined on the User's profile/settings or that's defined on the Workspace settings as the format that needs to be used. These are formats for display.

The input format to set a date field needs to be: "YYYY-MM-DD"