VSTS2010 Addin Development - Check-in hooks - visual-studio-addins

I've been tipping my toes in Visual Studio Add-In development. I've read some of the tutorials online, and studied some of the sample code provided.
Now I actually want to perform custom actions before/after a TFS check-in command is called by the user, but I can't seem to figure out where I can find a hook to start this.
Is there something like that available in the SDK? Can someone point me in the right direction?
Thanks a lot!
Roel
Edit:
The use of check-in policy is not gonna help me in my situation. I want to show dialogs before and/or after the check-in command is invoked. Even (if it is possible) to alter the existing check-in dialog.

Here is a good article on the subject: http://blogs.msdn.com/jimlamb/archive/2010/03/31/how-to-implement-package-and-deploy-custom-check-in-policy-for-tfs-2010.aspx

Related

How to backup/restore a JIRA project configuration

is there a way to backup a JIRA project configuration and then restore?
The issue I have is that sometimes doing workflows changes I can break the whole configuration.
So, I'm looking for a way to easily rollback to the previous working version of the project configuration.
Please note that I cannot rollback the whole JIRA server as it will affect other projects.
We are using the latest version of the Jira Service Desk on premises.
Thanks,
Please, see full answer here.
You can't.
JIRA does a full export of everything, and you can import
the issues from one project from that. But that's it. If you need
single project backups with configuration, you'll need extra
functionality. This is exactly the case where I would reach for
Botron's tool -
https://marketplace.atlassian.com/plugins/com.botronsoft.jira.configurationmanager
Whenever you publish a change to a workflow, JIRA asks you if it has to save a copy of the original. If you do that, it should be easy to revert to a previous version. Still it gets cumbersome to manage lots of copies of a workflow and to understand what changed when.
If you want a bit more control, you can also export your workflow to xml and keep that somewhere. If you need to rollback, you can import from that xml again. For more details see the documentation here.
If you want even more control, then add-ons like Botron's configuration manager can indeed be useful.

TFS web portal: Possible to link/URI directly to line number in file?

I would like to send my coworkers a link directly to a line number in a file in our TFS repo. Is this possible? If so, how? We are using TFS 2015.
Currently, the best way I have found is to link to the file like so:
http[s]://{TFS-SERVER}[:{PORT}]/tfs/{PROJECT-COLLECTION}/_versionControl#path={PATH-TO-FILE}
Then, Ctrl+G to manually enter the line number. Before I dig through the JavaScript to find how Ctrl+G works, I am hoping someone can help me out.
I have tried variations on this theme, but without sucecss:
http[s]://{TFS-SERVER}[:{PORT}]/tfs/{PROJECT-COLLECTION}/_versionControl#path={PATH-TO-FILE}#line={LINE}
P.S. My issue is similar to this issue but rather than for Visual Studio, I am looking for a link via the TFS web portal.
Once you select a piece of code in VSO code editor, it is possible to copy a link to that section (see picture below). It looks like TFS has pretty similar url structure, maybe it will work.
Generated link structure
https://{PROJECT_URL}/_versionControl?path={FILE_PATH}&line={SELECTION_START_LINE}&lineEnd={SELECTION_END_LINE}&lineStartColumn={SELECTION_START_COLUMN}&lineEndColumn={SELECTION_END_COLUMN}
Just heard from a guy inside of Microsoft that adding &line=5should work. My local tests show it only works for Visual Studio team Services and doesn't work on TFS 2015 update 2. You'll probably have to wait until update 3 for this feature to hit TFS.
In the mean time, the JavaScript simply looks for a div with the right linenumber attribute:
<div linenumber="5">...</div>

Can I make a code review in TFS without a request?

Can I perform a code review of my peer's check-in in TFS without an explicit request?
In other words, if I've got a notification about check-in, can I make a comment after having viewed a differences if I feel like they are needed?
I cannot see such an option inside web diff view linked from a notification email. And it looks like there's no mentions about such option and/or workflow in TFS documentation.
In Visual Studio 2012, go to Source Control Explorer and view the history for an item or folder. When you see the list of changesets, right click one of them and select the 'Request Review' option
Sounds like you are after lightweight code commenting. This is available now in TFService and will be part of TFS 2013 on-premise.
Take a look at Review Assistant - an alternative code review tool to built-in one.
It's well-integrated into VS, so you won't experience a major UX shift.
It supports adding "ad-hoc" comments while browsing the code of your peers. And it's not necessary to request a review in this case.

Using Perforce with TFS as a continuous integration server, is it possible?

After using SVN as a VCS (we're a small dev team), we found it too hard to work with, and we switched to perforce in April. We're really happy with it, and we want to take it one step further by adding a Continuous Integration Server so that our builds are more reliable.
We have a MSDN licence allowing us to have TFS if we want (as a CI server), but we don't want to change what's already in place.
BUT, TFS has no native interactions with perforce, and vice versa.
So my question is, does anyone know if it's actually possible?
I googled a bit, I found an answer posted in 2009 (using perforce with team foundation server) saying it's not. But maybe it has changed since then...I didn't find any plugin or anything else to help me, and I need your help here.
Thanks.
I don't think there is any direct way to migrate Perforce to TFS.
However if you have got MSDN subscription, you could evaluate TFS for ALM/Build/Deployment.

How to find a TFS alert not set up by you

Someone has 'helpfully' set up a TFS 2008 Alert for a build on my behalf. I want to turn it off but no one will own up and I can't find it. Reading the docs suggests only the creator can see it. Is there anyway to find it?
There's a codeplex tool that I've used in the past to subscribe and unsubscribe outside of the UI:
http://tfseventsubscription.codeplex.com/
You could also do it through the commandline using the BisSubscribe.exe tool that is installed on the TFS server.

Resources