Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Sometimes the tool creates Empty workitems - no title, and set to new... no fields mapped #1961

Open
MrHinsh opened this issue Feb 27, 2024 · 14 comments

Comments

@MrHinsh
Copy link
Member

MrHinsh commented Feb 27, 2024

I am trying to migrate around 1600 workitems and when the migration is completed, Its creating empty workitems. Why this happens and how can I compare which workitems these are to compare with source
image

Originally posted by @madhuripawar2212 in #1955

We need someone with this issue to run a single specific work item with this issue in Visual Studio and try to diagnose this issue... we have been unable to replicate it.


HELP NEEDED - We are unable to replicate this! But it does happen!

Can someone with this error please run a specific work item that they find has this issue through the tool and do one of the following:

Option 1: Generate and attach Log - if you are non-technical this is your option. It might provide us with enough info to diagnose, but may only result in more asks.

  1. In the Config file change LogLevel to Debug.
  2. Find a work item ID that has this issue, and craft a query that only selects this work item.
  3. Delete any target copy of that work item.
  4. Then run the migration
  5. Comment here with the full Log attached

Option 2: Debug in Visual Studio - This option is best but requires some developer experience.

  1. Fork the Repo and Clone it to your local computer
  2. Open the Solution in Visual Studio (we use 2022) and do a Full Rebuild
  3. Edit the Launch Profile to point to your config.
    image
  4. Craft the query to only load the work item with the issue
  5. "Play" the Launch Profile that you created and investigate

Create a comment below with the results of your investigation!

@MrHinsh MrHinsh changed the title I am trying to migrate around 1600 workitems and when the migration is completed, Its creating empty workitems. Why this happens and how can I compare which workitems these are to compare with source Sometimes the tool creates Empty workitems - no title, and set to new... no fields mapped Feb 27, 2024
@MrHinsh MrHinsh changed the title Sometimes the tool creates Empty workitems - no title, and set to new... no fields mapped [Bug] Sometimes the tool creates Empty workitems - no title, and set to new... no fields mapped Feb 27, 2024
@MrHinsh MrHinsh self-assigned this Feb 27, 2024
@madhuripawar2212
Copy link

I tried migrating less than 500 workitems at a time and it worked for me. When I try to migrate more than 1000, empty workitems are getting created

@MrHinsh
Copy link
Member Author

MrHinsh commented Mar 1, 2024

Thats very odd @madhuripawar2212 as the number of items should be irrelevant to the issue.

  • How are you running the tool?
  • What is the specification of the computer?
  • Is it behind a proxy?

@madhuripawar2212
Copy link

How are you running the tool? - I am running the tool from local using Visual Studio code
What is the specification of the computer? - What exactly this means?
Is it behind a proxy? - No

@MrHinsh
Copy link
Member Author

MrHinsh commented Mar 2, 2024

If it's working for batch sizes of 500 but not for 1000 then that would indicate a local computer issue.

We have run batches of 15000 with no issues and I'm interested in figuring out why this issue happens.

Copy link

github-actions bot commented Apr 2, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days

Copy link

github-actions bot commented May 3, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days

Copy link

github-actions bot commented Jun 3, 2024

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days

@FlexiGit
Copy link

FlexiGit commented Jun 13, 2024

Hi MrHinsh,

I can reproduce the error in VS. What information do you need?

As far as I can see, the error arises when the TF library tries to load a revision of a work item with a type that doesn't exist anymore (The type of the work item has changed). And creating a mapping for the old type does not help.

At least I guess that's the cause. I'm not totally sure, if the Error in the logs and thus the exception does really produce the empty work items.
Scratch that. I ran a query in the target project right before and right after the exception. And it very much indeed looks like that's the cause.

[17:36:08 ERR] [v15.0.4-0-local] Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemTypeDeniedOrNotExistException: TF201077: The work item type  cannot be found. It may have been renamed or destroyed.
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.get_Type()
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemFieldData.Microsoft.TeamFoundation.WorkItemTracking.Internals.IWorkItemOpenFieldDataHelper.SetLatestData(Dictionary`2 latestData)
   at Microsoft.TeamFoundation.WorkItemTracking.Internals.WorkItemHelper.LoadWorkItemFieldData(IRowSetCollectionHelper tables, IWorkItemOpenFieldDataHelper helper)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem.LoadWorkItemFromRowSetInternal(Int32 rev, Nullable`1 asof, IWorkItemRowSets witem)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItem..ctor(WorkItemStore store, Int32 id, Int32 revision)
   at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.GetWorkItem(Int32 id, Int32 revision)
   at MigrationTools.TfsExtensions.GetRevision(WorkItemData context, Int32 rev) in C:\GitRepos\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel\TfsExtensions.cs:line 35
   at VstsSyncMigrator.Engine.WorkItemMigrationContext.ReplayRevisions(List`1 revisionsToMigrate, WorkItemData sourceWorkItem, WorkItemData targetWorkItem) in C:\GitRepos\azure-devops-migration-tools\src\VstsSyncMigrator.Core\Execution\MigrationContext\WorkItemMigrationContext.cs:line 726

@MrHinsh
Copy link
Member Author

MrHinsh commented Jun 13, 2024

It probably means that there is a casing mismatch for the mapping.... let me look and see....

@FlexiGit
Copy link

Could it help to recreate the missing work item type in the source project?

@MrHinsh
Copy link
Member Author

MrHinsh commented Jun 14, 2024

All work item types from the source must exist or be mapped in the target.

At the moment there is certainly a casing issue with types that have "task" in the source and "Task" in the target.

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days

Copy link

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 10 days

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants