Members of the police force, whenever necessary for the purpose of enforcing the ordinances of the city, shall procure the issuance of warrants, serve the same, and appear in the city courts as prosecutors, relieving complaining citizens insofar as practical of the burden of instituting cases involving the violation of city ordinances; but this section shall not be construed to relieve any person from the duty of appearing in court and testifying in any case.