I THINK IT IS WRONG
I will have done this before that happens
The sentence mentioned in your query is correct and shows the correct usage in future perfect tense.
Here are a few more sentences in the same context for your better understanding:
I shall have completed the task by then;
He will have left before you go to see him;
By the end of this month I will have worked here for five years.