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

FixAreaPathAndIterationPathForTargetQuery Not Populating #2232

Closed
MrHinsh opened this issue Aug 1, 2024 · 0 comments · Fixed by #2233
Closed

FixAreaPathAndIterationPathForTargetQuery Not Populating #2232

MrHinsh opened this issue Aug 1, 2024 · 0 comments · Fixed by #2233

Comments

@MrHinsh
Copy link
Member

MrHinsh commented Aug 1, 2024

Hi,
This conversation is quite old.. but.. having kind of the same issue. So wonder if you guys can help.
Ran some migrations when the query was to migrate all with version 15.0. No problems there. Migrating from Az DevOps to Az DevOps.

Now, using v15.1, as the source has thousands of items... I filtered the query based on an area path, but it errors (see below).

The area path is complaining about, exists in the source, so thought the area did not exist in the target, so I created the team and the area associated to it, but did not help.

[09:30:48 INF] [15.1.6] [FilterWorkItemsThatAlreadyExistInTarget] is enabled. Source project RBS Portfolio is replaced with target project EVR Applications Portfolio on the WIQLQuery which resulted into this target WIQLQueryBit "SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State], [System.AreaPath], [System.CreatedDate] FROM workitems WHERE [System.TeamProject] = 'EVR Applications Portfolio' AND [System.CreatedDate] > '2024-07-30' AND [System.AreaPath] UNDER 'EVR Applications Portfolio\Practices\Integration\RT-Horizon'" .
[09:30:48 DBG] [15.1.6] FilterExistingWorkItems: START |
[09:30:48 DBG] [15.1.6] FilterByTarget: Query Execute...
[09:30:48 DBG] [15.1.6] WorkItemQuery: ===========GetWorkItems=============
[09:30:48 DBG] [15.1.6] WorkItemQuery: TeamProjectCollection: https://dev.azure.com/elkvalleyresources/
[09:30:48 DBG] [15.1.6] WorkItemQuery: Query: SELECT [System.Id], [System.WorkItemType], [System.Title], [System.AssignedTo], [System.State], [System.AreaPath], [System.CreatedDate] FROM workitems WHERE [System.TeamProject] = 'RBS Portfolio' AND [System.CreatedDate] > '2024-07-30' AND [System.AreaPath] UNDER 'RBS Portfolio\Practices\Integration\RT-Horizon'
[09:30:48 DBG] [15.1.6] WorkItemQuery: Parameters: {"TeamProject": "EVR Applications Portfolio", "ReflectedWorkItemIdFieldName": "Custom.ReflectedWorkItemId"}
[09:30:48 DBG] [15.1.6] WorkItemQuery: TeamProject: EVR Applications Portfolio
[09:30:48 DBG] [15.1.6] WorkItemQuery: ReflectedWorkItemIdFieldName: Custom.ReflectedWorkItemId
[09:30:48 DBG] [15.1.6] Query sent
[09:30:48 ERR] [15.1.6] Error running query
Microsoft.TeamFoundation.WorkItemTracking.Client.ValidationException: TF51011: The specified area path does not exist. The error is caused by «'RBS Portfolio\Practices\Integration\RT-Horizon'».
at Microsoft.TeamFoundation.WorkItemTracking.Client.Query.Initialize(WorkItemStore store, String wiql, IDictionary context, Int32[] ids, Int32[] revs, Boolean dayPrecision)
at Microsoft.TeamFoundation.WorkItemTracking.Client.WorkItemStore.Query(String wiql, IDictionary context)
at MigrationTools._EngineV1.Clients.TfsWorkItemQuery.GetWorkItemsFromQuery(TfsWorkItemMigrationClient wiClient) in D:\a\azure-devops-migration-tools\azure-devops-migration-tools\src\MigrationTools.Clients.AzureDevops.ObjectModel_EngineV1\Clients\TfsWorkItemQuery.cs:line 53

Any thoughts??

Thanks.
Norman.

Originally posted by @NormanGarciaV in #1529 (reply in thread)

@MrHinsh MrHinsh linked a pull request Aug 1, 2024 that will close this issue
MrHinsh added a commit that referenced this issue Aug 1, 2024
🐛 (WorkItemMigrationContext.cs): fix variable name from
_config.WIQLQuery to targetWIQLQuery

The variable name _config.WIQLQuery is incorrect and should be
targetWIQLQuery to match the intended logic and improve code
readability. This change ensures that the correct query is used for
filtering existing work items, preventing potential migration issues.

Fixes: #2232
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant