[Tex/LaTex] Enumerate list numbering to include chapter number

#enumeratelists

How does one include chapter number in the enumerate list number? For example if I have list in chapter 3, I would like to have the following list (independent of section in which it occurs).
The numbering should continue across different enumerate lists in the same chapter.

Example:

Chapter 3
Section 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit:
3.1 Pellentesque
3.2 a aliquam
3.3 Elis

Section 2
Lorem ipsum dolor sit amet, consectetur adipiscing elit:
3.4 Pellentesque
3.5 a aliquam
3.6 Elis

Chapter 4
Section 1
Lorem ipsum dolor sit amet, consectetur adipiscing elit:
4.1 Pellentesque
4.2 a aliquam

Best Answer

Using the enumitem and etoolbox package, the important parts are:

 % include the chapter number
 \setlist[enumerate]{label=\thechapter.\arabic{*},resume}

 % restart the enumerate list every chapter
 \preto\chapter{%
   \restartlist{enumerate}%
}

Here's a complete MWE:

% arara: pdflatex
 \documentclass{report}

\usepackage{enumitem}
\usepackage{etoolbox}

 % include the chapter number
 \setlist[enumerate]{label=\thechapter.\arabic{*},resume}

 % restart the enumerate list every chapter
 \preto\chapter{%
   \restartlist{enumerate}%
}

 \begin{document}

    \chapter{one}
    \begin{enumerate}
        \item \label{testref} first
        \item second and cross reference: \ref{testref}
    \end{enumerate}
    more
    \begin{enumerate}
        \item third
        \item fourth
    \end{enumerate}

    \chapter{two}
    \begin{enumerate}
        \item \label{secondref} first
        \item second and cross reference: \ref{secondref}
    \end{enumerate}
    more
    \begin{enumerate}
        \item third
        \item fourth
    \end{enumerate}
    \end{document}