Error (One or more checked work items failed the transition testing due to invalid field values. Please correct the values and retry the check-in) while checking in the code in Visual Studio
While checking in the code change the related work item as associate instead of resolve from the visual studio as shown below.
Also to resolve this permanently you can change the visual studio settings as per your needs