Upon the final trial of any such action, if the verdict be for the plaintiff, and he be not already in the possession of the property claimed, the judgment shall be that he recover the possession of such property, if a recovery thereof can be had; and if not, that he recover the value thereof as found by such verdict; and, in either event, that he recover the damages assessed by the jury for the detention of such property, and his costs in such action. And it shall be the duty of the jury in such cases to ascertain and assess such damages as the plaintiff has sustained by reason of the detention of such property by the defendant. If the plaintiff be already in possession of such property, the judgment shall be that he retain the possession thereof, and for damages and costs, as aforesaid. In case the verdict at such trial be for the defendant, if the plaintiff be in possession of the property claimed, the judgment shall, in like manner, ascertain and assess the damages sustained by the defendant by reason of the detention of such property by the plaintiff and also the value of such property, and judgment shall be entered upon such verdict in all respects as is provided in case the verdict be for the plaintiff. If, on an issue concerning several things in one count, no verdict be found for part of them, it shall not be error, but the plaintiff shall be barred of his title to the things omitted; and if the verdict omit price or value, the court may at any time have a jury impaneled to ascertain the same.