You may find that Bugzilla already does what you want it to do, you just need to configure it correctly. Read the Administration Guide sections carefully to see if that's the case for you. If not, then this chapter explains how to use the available mechanisms for integration and customization.
This documentation undoubtedly has bugs; if you find some, please file them here.