django__django-16032
__in doesn't clear selected fields on the RHS when QuerySet.alias() is used after annotate().
Verdict: the fix is stated in the issue (Tier A).
The proper solutions is likely to replace Query.has_select_fields by a class attribute that defaults to False and have set_values set it to True and make sure Query.clone carries the attribute over.
The text states the fix: “The tests are failing because RelatedIn also needs adjustments to make sure it goes through Query.set_values instead of calling clear_select_clause and add_fields”
All SWE-bench Verified tasks · more django/django tasks · How the check works