I am using the VersionOne.SDK.NET.ObjectModel to create defects in VersionOne for our team.
https://github.com/versionone/VersionOne.SDK.NET.ObjectModel/
But there is now a requirement to set the type on a defect.
The Type property of the Defect class is read-only.
public IListValueProperty Type { get { return GetListValue("Type"); } }
I have previously modified the source code of the object model to extend it with set properties but in this case I haven't been able to get it to work.
In addition, has anyone been able to retrieve the list of possible defect type strings that are available for a project ?
Thanks for any help you can give.
The list of available Defect types can be found with this URL query:
http://{server}/{instance}/rest-1.v1/Data/DefectType
One you have the OID of the DefectType value, and you know the OID number of the Defect that you want to update, you can issue an HTTP POST request with a URL like this:
http://{server}/{instance}/rest-1.v1/Data/Defect/1234
With an XML payload like this:
<Asset>
<Attribute name="Type" act="set">DefectType:181</Attribute>
</Asset>
Note that VersionOne Object Models (.NET and Java) were sunset in the Spring 2014 release, but the source code remains available in GitHub. If you prefer to use a wrapper for the REST API calls, check out the .NET SDK (APIClient).