ことがあった

had ... before

→ こと
phrase Uncommon #9,371
had ... before After a verb in the past form, this describes a past experience. Depending on context, it can also mean that something happened or that there was a time when something was true.
JA: 前にその映画を見たことがあった。
EN: I had seen that movie before.

でもなんだかとってもいいことがあったみたいな顔ね

But you look like something really good happened.

— When Marnie Was There (2014)

前に会ったことがあったので、その人だとすぐわかった。

Since I had met him before, I recognized him right away.

かつてトマトは有毒だと信じられていたことがあった。

There was a time when tomatoes were believed to be poisonous.

でも、二人とも少なくとも一度は、親と一緒に水の上にいるのを見たことがあった。

But both of them had seen themselves on the water with their parents at least once.

ゆうべ奇妙なことがあった。

Something strange happened last night.

以前に会ったことがあったので、ハリントンさんがすぐに分かりました。

I recognized Mr. Harrington right away because I had met him before.

彼女の夢を見たことがあったから。

Because I’d had a dream about her.

私はシャドウズ号で短い航海をしたことがあった。

I had once taken a short voyage aboard the Shadows.

父はギリシアに行ったことがあった。

My father had been to Greece.

私に何か言いたかったことがあったの?

Was there something you wanted to tell me?

いいことがあったのね

Something good happened, huh?

— レベッカ (1940)

これにはもう一ついいことがあった。

There was another good thing about this.

ふと気にかかることがあった。

Something suddenly crossed my mind.

以前に一度会ったことがあった。

I had met them once before.

それ以前にも何度か彼女に会ったことがあった。

I had met her several times before that.

ヴィクターはそのことを読んだことがあった。

Victor had read about it before.

あり得ないことがあったのよ。

Something unbelievable happened.

先生がすぐわかった、というのは以前に会ったことがあったからだ。

The reason the teacher recognized me right away was that we had met before.

それは以前にもそう呼ばれていたことがあったな

It was called that before, too.

— ロード・オブ・ザ・リング (2001)

今までも彼はこんな風にいなくなることがあった?

Has he ever disappeared like this before?

— Article 15 (2019)

今日は、いろんなことがあったなぁ。

A lot happened today.

彼には以前一度会ったことがあったので、彼だとすぐわかった。

Since I had met him once before, I recognized him right away.