Assigned To not set on TFS 2012 to Visual Studio Online - azure-devops

I've run multiple migrations for different projects using the Ops Hub Tool, which have all run without any errors but not one of them sets the "Assigned To" field on Work Items. Is there some configuration trick in order to get the "Assigned To" to be set in Visual Studio Online?

I finally figured this out. The projects had previously been migrated from TFS 2008 to TFS 2012 and at that time the User Accounts were recreated. For various reasons errors were encountered when trying to align the identities so the User Accounts have an identical display name but were for identities that were not valid. The TFS Work Items will display the invalid user in the Assigned To field but you wouldn't be able to edit and save the work item until you selected a valid user.
So for the work items that were still set to the invalid identities (all the historic tasks prior to the initial migration) the Assigned To field is not being set. We had a couple of projects that had not been modified since then (and of course I started with those projects) thus it appeared that Assigned To was not being populated at all. I figured out what the problem was when I moved onto a project with more recent activity.

Related

Renaming an Azure Pipeline task in an existing PUBLIC Azure DevOps extension

I have many Azure DevOps Extensions. Some recent, but also tasks dating back to 2015 when the extensibility model for build tasks first appeared. Over time much has changed in Azure Pipeline Land...
The biggest changes happened when we moved from UI based pipelines to YAML based pipelines. Some hidden internals of the tasks made their way into the light.
In the past a user would really only see the Task's Friendly Name and Description and Team Foundation Server would keep track of the real identity of the task through its TaskID, a GUID that was never supposed to change.
See a sample below:
"id": "3ca44a28-62de-4c60-8d77-a99065b95a8a",
"name": "VariableSetTask",
"friendlyName": "Set Variable",
"description": "Sets a variable.",
"author": "Jesse Houwing",
With the release of TFS 2017, tasks could be packaged into an extension which caused another identifying element to be created, the extension's publisher, extension id and the contribution ID:
{
"id": "jessehouwing-vsts-variable-tasks",
"name": "Variable Toolbox",
"publisher": "jessehouwing",
"contributions": [
{
"id": "vsts-variable-set",
"properties": {
"name": "vsts-variable-set"
}
}
]
}
These elements were also hidden in the age of UI based pipelines, but also made it to the surface when YAML came around.
steps:
- task: jessehouwing.jessehouwing-vsts-variable-tasks-dev.vsts-variable-set.VariableSetTask#2
As you can see the publisher, extensionid, contributionId and TaskName are now used to reference a Task, whether you insert them through the "View YAML" button:
When using the YAML assistant this will only happen when you have 2 tasks registered in your organization that have the same TaskName property.
Due to the fact that these values are now publicly visible, I've wanted to get rid of some of the bad naming I used in the past:
Get rid of the vsts- in the contribution-id
Remove Task from the TaskName property
Make everything lowercase to match Microsoft's own tasks
I'd love it even more if I could update the ExtensionId, which also references vsts- still.
And remove jessehouwing from the extensionId.
Changing names will of course have impact for existing YAML users, since all tasks are referenced by name, not by Id, but it would make my tasks easier to use for new users and for users moving from UI based pipelines to YAML.
Unfortunately, there are protections in place in the marketplace to prevent people from hijacking other people's extensions. This enforces a number of things with regards to the Task's Id: The Guid.
The Guid must be the same for all versions of a task published in an extension (for backwards compat one can publish a v1, v2, v3 etc in a single extension vsix so users get to chose when they move from A to B.
The Guid must be published in only a single public extension (no restriction applies to private extensions).
The Guid, for some reason, is tied to the ContributionId, whenever you change the ContributionId, you must change the TaskID.
You can't change the TaskID and the TaskName at the same time.
This essentially blocks people from changing the public identity of a Task once published in an extension it seems. When you try the marketplace will fail to validate your extension with an error message:
ERROR: Contribution Microsoft.VisualStudio.Services.TaskId.VARIABLE-TRANSFORM is re-using task ID of some other contribution from earlier version.
To publish the extension, change the task ID.
or
ERROR: All the task versions belonging to Contribution variable-transform should have the same task id.
The tasks at variable-transform/v1 (version 1.4.41) and variable-transform/v2 (version 2.0.41) do not have the same ids.
A possible workaround I see is to publish a new extension with a new Id, new Contribution Id's, new Task Ids and new TaskName, but that would require admin approval and installation of that new extension into any and all of the 6000+ users of the extension. That's an impossible ask.
I could accept that the ExtensionId is going to be impossible to fix and just add new tasks into the existing extensions, with new names, new Id's and all, but that will break the auto-update feature for all of the UI based users (I have no telemetry on how many of these there are), my guess is many, cause many of my tasks provide a UI to make working with script and command lines easier. The ability to seamlessly upgrade from one extension to the next is one of the things I've spent a lot of time on in the past. Adding aliases and sensible default values to input fields causes minimal fuss when upgrading from v1 to v2 for the Variable Tasks for example.
See the example below:
The input type changes from a input field to a dropdown, the YAML representation changes to a lower case for a number of fields and a number of new options appear based on the reflected value in the dropdown. All without the user having to do anything to get access to these new features.
If TFS/Azure DevOps doesn't recognize the Task as a new version of something in the pipeline, users of the UI based pipelines and old Release pipelines (and basically all TFVC users) will need to add a new copy of the task, copy all of the values from A to B and then remove the old task. I do not want to cause them that much pain.
I'm guessing the answer is going to be no, but have I missed any option to allow my users to seamlessly upgrade, yet allow me to keep improving the way new users have to type YAML to access these tasks? I'm not aware of any way to provide an alias identity for the Task itself (previous names, guids), nor for the contribution id... Similarly, I'm not aware of a way to get an extension containing build tasks renamed on the marketplace...
I think that you're already answered your own question:
Keep it this way.
Add new extension(s).
Yes, for a user it's a pain.
Especially when you rely on an admin approval for installing extensions.
You could offer a PowerShell script to migrate all tasks in the pipelines via the REST API of Azure DevOps. But that's still a lot of work and needs a certain technical knowledge (and permissions).
Microsoft tasks are the only one that are really short, but that's probably because it are native tasks and no extensions.
If you look at some extension names in the marketplace you're not the only one with this "issue". Maybe Microsoft will come up with an solution.

Azure DevOps Projects List GET not returning a project

When running the Azure DevOps Projects List GET, one particular Project is excluded from the results. I cannot find any different settings. I am the admin of it. I can add new projects, and there were projects I created before it, that all show up in the results. It's the API call as documented here: https://learn.microsoft.com/en-us/rest/api/azure/devops/core/projects/list?view=azure-devops-rest-5.0
I cannot find explanation of why a project is excluded from the results aside from Project State, which I have troubleshot already.
I've already tried running the GET API in the browser and I do not return the missing project. I have tried creating another project in the same manner and it appears in what is returned. I have added an argument for Project State = All, and that does not improve the outcome.
Under what circumstances is a project excluded from these results as a standard (undocumented) constraint?
edit: I am a project admin, and I have access to the default project team. I have tried recycling things in the background by changing the Project Name back and forth, and having myself removed as Admin and added back in, with no change in the API response.
edit: It seems like the more important question is how to force Azure DevOps to cycle the 'lastUpdateDate', when it's currently set to a non-date.
This may be due to the fact that the result set for the call is 100 entries. So you either need to use the continuationToken to get the next 100 entries, and so on. Otherwise, you can also use the $top query parameter:
https://-collection_url-/_apis/projects?api-version=5.0&$top=200

How to Assign task in VSTS Online

I have created my account in Visual Studio Team Services, and added the team members as well. I am able to see the uses got added.
But I cannot see them when I tried to assign work for them. Everybody's acccess level including me, is Basic and I have added them as Project Contributors, and me in Project Administrators group.
When I tried to create a new work item (new feature), on the Unassigned text box, no users name is popping up.
Any idea where I am going wrong? Please provide any suggestion.
The work item control is changed to a MRU control, so people you care about most show up immediately. Since you never assign tasks before, you would see "No identities found" in the drop down:
You can type the user name and then click "Search" in the drop down:
Then you'll see the user:

OpsHub Visual Studio Online Migration Utility not migrating all Work Item to changeset links from TFS2010

When migrating our TFS project from TFS 2010 to Visual Studio Online a number of the Work Item -> changeset links do not appear to be migrated - I can confirm however that at least some are successfully migrated.
For the problem work item in Visual Studio Online I can see that there is a message in the work item history "Associated with changeset XXXXX", but the "All Links" tab shows no links.
I have discovered that Work Item -> Changeset links will not be migrated if the data for the Work Item is considered invalid. For instance, this occurs for us when existing work items have a custom State value (which can occur if you have previously customised your WIT project template as we have, and subsequently remove all customisations prior to the migration without updating any field data). You can generally tell if this is causing the work items to not be migrated as you will see a validation error when viewing the work item on Visual Studio online, e.g. "The field 'State' contains the value 'New' that is not in the list of supported values". However, this does not appear to be the only reason for this problem to occur as some of our problem work items do not exhibit this trait.
Are there any other known reasons for why Work Item links might not be migrated?
I have discovered that at least for my scenario, Work Item links are not migrated when the user who created the Work Item in the source TFS server is mapped to "Anonymous" user in VSO during migration. To work around this, rather than mapping all extraneous users to "Anonymous" I mapped them to an actual user.

TFS Changing Work Item Priority Field Randomly

I am using TFS2012 and I have found a strange issue that happens in only a couple of cases when using Excel to update the TFS work items. For some reason, a work item's priority is randomly assigned the value of 2 when ever another field is changed. I have been able to reproduce it when using excel but nothing more.
I am starting to suspect some sort of setting in the backlog configuration or in the project common configuration despite already extracting the project's common config. I have also checked the work item workflows and i do not see any issues with them
Anyone know what might be a possible cause for this issue?