Sounds like a bad practice. What if your organisation decides to migrate to another bug tracking system? Don't tie your product too tightly to the tools you are currently using. Instead of referring to specific bug IDs, and the reasons for why the code looks like it does are unclear, motivate your design decision with comments in the code.