List all files attached to a user story - tfs

When DEV checks in files into TFS 2017 they tie that check in to a user story and I can see the changeset/s on the user stories. How can I run a query/report/sql command or use a program to see all the files that were changed for a user story?
Thank you

You can use TFS REST API to get the ArtifactLink:
Get http://TFS2017:8080/tfs/DefaultCollection/_apis/wit/workitems/{id}?$expand=All&api-version=3.2
Check the example of the api's response:

Related

TFS Where to list approval comments

I'm using Microsoft Visual Studio Team Foundation Server Version 15.112.26307.0.
Using the Releases page/view for a group of approvers to review and manually trigger the release from environment QA to environment PROD (first environment triggers automatically).
From that screen, the approver clicks the icon and then in "override" to approve and launch second environment... on that action (popup) it asks for a comment and the the user clicks the approve button which triggers the next release environment... until here, its the standard way from TFS....
I wanted to know if there is a way to list all releases that completed all environments, and on that list show who approved it and also the comment entered... is it possible to customize a view or create a whole new list querying that information? Its a information/audit list only... no need to take action from there... just summarize the information for review.
Thanks!
You can use Releases - Get Release API to get the information you want. Since you are using TFS 2017 Update 1 RTM, you could capture the rest api by pressing F12 in browser then select Network. Check the screenshot below:
I've tested the following api in Version 15.117.27414.0, and get the comments successfully:
Get
http://tfs2017:8081/tfs/{collection}/{project}/_apis/Release/releases/{releaseId}

TFS Administration Console Adding and Removing Users

I am working with team foundation server and I added a user in the server from Administration Console and the user has access to the server. But the problem is even when I remove that user from Administration Console user still able to login to the server. Can anyone help me here? Thank you in advance.
To remove users completely from TFS server. You should remove the user from all the security groups.
UsE the command below to get this account has been added to which groups. Then check all those groups and try to remove that account from those groups.
TFS security imx:
tfssecurity /imx [domain\account] /server:[server url]
Besides, changes you make to local or Active Directory groups do not get reflected in TFS immediately. Instead, TFS will synchronize those groups regularly.
A periodic clean-up job that is executed removes people from the global groups. If you just wait, they will disappear in a couple of days. They will not have access to any of the TFS assets however.
You could look in http://tfs.mydomain.com:8080/tfs/_oi to see the sync job.
If you cannot wait for the scheduled job, you can try to do the force sync: http://msmvps.com/blogs/vstsblog/archive/2011/02/17/force-tfs-to-sync-with-active-directory.aspx

How to set permissions for publishing new Wiki version on VSTS

We've published our Wiki pages in VSTS using 'code as Wiki' (see explanation here). In general we only want to use the master branch for displaying these Wiki pages, but sometimes we want to add a new version using the Publish new version menu option (see screenshot).
However for some of my team members it isn't possible to publish a new version, because that menu option is not visible. I've searched to see if there are certain permissions controlling this menu option, or any preview feature that should be enabled, but couldn't find any clues on this.
Does anyone know how to get this Publish new version available to everyone? Thanks!
Edit 1
It was suggested by Rodrigo Werlang to check out Wiki security, however this option is not available for 'code as Wiki', see screenshot:
Just see the Prerequisites to publish a Git repository to a wiki:
You must have the permission Create repository to publish code as
wiki. By default, this permissions is set for members of the Project
Administrators group.
Anyone who has permissions to contribute to the Git repository can add
or edit wiki pages. Anyone with access to the team project, including
stakeholders, can view the wiki.
And the description about Stakeholder wiki access:
Stakeholders in a project can read wiki pages and view revisions,
however they can't perform any edit operations. For example,
stakeholders can't create, edit, reorder, or revert changes to pages.
Note: Users with Stakeholder access have read-only permissions to
wiki pages. These permissions can't be changed.
So, in your scenario you can follow below steps to see the Publish new version option:
Change the user access level to Basic if it was Stakeholder
before.
Add the user to Project Administrators group or have
Manage permissions set to Allow for Git repositories.
In your wiki, go to Wiki Security
Take a look at the security page and set contribute, contribute pull request, create branch, create tag, manage notes, read.

In TFS Online, How do I share a code branch with our customer

We have an enterprise customer that we have delivered a system for. It is part of the agreement for us to supply them with the source code of the latest release. We are using TFVC on TFS online, and we thought it would be easiest to give them access to our Main branch. But I have difficulties with only allowing them to access the code and nothing else. The user I am testing with, can see too much: I.e. things like dashboard, current team members etc.
Is it possible for me to only expose code from the Main branch and nothing else to an external user?
Giving access to TFS Main Branch out of Organization (AD) is not advisable considering security.. Instead consider giving source code into zip format there are lot of large file sending (FTP sites) are available..
Still for your request of restricting access to user have a look over this
https://www.visualstudio.com/en-us/docs/setup-admin/restrict-access-tfs
you can consider replicating your part of source code into separate stream and give reader read only access to that stream.
Hope this helps... :)
Refer to these steps to set the permission:
Add user to your VSTS (Basic)
Remove this user from all group if you added
Go to admin page of a team project Version Control (Setting > Version Control)
Select a folder/branch
Click Add > Add User to add that user
Select the user that you added
Set Read permission to Allow
Go to Security page (click Security)
Click Create group to create a new group
Set View project-level information to Allow and deny other permissions for this group
Click Members of that new group
Click Add to add that user to this group
After that, this user can access the code (Just the folder/branch the user has the read permission) on web access (Code > Files).

TFS Integration Platform Migration Issue access denied

Here is the scenario:
I have 2 TFS servers, TFS-A is in local and TFS-B is abroad.
Check into TFS-B is very slowly, so my idea is to check into TFS-A first,
and check all changes into TFS-B from TFS-A in once time at night.
But the TFS-A and TFS-B have different user accounts, when I synchronize them, error happens.
The error told me access denied.
So if it is possible to sync two TFS with different accounts.
How to do it?
Thanks in advance.
You need to supply a user mapping in your TFS integration platform configuration. A similar post shows how to do this in detail: TFS Integration Platform: How to map users with the SVN adapter?
Hope that helps you further.

Resources