When investigating and later prosecuting a crime, authorities normally look for three things: means, motive, and opportunity. In other words, a suspect must have had the means to commit a crime, a reason why they would commit that crime, and an actual chance to commit the crime.
A trial occurs when there is an issue of fact that a jury will need to decide. For example, if a defendant pleads guilty to a crime, they are effectively admitting to the court that they committed it, therefore a trial will not need to be held. Here, however, there is a trial proceeding involving James. That being said, a court is going to want to hear facts that are material; namely, facts that speak to the means, motive, and opportunity of the defendant.
Let's consider this from Officer Smith's perspective. He knows that James had assaulted Janice, and he knows that Janice sincerely felt threatened by James (with good reason). His testimony would be material to the trial; it establishes that James had the motive necessary to hurt Janice. He demonstrated it by assaulting and later threatening her.
As far as options the police have in this situation, they can certainly have Officer Smith or another officer testify against James. They also might continue searching for evidence that James committed the crime. A judge will normally allow evidence to be introduced during a trial as long as it is relevant and material to deciding the case.