I have my todonotes set up as follows:
\documentclass{article}
\usepackage{tikz}
\usepackage{todonotes}
\usepackage{hyperref}
\usepackage{setspace}
\usepackage{kantlipsum}
\newcounter{todoListItems}
\newcommand{\sstodo}[2][]
{\refstepcounter{todoListItems}{1}
\todo[caption={\protect\hypertarget{todo\thetodoListItems}{}\arabic{todoListItems}. #2}, #1]
{\begin{spacing}{1} \hfill \hyperlink{todo\thetodoListItems}{#2} \end{spacing} }}
\makeatletter\let\chapter\@undefined\makeatother
\begin{document}
\listoftodos
\kant[1] \sstodo{First}
\kant[2] \sstodo{Second}
\kant[3] \sstodo{Third}
\end{document}
As you can see, I have a custom counter set up to count the todos (instances of the custom \sstodo) and print the value in the list of todos. I'd like to be able to reference a given todo and have the number of the todo pulled printed with the \ref. I'd like to do this in a way where the labels for the todos are automatically generated.
I also realize that I might be thinking about how to accomplish what I'm looking for in the wrong way. What I'm after is an easy way to cross-reference todonotes that doesn't require manually adding a label to each todonote. The purpose of this is to allow for easy referencing of todo items among collaborators.
I tried using the solution here but was unable to get it to work (though that is what made me change my \addtocounter to \refstepcounter).


todonote. I managed to get rid of this in a later attempt with:\newcommand{\sstodo}[2][] {\addtocounter{todoListItems}{1} \todo[caption={\protect\hypertarget{todo\thetodoListItems}{}\arabic{todoListItems}. #2}, #1] {\begin{spacing}{1} \hfill \hyperlink{todo\thetodoListItems}{\thetodoListItems :{} #2} \end{spacing} }}but I don't understand what produced the in-text todonote number. – Dennis Feb 13 '14 at 03:52\refstepcounter{todoListItems}{1}. The '1' is just being printed as such. It is not printing the counter at all in that case which is why every instance is '1'. It was that which made me think you wanted the counter in the text but had mistakenly printed '1' in each case instead. You can just delete{1}in the first case or the\arabic{...}(as you realise) in the second. – cfr Feb 13 '14 at 16:22