public bool CompareWorkItemType()

in Common/Validation/WorkItem/ValidateWorkItemTypes.cs [206:231]


        public bool CompareWorkItemType(IValidationContext context, string workItemType, ISet<string> sourceFields, ISet<string> targetFields)
        {
            if (!sourceFields.Any() || !targetFields.Any())
            {
                return false;
            }
            var matches = true;
            foreach (var field in sourceFields)
            {
                if (!context.ValidatedFields.Contains(field) && !context.SkippedFields.Contains(field))
                {
                    if (!targetFields.Contains(field))
                    {
                        matches = false;
                        context.SkippedFields.Add(field);
                        Logger.LogWarning(LogDestination.File, $"Target: Field {field} does not exist in {workItemType}");
                    }
                    else
                    {
                        matches &= CompareField(context, context.SourceFields[field], context.TargetFields[field]);
                    }
                }
            }

            return matches;
        }