コード例 #1
0
        private async Task VerifyQueryExistsAndIsValid(IValidationContext context)
        {
            Logger.LogInformation(LogDestination.File, "Checking if the migration query exists in the source project");
            QueryHierarchyItem query;

            try
            {
                query = await WorkItemTrackingHelpers.GetQueryAsync(context.SourceClient.WorkItemTrackingHttpClient, context.Config.SourceConnection.Project, context.Config.Query);
            }
            catch (Exception e)
            {
                throw new ValidationException("Unable to read the migration query", e);
            }

            if (query.QueryType != QueryType.Flat)
            {
                throw new ValidationException("Only flat queries are supported for migration");
            }
        }