I am creating task-based builds in TFS 2017. The builds have an option (under the 'Options' tab) to create a Bug automatically when the build fails.
When the build fails and a Bug is created, the bug says it was created by me. I assume this is because I am the one who set up the build definition. However, I am not usually the person who kicks off the build, nor do I check in code for this project. I would like to change the default "Created By" value to either a team member who is responsible for fixing broken builds, or a generic value like "DevBuild".
The "Create Work Item on Failure" area has an "Additional fields" section that I wonder if I could use for this, but I'm having trouble working out if that's what it's for and how it might be used.
The help prompt reads:
Additional fields to set when creating the Work Item.
For example, "System.Title" = "Build $(build.buildNumber) failed" will format the Work Item title, and "System.Reason" = "Build failure" will set the reason.
So I tried this, but to no avail.
Is there an option for changing the Created By field? Is there a list of possible field values I could use here to change other parts of the bug?
Your setting is correct. Once you add System.CreatedBy
field, the value of Created By
field will be reset.
You could run a query and select Created By
column to check the values: