Use 'preload' in export to CSV
If issues are filtered by multiple labels, then GROUP BY statement is used to filter only issues with these labels. This is problem in combination with '.includes' which may use JOIN statement to load associated resources in single query instead of a separate query. Then the generated SQL query fails because associated resources are included in 'SELECT ...' statements but not in the GROUP BY statement. Usage of '.preload' instead of '.includes' ensures that Active Record uses a separate query instead of JOIN. Closes #4376
Showing
Please register or sign in to comment