How can you abandon TFS code reviews in bulk? - tfs

We moved to using Git and PRs... then we moved to Azure DevOps from on-premise TFS.
Our developers still have a number of old, irrelevant code reviews in their Assigned to me section.
I tried following the directions here
How can you cancel a Code Review Request? but using that method I was unable to set the Closed Status field. The edits would not save.

That's when I stumbled across a UI feature to simply Edit the items in the query.
Then we can set the State to Closed and the Closed Status to Abandoned.
Then click Save Items in the query menu, refresh the query, and they're all gone now.

Related

Trying to get TFS bug State change dates by Reading defect History from TFS ticket using rest api

I am trying to chart out the ticket state change dates to uncover the average time each ticket sits in each of its states (Bug Life cycle). Using rest API's able to get the Create/closed/Resolved dates etc but how can I get the state change dates?
One option that I thought was to read the content from the History Tab (picture attached (History tab) contents right next to Link Tab. Let me know if any of you have already explored it.
I have tried reading the contents using API with fields.System.History but so far it returned null even though there was some contents. am I using the right filed name?
You can achieve it with the revision API (I don't know if it exist in TFS 2015):
GET https://{instance}/{collection}/_apis/wit/workItems/{id}/revisions/?api-version=4.1
You will get all the revisions for the work item, each revision includes State and ChangedDate, so you can investigate it and get the dates when the state changed.

Jira - Automatically closing main item when last sub-task is closed

I use a Kanban board with a Scrum development project. I've seen that Jira can automatically ask the user whether or not to close the primary item; when the last of its sub-tasks are closed. But this isn't happening with my Kanban board.
What triggers Jira explicitly to ask the user whether to close the main item? Does this need to be configured?
In the end, I fixed this by installing an add-on, Adaptavist ScriptRunner for JIRA.
This allows you to create a post function that updates the main item when the status of a sub-task changes.
I wanted to only close the main item when all sub-tasks were closed, not whenever one sub-task is closed. To make that work, I added a condition so the main item can only be closed when all sub-tasks are closed. I could create this condition even without ScriptRunner.
I didn't have to write a script or do any other programming. It was pretty issue once I installed ScriptRunner.
This can be done in the post function. Just create a small script that checks if all of the subtasks are closed, which can then push the parent task in the necessary transition or else you can throw an event when the sub tasks are closed and use theĀ Auto Tranisiotn ListenerĀ in JIRA Toolkit to do the transition.

TFS PBI/Bug state - when all tasks are set to Done or Removed

Apologies if this has already been asked and answered.
I want to only allow a TFS user to change the state of a PBI/Bug when all tasks have been set to Done or Removed.
Is this possible?
By default we cannot achieve that.
However you can have a try with the extension TFS Aggregator which is a plugin that is designed to handle this scenario.
There is a thread just has the same requirements submitted on GitHub with the discussion on using the TFS Aggregator to achieve that, you can refer to it for details : Update the state of a PBI (or any parent) to "Done" when all children get moved to "Done" or "Removed"
Related user voice here : Automatic State Transition based on linked Work Item State

Display code reviews that need to be completed on TFS board

Is there any way to do this? I have looked into TFPT, Review Assistant, and the Microsoft.TeamFoundationServer.Client and Microsoft.VisualStudio.Services.Client NuGet packages. I just want something that I can create code reviews with which will display the progress of those code reviews on my team's TFS board.
No this currently cannot be done as far as I can tell, at least not without serious mucking around wit the workitem template for Code Review Request.
You may be able to achieve your goal by adding all required fields for tasks to the Code Review Request work item and adding Code Review Request to the TaskCategory, but since this work item type is tightly coupled with the UI implementation I do not know how far you could go before the UI will break.
The process is largely the same as the work required to add Bugs to the taskboard. so you could experiment with that. I suspect you may run into issues around mapping the states of the Code Review to the States of the Task workitem, which will likely break the Visual Studio UI as well.
As an alternative you could create a custom dashboard widget using a Work Item Query. It would show up on your Team's homepage on TFS and would show you your status.

TFS 2012 - How can I tell if a changeset was code-reviewed?

We recently started using Team Foundation Server 2012 and are using the code-review feature to have other developers review code changes. It seems to work great; however, as a project lead I would like to be able to see that a given changeset has been reviewed by someone else.
For example, say Developer Bob makes changes and requests a review on those changes. This generates a shelveset for the changes and creates a code-review work item for the requested review. Developer Alice reviews the changes, makes some comments, and finishes the review. Bob incorporates Alice's suggestions and checks in the changeset.
As a project lead, I search for changesets and see that Bob checked in changeset 123. If I look at this changeset, there is an associated work item for the task Bob was working on, but no indication that the changeset was reviewed by anyone else.
If I look at code-review work items, I can find the things that have been reviewed and see the comments. This is cumbersome as I have to sift through work items and find the one that happens to be related.
How can I tell from a given changeset that it was reviewed, as well as see the review comments?
Changesets can be linked to any kind of Work Item, including Code Reviews. When you request a review on a set of pending changes, they are automatically associated to the new review Work Item. When you double click on the changeset you should be able to see under Related Work Items something like this:
In this case there were 2 reviews for this changeset, the second one was automatically there when it was requested. The first one had to be manually linked, just like the Task.
If you double click on the review item, you can see all the comments.
Tip: If you want to do a review post-checkin: go to the History view --> double click on the changeset --> Actions --> Request Review.
Tip2: It is a bit annoying that you have to manually check that each changeset has a review. If lack of review is really a problem for your team, I would suggest setting up a check-in policy.
You can make queries searching for code review work items and you will find associated changesets on the field Associated Context (Changeset id or Shelveset Name)
Inside the Code Review, you can check the changeset via the link at the top of the work item view.
Of course, there is another option that is querying directly to TFS Database (Warehouse) but it's tricky and requires access to that database and knowledge on the schema.
from work item history u can check out all the change sets ....changeset was reviewed by anyone else this functionality TFS does Not provide!
may be i have lost Something but i don't see any answer regarding to change set that is was reviewed.
but you can check the change through (history , and sort the source control by date ).
good luck!

Resources