After a search on the internet I found out that this is Yellow Shoulder Disorder. The fruits do ripen but stay yellow (or green) at the top of the fruit. At first I thought it was some kind of insect or fungal problem …but it isn’t.
Heat and Soil
It seems to be caused by extreme heat and/or poor soil conditions. Yellow shoulder disorder can be prevented by changing the soil pH and adding organic matter to the soil.
Also, tomatoes grown on soils with a high potassium level are less likely to suffer from yellow shoulder disorder. Crop rotation, shielding the plants from the sun on the hottest days, soil testing before planting out and using a feed especially for tomatoes (with a higher potassium level) will all help to produce healthy tomatoes and prevent yellow shoulder disorder.
The ripe tomatoes are still edible although the yellow part has lost its nutritional value and flavour. There is nothing I can do for this year’s crop but use the tomatoes to make roasted tomato sauce.
After the season is over I will add loads of organic matter and test the soil before planting out and starting over again next year.