Replies: 1 comment 1 reply
-
Can you check the implementation in #2868? |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hi all,
I just found out that string comparisons use == to compare for existing entries. Example:
From TfsTeamSettingsProcessor line 113:
var foundTargetTeam = (from x in targetTeams where x.Name == sourceTeam.Name select x).SingleOrDefault();
This is checking if a team exists in target and if not, it will try to create the team. However if someone manually creates the teams upfront and is not considering case sensitivity (e.g. source is "Superdev team" and target is "SuperDev Team") then it will not match.
However, when the TfsTeamService.CreateTeam() method is called, it will fail and throw an exception the team already exists.
I would therefore suggest to replace string comparisons where ADO itself does not differentiate between 'a' and 'A' so the comparison should be more like:
string.Equals(source, target, StringComparison.OrdinalIgnoreCase);
Any thoughts?
Best,
Chris
Beta Was this translation helpful? Give feedback.
All reactions