YOU SAID:
if what you is when have done
INTO JAPANESE
あなたがいつ何をしたか
BACK INTO ENGLISH
what you did when
INTO JAPANESE
いつ何をしましたか
BACK INTO ENGLISH
what did you do when
INTO JAPANESE
いつ何をしましたか
BACK INTO ENGLISH
what did you do when
That didn't even make that much sense in English.