Preheat the oven to 190°C (375°F) or 170°C fan.
Heat olive oil in a large casserole dish over medium-high heat.
Season the chicken thighs with salt and pepper, then brown on both sides until golden. Remove and set aside.
In the same pan, cook the onion and bell peppers until softened.
Add garlic and mushrooms, cooking for another 2–3 minutes.
Sprinkle over the flour and stir well.
Pour in the white wine and scrape up any browned bits from the bottom of the pan.
Stir in chopped tomatoes, tomato purée, sugar, thyme, rosemary, capers, and olives.
Bring the sauce to a gentle simmer.
Return the chicken to the pan and spoon some sauce over the top.
Cover and bake for 35–40 minutes, or until the chicken is tender and fully cooked.
Remove the lid for the final 10 minutes if you prefer a thicker sauce.
Garnish with fresh parsley and serve hot.