This question already has an answer here:
I am working on a number of maintenance projects and I always include requirement/issue number/code in the the comments whenever I am adding or changing code. In such way I provide traceability from requirements to the code and back. My experience is that such effort can be of really great help for furhter maintenance, especially if requirements are changing or are updates due to initial inconsitencies in the requirements.
However, I have seen source code from other projects which have no comments at all and I can only guess what part of the code is implementing what requirement.
What is the good practice in traceability of requirements and comments?