Hi there:

In theory, "I haven't got to do it" should become "I didn't have to do it" in the past. But, can anyone tell me if you can say "I wish I hadn't got to do it"? In this case, it's not really a past, is it? Do you think it is correct?

Thank you.
"I wish I hadn't got to do it" sounds very odd to me. I would think that either it should be "I wish I hadn't gotten to do it," meaning "I wish now that I had not had the opportunity to do it" or that it's just an incorrect version of "I wish I didn't have to do it," meaning "I wish I was not required to do it." Unless it's some British or perhaps archaic consturction that I'm unfamiliar with, I think it's not correct and therefore it's not clear what it is supposed to mean.
I don't think the "opportunity" meaning of "to get to do something" enters into this question, but rather "I've got to do something" meaning "I have to do something".

I think that maybe only the British use the past tense of "I've got to do it": "I had got to do it" = "I had to do it". And then, maybe not even they use it.

An expression equivalent to the past tense (backshifting) occurs after "wish" with present meaning, so we have the analogy:

I have to do it. : I've got to do it. :: I wish I didn't have to do it. : I wish I hadn't got to do it.

I would explain this as follows: "have got to" (showing obligation) is a defective idiom, i.e., can't occur in all the tenses. Therefore, after "wish", "have got to" becomes "didn't have to", not "hadn't got to".

This is not really different from the case of the defective modals "must" and "can".

Today I must do it. Yesterday I [*musted / had to] do it.
Today I can do it. Tomorrow I will [*can / be able to] do it.

Students: Are you brave enough to let our tutors analyse your pronunciation?
I would say that "I wish I hadn't got to do it" doesn't carry the same meaning as is implied by the other two. "I wish I hadn't had to do it" would convey the meaning I believe you're trying to express.
However "I wish I hadn't got to do it" makes sense, if you had won a competition of some kind to be allowed to do something, but now regret winning that competition.
 khoff's reply was promoted to an answer.
 CalifJim's reply was promoted to an answer.
Teachers: We supply a list of EFL job vacancies