Homotopy classification of maps into nilmanifolds I am interested in answers or reference in the literature to the following problem:

Classify up to homotopy all maps $A\to X$, where $A$ is a closed oriented manifold and $X$ is a closed nilmanifold of the same dimension as $A$.

Of course by "classify'' here we mean describe a complete set of invariants to distinguish between maps up to homotopy, for instance in terms of cohomology.
Recall that a nilmanifold is an aspherical manifold whose fundamental group is nilpotent and torsion-free. One can build its refined Postnikov tower directly from the lower central series of the fundamental group, as in this question. This exhibits the nilmanifold as an iterated principal torus bundle.
For this reason I feel that the problem may be approachable. For instance, if $X$ is an abelian nilmanifold (ie a torus) then a map $A\to X$ is classified by a tuple of elements of $H^1(A;\mathbb{Z})$.
Meanwhile, I am well aware that solutions to problems of this type usually exist only in the case where $X$ is simply-connected, and without this assumption things become considerably more complicated.
I would be happy with an answer in the simplest non-trivial case, ie when $X$ is the $3$-dimensional Heisenberg manifold.
 A: This is not a complete answer, but I can say something on the $3$-dimensional case. The Heisenberg manifold $Z$ is the circle bundle $Z \to T^2$ of Chern class $1$. Thus there is a (homotopy) fibration
$$Z \to T^2 \to CP^{\infty}.$$
Let's say you want based maps. For any space $X$, you get a fibre sequence
$$map_+ (X;Z) \to map_+ (X;T^2) \to map (X;CP^{\infty}$$
of mapping spaces. It is easy to see that there are homotopy equivalences $map(X,T^2) \simeq H^1 (X;\pi_1 (T^2))$ and $map (X;CP^{\infty}) \simeq H^2 (X) \times BH^1 (X)$; the latter one is not natural in $X$.
Therefore the long exact homotopy sequence yields
$$0 \to H^1 (X)  \to [X,Z ]_+ \to H^1 (X; \pi_1 (T^2)) \to H^2 (X).$$
The third map is not a group homomorphism; it sends an element represented by a homotopy class $X \to T^2$ to the Chern class of the pullback bundle. The first map is the action of $H^1 (X)=[X,T^1]$ given by the $T^1$-action on the fibres of $Z \to T^2$. We see that this action is free.
An interesting special case might be $X=T^3$. Here $H^1 (X,\pi_1 (T^2))$ is the abelian group of all $2 \times 3$-matrices, and the map to $H^2 (T^3)= \Lambda^2 \mathbb{Z}^3$ (the group of skewsymmetric $3 \times 3$-matrices) is given by $A \mapsto A^t J A$, with 
$$J=\begin{pmatrix} 0 & -1 \\ 
1 & 0\end{pmatrix}.$$
Thus there is the following result:
Proposition: ''If $X=T^3$, the action of $H^1 (X;T)$ on the set $[X,Z]_+$ is free and the set of orbits can be identified with the solution set of $A^t J A =0$ in the group of $2 \times 3$-matrices.''
