I try to create a WIQL query that compares field contents of a work item and its related (linked) work items, e.g. where the 'state' of the work item is different from the 'state' of the related work item.
SELECT [System.Id], ... FROM WorkItemLinks WHERE ...
[Source].[System.State] <> [Target].[System.State])
ORDER BY [System.CreatedDate] desc, [System.AssignedTo] mode(MayContain)
(The ... above only indicate the parts that I have ommitted here for clarity.)
When I try to apply the query, I get this error message from TFS:
The link query can not mix expression with different prefixes
Is there a way to compare source and target fields with WIQL?