tfs
tfs copied to clipboard
Creating work item with validateOnly=True causes exception
validateOnly=true is used to test work item creation without actually creating one.
Therefore, response contains fields of not-created-workitem.
Logically, it does not contain System.ID.
That breaks WorkItem.__init__() method that tries to self.id = self.data["id"] while data has no "id".
@allburov , @SAnCherepan : what would be the expected behaviour when calling, e.g. create_workitem('Bug', validateOnly=true)?
A solution could be that create_workitem() would return True/False (depending on http response) instead of returning a Workitem instance. What do you think?
Maybe fixed with 39aa21686e7ea0fec25d3de560078f51ddeb123d