TFS Alert when label is created - visual-studio-2013

Can I configure an alert when a TFS Label is created ? I don't find that option in the current predefined alerts. These are the ones I found:
And I want when a label is created:
Send an email notification.

No, this is not possible using the standard Alert features.

I created my own solution! I don't know how much access you have to your on-premise TFS instance, but you need to be able to execute t-sql scripts against the TFS mssql database. My solution is here: https://github.com/Antebios/tfs-label-notification
And when anyone creates a TFSVC label I get an email alert that looks like this:
Basically, I created a database trigger to populate a table. I query that table and send an email out, then mark the label as sent. I also have a trigger to delete form that table just in case the label gets deleted. I wrote the service in .NET Core just in case anyone wants to convert it to run within a container. Let me know if this helps or not.

Related

Custom Field Alert in TFS 2015

The question is the following:
I have a custom Requester field in TFS work items. It contains a valid TFS user name.
Is it possible to send an email to the person specified in this custom field, when the item changes a state?
In other words:
Requester = [Me]
Send email on State change
From the following questions :
1) “[Me]” variable for custom field alerts in TFS 2013
2) How to create custom Field with transition workflow in TFS
I figured out that custom fields (such as Requester) do not have = and <> operators. They have only Change, Change to, Change from. Thus it is not possible. (You can only observe the changes made to the custom fields)
Has anybody seen, herd or implemented a solution to this? Maybe a custom plug-in?
Thank You in advance!
You're looking at a server side event handler to achieve this.
Intercept the Work Item changed event
Check if the change was a
change in state
If it is, then email the address listed in the
Requester field.
There are couple of old projects on codeplex which should get you up and running but you'll need to update for TFS 2015 (and test with any updates you apply later)
Email alerts for TFS
TFS Work Item Watcher
There is a feature that just popped into VSTS that makes this a little slicker
Follow a Work Item
Although you would get notified on all changes rather than just state change
The feature was added in TFS "15" (not the same as TFS2015, see Brian Harry's blog post)
The feature is not enabled publicly yet, but there is a feature flag that you can turn on by changing a value in the team foundation registry to enable it - because it's not public yet you will have to contact Microsoft for instructions,
I have provided my email in the blog post
https://blogs.msdn.microsoft.com/rihamselim/2016/09/07/enabling-alerts-for-custom-fields-in-work-item-alerts/

Email Alert for Inserting/updating/removing files inside folder in windows7

i have above mentioned case happen at our company, they need to know under certain folder whether its shared or not if any files inserted or removed or update to send alert by email periodically for that action, any thought an ideas please
You can fairly easily create an application in C# that monitors a folder using the FileSystemMonitor class:
https://msdn.microsoft.com/en-us/library/system.io.filesystemwatcher%28v=vs.110%29.aspx
With that you can then have it perform whatever actions you want.

WP7 SQL Server CE How to Update

I'm updating my Windows Phone App to Mango and starting to use SQL Server CE. I can insert and select data but am struggling to understand how to update data.
Most of the examples are basic tutorials and only show inserting and retrieving data not updating. I believe I need to attach a class I have retrieved to the data context but that is as far as I have got.
Please can someone point me to an online tutorial showing how to do this. Or some example code would be great.
Thanks.
UPDATE
Basic updating looks fairly simple - query the database, update the object, call SubmitChanges.
My scenario is a little more complicated.
I have a page showing a list of jobs. A job (JobDetail) is selected and another page is used to edit the details. The job is written to a cache (another table JobCache) while the job is edited. If the user cancels the edit the cache is deleted. If the user saves the edit the JobCache object is pulled from the cache, converted to an object of type JobDetail and now I want to update the database with the new JobDetail object.I don't think I can just call SubmitChanges as the object was not generated from a query. I believe I need to somehow use Attach to do this. The question is how?
Why not get the original JobDetail object, update the changed properties from the cahced object and call SubmitChanges ?

TFS 2010 Email Alerts

I found this post, which seems to be an exact duplicate, but I can't figure out how to get the answer to work for me so I'm posting again...
TFS2010: Set up an alert that will email a member in the team when a work item is assigned to them
I want anyone (not everyone) using TFS to receive an email when they are assigned an item or when an item assigned to them changes. So, when the alert happens, the person who is currently assigned the item will receive an email.
I know I can set up this on a per-person basis with Alerts Explorer, but I can't figure out how to do this for everyone at once.
I looked at https://tfsalerts.codeplex.com/, but it looks like it's used to send alerts to groups of people...I only want to send the alert to a single relevant person (the equivalent of #Me). If this tool can do that, I'm not sure how to make it do so.
what you want to do is write a TFS Server Plugin. This plugin will fire whenever a certain event occurs. In your case, you will want to catch the WorkItemChangedEvent. In the notification, you will find old and new values of each field. By checking whether the assigned to field changed, you will know whether the WI has been reassigned.
Once you determined that the WI has been reassigned, you can take the New Value, and go to Active Directory (assuming you're using it), and get the email address. Finally, send a message.
For a code example of writing a robust server plugin (that happens to target the WorkItemChangedEvent, check out this blog post: How to Write a Robust TFS Server Plugin

How entity edit URL from within plug-in in MS Dynamics CRM 4.0

I would like to have a workflow create a task, then email the assigned user that they have a new task and include a link to the newly created task in the body of the email. I have client side code that will correctly create the edit URL, using the entities GUID and stores it in a custom attribute. However, when the task is created from within a workflow, the client script isn't run.
So, I think a plug-in should work, but I can't figure out how to determine the URL of the CRM installation. I'm authoring this in a test environment and definitely don't want to have to change things when I move to production. I'm sure I could use a config file, but seems like the plug-in should be able to figure this out at runtime.
Anyone have any ideas how to access the URL of the crm service from within a plug-in? Any other ideas?
There is no simple way to do this. However, there is one.
The MSCRM_Config is the deployment database that handle physical deployment properties, like the URL from which users are accessing the CRM deployment. The url that you might want is the one stored in "ADWebApplicationRootDomain", in the MSCRM_CONFIG.dbo.DeploymentProperties table. You may need some permission to access this database.
Note that this doesn't work in a deployment that is an Internet Facing Deployment.
Another way could be to query the discovery service to retrieve the same information (in the case that you are on the Online edition of MSCRM4).
What do you mean by "change things"?
If you create a custom workflow assembly, you can give it a server url input. Once you register it with CRM, you can simply type in the server url when you configure the workflow. You'll have to update the url for any workflows that use the custom workflow assembly once you move to production, but you'll only have to do that once.
My apologies if this is what you meant you wanted to avoid.
Edit: Sounds like you may be able to use the CustomConfiguration attribute when you register the plugin. Here's some more info.
http://blogs.msdn.com/crm/archive/2008/10/24/storing-configuration-data-for-microsoft-dynamics-crm-plug-ins.aspx
String Url = ((string)(Registry.LocalMachine.OpenSubKey(
"Software\\Microsoft\\MSCRM").GetValue("ServerUrl"))
).Replace("MSCRMServices", "");

Resources