Issue Tracking – Is It Good Practice to Comment with Issue Number?

commentsissue-tracking

I saw many issue numbers from comments of jQuery code. (Actually, there were 69 issue numbers in jQuery code.) I think it would be good practice, but I've never seen any guidelines.

If it is a good practice, what are the guidelines for this practice?

Best Answer

In general, I would not consider it good practice. But in exceptional cases, it can be very useful, namely when the code has to do something unintuitive to fix a complex issue, and without any explanation there would be a risk that someone might want to "fix" this strange code and thereby break it, while explaining the reasoning would result in a huge comment that duplicates information from the issue.