开发者

TFS 2010 Work Item -- How can I default Plain Text field to current user?

I have added a field Reported By to the CMMI Template Bug work item in TFS 2010. I would like to default this field to the current user (The one creating the bug). This is a plain text field because in some cases I want this field to be the name of someone from the field who called in with a bug re开发者_运维知识库port. The person calling from the field will not be a TFS user and thus not on the pre-defined user list. If I define Reported By like the already defined System.AssignedTo field as a FieldControl I can't enter arbitrary text (The name of the field bug reporter). I've tried setting the ReportedBy field default to CurrentUser and I get an import error that the field types do not match. Is there a way to have the current user entered by default into the field as plain text?


If the field is defined as

<FieldDefinition refname="Company.ReportedBy" name="Reported By" type="String" />

You can then customize the transition in the workflow by using a copy

<FieldReference refname="Company.ReportedBy">
  <COPY from="currentuser" />
</FieldReference>

As long as valid user isn't specified in the field reference you can edit the field as necessary but it will start as the current user.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜