"And did those feet in ancient time" is a poem by William Blake from the preface to his epic Milton: A Poem in Two Books, one of a collection of writings known as the Prophetic Books. The date of 1804 on the title page is probably when the plates were begun, but the poem was printed c. 1808. Today it is best known as the anthem "Jerusalem", with music written by Sir Hubert Parry in 1916. It is not to be confused with another poem, much longer and larger in scope, but also by Blake, called Jerusalem The Emanation of the Giant Albion.

Answer this question based on the passage: who wrote the music for the hymn jerusalem? Let's have some stream of consciousness first.
The relevant information is: Today it is best known as the anthem "Jerusalem", with music written by Sir Hubert Parry in 1916. So, the answer is Sir Hubert Parry.