VSTS reporting capabilities - azure-devops

We're looking at moving from TFS to VSTS. However, one of the features I rely on is the ability to see which developers have got code checked out, when it's getting checked in, and to which branch. I need to see this at the collection level, not per project. Does this functionality exist in VSTS?
Tks

No such built-in features in Azure DevOps (VSTS).
However you can try below workarounds:
To see which developers have got code checked out, you can use the
tool Team Foundation Sidekicks which can retrieve the status
locked/checked out by other users. But the latest version is Version 6.0 only for Visual Studio 2015. Based on my test it's also available for VSTS. Please reference my answers in below threads:
Is there a way in Visual Studio and TFS to view items checked out to local workspaces?
List of checked out files
For when it's getting checked in, and to which branch, you have to
navigate to the specific repository to check the changesets which
include the history. You can also try calling the REST API
(Changesets - Get) to get the information.

Related

Looking for extension similar to GitLense for Azure DevOps

On my private projects I am using Git. I have installed GitLense for Visual Studio Code, which is awesome. I can click on a line, and see who changed it when within which changeset. See red arrows where I have deleted code and so on.
I have a VS2017 project using azure DevOps. I have read about CodeLense, which does not apply on my C++ projects, even in C# it is barely helpful.
Does someone know a similar extension here?
You could install the extension Code Compare to check the file changes.
Also, if you are using Azure DevOps and clone the repo local, we could open Team Explorer->Changes->Actions->View History->select commit and right-click->View Commit Details to check the changes, you could refer to this doc for more details.

Is there any way to check in items or create a new project from files via the API?

We're starting to automate some of our project kickoff processes. We already have a project management app (built in-house) that creates the base Solution and C# project with some default screens, authentication, etc. and populates some standard data like App Name and Namespace.
Ideally, what I'd like to wind up with is clicking a button in our project management app, having it create a VSTS project for the app, pull the template files and manipulate them as-needed, and check it all in to VSTS as a "ground zero" changeset for that newly created VSTS project. At that point, our dev team can just connect to the project and pull it down in Visual Studio.
From what I'm seeing in the REST APIs documentation for VSTS, you can get a list of changesets and files associated with a changeset, but I'm not seeing any references on adding or checking in files.
Is this something that can be done via the APIs, or some other automated extension mojo?
You can use Rest API to create a new project.
For Version Control, since you mentioned "check in as changeset", I assume you are using TFVC. The Rest API can only get the information about TFVC version control, it cannot check in files for now. If you want to check in files via API, you can consider using .NET client libraries for Visual Studio Team Services (and TFS). Refer to this link for details: Team Foundation Version Control client API example for TFS 2010 and newer. It works with VSTS too.

Login to TFS 2010 as a different user in Source end point in opshub

I have installed the free version of opshub. I would like to connect to tfs 2010 as the source endpoint in opshub as a different user.
The issue is, it automatically uses my current AD credentials and connects to tfs 2010.
I removed the existing connection and re added the tfs but still uses my current ad credentials
I would like to connect as a different user.
Any help is appreciated.
Few things that i might have not mentioned.
I am running the migration from my laptop and TFS 2010 in on a aws instance.
There are no files in the cache folder, So i created a new ad user and added that user to tfs 2010 and removed my login from tfs 2010.
Then from my laptop, I switched to the new user that i created and ran the migration but the changeset still shows my name.
Is it because, I created the empty project in VSTS?
So does the tool uses VSTS or tfs 2010 login credentials for changeset?
To be noted I am using the free tool and all the changesets will not be migrated including the users. It only shows changeset so and so migrated by Goutam Rajput.
The tool uses VSTS credential to create the changeset. So all the changeset show the same name is an expected behavior. If you want to keep these information, you need to use commercial version, the information will be placed in the changeset comments.
Due to the model/limitation of TFS itself, the Work item ID’s and
Change set ID’s of the migrated content in Visual Studio Online will
not match the Work item ID's and Change set ID's of the same content
in on premise TFS. When using the commercial version metadata
information about the source Change set like original username,
original check-in timestamp are embedded in Change set comments during
migration for Change sets.
You can also try with the method in this question to keep these information: Should the username and timestamp be migrated for changesets?

Migration Utility giving error for Visual Studio Team Services Project Collection URL

I am trying to see how the OpsHub migration tool works before I perform real migration.
And hence I am trying with a on premise TFS instance and a trial created Team Services (was Visual Studio Online) instance. but when I finish configuring the stuff and it start to validate all the settings put in, it is giving error for Team Services Project Collection URL. It is taking collection URL as
https://********.visualstudio.com/********
where as it should only use
https://********.visualstudio.com/
Not sure how to get over it and now fully stuck.
This is caused by the change in VSTS:
Collection in the domain
Your Team Services account URL just got 18 characters shorter. We’ve
removed “/DefaultCollection” from the path. While it’s small, but
welcome change. It’s the beginning of a larger journey to how we
structure accounts. Learn more here.
Note that existing accounts will still give out the longer URL for Git
Clones in the Code hub. This is because to use the new shorter URL in
VS, you will need to reconnect Team Explorer using the shorter URL.
Today you either need to use the long or the short URL for an account
in VS, you can’t intermingle. Once we have enough clients updated such
that they just work seamlessly with either type, we’ll change the
default Git Clone URL to the shorter one as well.
Last but not least, we have a set of Release Management improvements.
Please download the latest version of OpsHub Visual Studio Migration Utility and then try again.
A similar issue here: OPS Hub - unable to migrate project.

How can I set up a code review process to my remote peers before checking in to TFS?

My development environment is set up behind a corporate proxy through remote VMs. We uses Visual Studio as the main platform for our code developement , so we had no issue with code review process as Team Foundation Server have this feature.
However recently, we switch to eclipse while still maintaining the projects in TFS. Eclipse have TFS plugin which is good as we can continue on from our previous track without much effort. The only thing missing is the code review.
So, is there anyone who worked using TFS and eclipse in offline mode behind a corporate proxy, have an alternative way to do code review just like visual studio + TFS.
It's based on which version control system your team are using.
If you are using GIT as source control.
For now, the Team Foundation Server plug-in for Eclipse (Team Explorer Everywhere) supports pull requests to review code and collaborate with members of your team.
Collaborate
Work and code together
Use pull requests to review code and collaborate with members of your
team. Triage and track comments at each stage of the work to ensure no
feedback gets lost. Finally, configure merge, build, and review
policies for your Git branches and stay up-to-date with alerts.
Source: Team Explorer Everywhere
If you are using TFVC as source control.
There is no this function in the plug-in directly. You may need to use 3-party code-review plugins to achieve it. Such as SonarLint, Checkstyle Plug-in...
If you want to enforce Code review before any checkin in TFS server. You may need to use check-in policies which can evaluate whether the pending changes meet the validation requirements before they can be checked in to the server. So, if the code review through Sonar can be called programmatically, then you can build a custom check-in policy that calls Sonar inside the Evaluate method.