A peace officer who receives a regular salary, or any other public official, shall not receive fees as a witness in any case for testifying in regard to any matter coming to the officer's or official's knowledge in the discharge of the officer's or official's official duties in that case in a court in the county of the officer's or official's residence, except peace officers who are called as witnesses when not on duty.
Iowa Code § 622.71
2016 Acts, ch 1073, §165