Upon the trial of claims to property which may be pending in the court, when damages are found by the jury, the damages shall be assessed upon the whole amount then due upon the execution when the value of the property in dispute exceeds the amount of the execution and upon the value of the property when the value of the property is less than the execution levied.