The man who attacked NCIS star Pauley Perrette had a hearing on Thursday, Oct. 6 and was ordered to join a jail-based mental treatment program.

ET reported that David Merck was ordered to serve time in the San Bernardino County jail's competency treatment program, which is in place for those with mental health issues who are incompetent to stand trial.

As we reported, Merck was charged with punching and threatening the actress last year. After the incident, Perrette tweeted that she "almost died."

Unfortunately, she had another scary encounter two months later as she drove home from filming an episode of NCIS.

Of that incident Perette said that after she gave a man who she believed was homeless money, he grabbed her wrist and tried to get into her car.