When adding a work item to TFS 2010 via the SDK, the incidents are created using the same identity that was used to authenticate to the TFS server.
In other applications providing defect tracker/work item support the API normally allows you to set a Reporter/ReportedBy/CreatedBy field, so you can make it appear as if the user your service is creating the issue on behalf of "has created the issue", rather then say a generic "service account" you have setup to allow a 3rd party application access to TFS/defect tracker.
It appears you can not set the CreatedBy field when creating a work item via the TFS SDK (you get a TF26194 - The value "Created By" cannot be changed" error) and I can't see any Reporter field that comes as standard with the common TFS templates.
Is it possible to set the "Created By" to another user, or impersonate another user (without knowing their password etc.) for the purposes of creating new work items?
The CreatedBy field is important in terms of accountability regarding who enters data. In my organization, we added an additional user field for use when the work item is created on behalf of another user.
You can use the Process Template Editor (part of the Team Foundation Server Power Tools) to easily add fields to your work items.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With