  Let $k$ be any field, $p>3$ be any prime number and $G$ be a nonabelian
$p$-group of order $p^{5}$. Consider the action of $G$ on the rational function
field $k(x_{h}:h\in G)$ by $g\cdot x_{h}=x_{gh}$ for all $g,h\in G$. Let $e$ be
the exponent of $G$. Noether's problem asks whether the fixed field
$k(G)=k(x_{h}:h\in G)^{G}$ is rational (i.e., purely transcendental) over $k$.
In this paper, we will prove that if $G$ does not belong to the isoclinic
family $\Phi_{10}$ in James's classification \cite{Jam1980} and $k$ contains a
primitive $e$th root of unity, then $k(G)$ is rational over $k$. As a
corollary, if $k=\textbf{C}$ is the field of complex numbers, then
$\textbf{C}(G)$ is rational over $\textbf{C}$ if and only if $G$ is not in the
family $\Phi_{10}$. This refines a recent result of Hoshi, Kang and Kunyavskii
(\cite{HKK2012}, Theorem 1.12).
