The city attorney shall act as legal adviser and attorney and council to the city and all its officers in matters relating to their official duties and in addition thereto shall perform such other duties as the board of city commissioners shall prescribe.