Rule reminder
Imperfect + da = 'had been doing X for Y when...' (past ongoing, later interrupted). Present + da = 'have been doing X for Y' (still ongoing now).
Quale frase corrisponde a: 'He had been working on the project for months when the client cancelled it'?