How can i utilize the Event Grid for work item change event in VSTS - tfs

I think i am really thinking over the board. We are migrating form TFS to VSTS and we have an integration developed in c# that actually sends data from service now to TFS and TFS to ServiceNow. We have decided to use Event Grid to get the notifications from VSTS(Azure Dev Ops) when any work item got changed. Can somebody suggest if this possible and help on how to implement it if it is possible.

I don't believe you can directly get an event grid notification from Azure DevOps.
Instead setup a service hook to trigger when any work item gets changed. You can handle this in many different ways, but perhaps as an Azure Function (https://www.dotnetcurry.com/visualstudio/1341/service-hooks-vsts-azure-function) might be a good idea as it's serverless like Azure Event Grid.
You could then trigger a custom event into Azure Event Grid from your function if you already have code to work with topics in the grid. (e.g. http://www.biztalkgurus.com/blogs/msft-biztalk-community/sending-custom-events-to-azure-event-grid/).

Related

Is it possible to calculate efforts of a User across the multiple projects in TFS 2018.3 and Azure DevOps Server

We are trying to calculate efforts of a User across different projects in the same collection of TFS 2018.3 and Azure DevOps Server (ADS). Is there any possible way to achieve this scenario in TFS/ADS and do we have any official extension from Microsoft or third-party extensions to calculate this?
Thanks in advance
No, there is not a build-in way to sum up the effort or story points across projects.
Support for calculated fields and roll-ups which is still a user voice at present.
As an alternative, you could implement a server side plugin for TFS or create a Web Service that subscribe to TFS Events, then in your code you will use TFS API for the Client Object Model (Work Item Tracking) to get the needed work-items and user info, calculate and save the data to somewhere.
Another solutions is an 3rd-party TFS Aggregator extension for Team Foundation Server (TFS) that enables running custom script when Work Items change, allowing dynamic calculation of field values in TFS and more.
Besides you could also export the query to Excel, and sum the completed work column in Excel.
All above is for a single project, you need to count them for multiple projects finally.

Is there a way to setup custom triggers in Visual Studio Team Services/TFS?

I use VSTS/TFS for work and side projects and I wanted to setup a trigger/rule that would automatically move stories into a certain iteration when I move them from "New" to "Approved" or whatever column is associated with an active state. I know how to change the iteration manually but it would be way easier if there was a way to say something like this psuedocode:
if (workItem.State == "Active") {MoveToIterationActiveForTodaysDate();}
Ideally too, if this isn't too picky, I would like it to only run on initial move so I can reassign to a different iteration later if I wanted to.
If anyone has an easier way to do this too that accomplishes the same thing (moving items to an iteration without having to manually activate the story and move it to the desired iteration) that would work as well. I'm still figuring out the ideal way to manage VSTS/TFS. Thanks in advance
Using VSTS is able to customizable work item rules.
Whether it be automatically setting the value of certain work item
fields or defining the behavior of those fields in specific states,
project admins can now use rules to automate the behavior of work item
fields and ease the burden on their teams.
More details please refer this tutorial: Add a rule to a work item type
However, it works with fields in the work item, not able to move work item to different iteration or area directly.
There is no out of box feature could achieve your requirement with TFS and VSTS for now. You may have to customize TFS events/actions to achieve the same feature as right click the work item--select move iteration--choose iteration.
Moreover, you could also use some 3-rd party extensions/tools such as Giulio
suggested TFS Aggregator.
As of today, there is no built-in automation, so the community wrote some tools that react at TFS/VSTS events and run scripts.
I can suggest TFS Aggregator which is used by many organization throughout the world: I am one of the core contributor.

Alert when TFS team query definition is modified

Is it possible to create a TFS alert that notifies when a work item Team Query definition has been modified?
Not the results of the query, but the actual query itself.
AFAIK that's not possible. The Alerts system doesn't support it, and even the advanced option of creating your own ISubscriber plugin (Event Handling With Subscribers) isn't possible as I don't think there is any Event exposed for changes to WI Queries.

Integrate kayako and tfs

I am in need of replicating all kayako helpdesk tickets into TFS. This includes creation of the ticket, updates of the ticket, and closure of the ticket. I've looked around and I can't seem to find any elegant solution to this. Can any of you point me int he right direction?
You can roll your own integration by building on the TFS Integration Platform.
Does Kayako support webhooks? webhooks allow you to send data when it happens, so for example when a ticket is created or when it is resolved - you can then have your application process that data. This is far better than having to make repeated calls to an API to see if there are changes to a system.

subscribe via email to incoming tfs issues?

I'm wondering if there's a way to write a tfs query such that when the results change, I will receive an email notifying me.
side question - is there a way to subscribe to updates to specific pieces of code?
Thanks!
I have the TFS Power Tools installed. The Alerts Explorer appears to have pre-configured alerts for several check-in activities. One of them is Check-In of a specific file happens.
And, I'm not sure which results you're talking about, but... You can also create various alerts for Builds and Work Item actions. I've got mine set up to alert me when something is assigned to me or when something assigned to me changes.

Resources