In TFS 2013 through custom extensions we were able to do field validation just before a work item is saved. This model supported a number of events including pre-save, field-change etc.
In TFS 2017 the extensions seem to be supporting only onFieldChanged, onLoaded, onUnloaded, onSaved, onReset and onRefreshed events. So we're unable to intervene right before a user saves the work item with new values, revert them back and prevent the item from saving & going into the database & firing our work item tracking web services with these (as per business rules) invalid values.
Is there any way to accomplish this in TFS 2017?
Just listen onFieldChanged event, it will be fired immediately when a field be changed.
Related
Is it possible to add an extra field to the TFS check-in window?
I'm not searching for an extra field on the product backlog item, but a field for a certain value that i would upload to another app when the check-in occurs.
Assuming you're using TFVC, the answer is yes, they're called Check-In Notes.
That just handles the "adding an extra field to the information gathered during source code check-in", however. Actually triggering a down-stream event and retrieving that value will require using service hooks and most likely the REST APIs to retrieve the check-in note value from the changeset. I'm not sure if check-in notes are surfaced by the REST APIs or not -- if they're not, you'll end up having to use the old-school SOAP APIs.
I'm on update 4. I want to let business users submit "tickets" in TFS for research. However, they less rights to the project and aren't part of the contributors role. In addition, TFS documention indicates that once you deploy a "team alert" that the "#ME" variable changes to actually referring to the team, and not the person.
What is the approach to take to ensure that someone with less permissions, and not part of contributor group, will always get notified when a work item they created gets changed.
NOTE: TFS 2013 UPDATE 4 -- ON PREMISE
Related item: TFS 2013 (Update 2) Team Alerts not sending emails
* this doesn't help as I can't add them as contributors, need narrowing security permission.
UPDATE 2016-02-22
In looking through the alerts section, as an admin I see I can actually search and find an individual and setup an alert for them on the workitem change. However, this is a manual process, and I would like to do this in bulk. I will work on tracing the query execution that is called when the alert is created and see if I could replicate with a sql command to insert alerts for all users. However, I'd like to avoid running a direct sql query to do this if possible, if there is some bulk processing functionality that allows an individual alert to be deployed to each person on a team without doing it manually.
Anyone aware of any extensions, scripts, or other functionality that does this?
According to the comments of this issue TFS 2013 Update 2 Team Alerts not sending emails.This issue is not fixed with TFS 2013 UPDATE4. So, if you can't add the users as contributors, then they can't receive an email.
As a workaround, you can use events of team room. Adding events lets your team know when builds finish, source code is checked in, work items are updated, and requests for code reviews occur. This can be visible to all members of the team room. Detailed steps and more info from MSDN Collaborate in a team room
During the time some work items are becoming invalid. The AssignedTo field (which is mandatory) has a value of a deleted account (people are leaving the organization).
What's the impact of these invalid work items on TFS performance/health?
Most of them are in Closed state so it's small chance that someone will open them again.
Should I maintain all work items in valid state?
For AssignedTo field ,you can remove the deleted and unused account by some settings.You need to add ALLOWEDVALUES rules with the project group which you want to be displayed in AssignedTo field. Please refer my answer in TFS-2015 limiting user list for more info.
For invail work items, it doesn't has any serious influence. There are general three treatments.
Just ignore it
Change the AssignedTo to others
If this work item will not be used in the future, you can delete it.
In the near future, easy way of deleting and recycleing a work item is coming on.
Visual Studio Team (Product Team, Microsoft) responded · Aug 29,
2015
We’ve started work on this one. We’re planning to add a real delete
into the UI… complete with a recycle bin. High level plan is to
deliver this around November of 2015.
Source: UserVoice
is there a way to hide the content of a field based on a role?
I thought about creating a serverside plugin which empties the field if the user does not have permission to view the field and repopulate it on save. But I don't know how to do this, I did not find any event which I could use. Any idea?
My first intent was to use the EMPTY rule but this really clears the content and does not repopulate it. Also the READONLY rule is not acceptable for us. Do you have any idea?
I know this was already requested http://visualstudio.uservoice.com/forums/121579-visual-studio/suggestions/2088177-add-ability-to-hide-mask-fields-in-a-work-item-bas but I need the functionality now.
I also thought about creating a workitem where the hidden fields are stored in and linking it to the other work item but this is not the solution I want ...
The only way to do this is by creating a custom work item control. That control can then only display the contents of the value if the user has the correct permissions. What it does not prevent though is to see/update the data via other tools like Excel, Work Item Query or Bulk Update.
As the suggestion on User Voice suggests, it is not possible today in TFS. So please vote and make sure the Team Foundation Server team knows it is high priority for a lot of our customers.
Ewald Hofman (Program Manager, Team Foundation Server)
In VS 2013 when u use the Empty Rule, the field disappear! You can see that in Scrum Template when you change de WIT state to Done the Remaining Work field are hidden
Just starting to implement things on TFS 2010. Been hunting around with no success so have resorted to posting the question.
When we get emails from users detailing a bug, or even suggesting a new feature, how can we create a TFS workitem on their behalf? We'd like to report on where/who the work items are coming from.
Having them create the item is not ideal as many of the users do not have TFS access, and may even be external clients.
The fields that are used for tracking use the credentials of the user that created the work item. If you want to track the customer who created the work item, you need to add a new field where you can store this information.
The CreatedBy field is available for you, but it is - hardcoded - readonly.
Do you know that it is also possible to let your external customers create their own bugs by using "Work Item Only View"? You don't need a CAL for your customer if you use this. In this mode, the customer can create new work items and see their own created work items.