Work Item is not ready to save - Resolved
-
Saturday, August 18, 2012 1:02 AM
When I try to update the status of a work item using the following syntax, the "Work Item is not ready to save" error is issued.
wi.State = sState
wi.Reason = sReason
dim result = wi.Validate() ... more handling...
wi.Save
The work item type is the default "Task" type. I move it from "Active" to "Closed".
According to the Validation logic, the System.State item only Allows values for "Active" and "Resolved". The Prohibited values are "Closed".
According to the XML for the task type, there are no allowed or prohibited values for System.State. The Workflow only has two states (Active and Closed) and there are transitions between them. I can find no reference to "Resolved" anywhere. Nor can I find the "check-in" event I've seen referenced elsewhere.
Remarkably, even though the "wi.Save" throws an error, the State of the work item is changed from "Active" to "Closed".
So, why is it throwing the "Work Item is not ready to save" error when it is clearly saving the work item and no valid rules appear to have violated???
All Replies
-
Saturday, August 18, 2012 1:55 AM
I'm a moron. It was a Bug work item as opposed to a Task.- Marked As Answer by DaveIII Saturday, August 18, 2012 1:55 AM
-
Monday, August 20, 2012 12:37 AMModerator
Hi Dave,
I’m glad to hear that the issue is resolved. Thank you for sharing your solution & experience here.
Regards,
Lily Wu [MSFT]
MSDN Community Support | Feedback to us

