The company I work for recently made the switch from Trac (free)to Jira (Paid; hosted or downloadable) which both can do what you describe in the OP. Trac needs a bit of customizing and some plugins and macros which can be a bit time-consuming until you get it right while Jira has it all inbuilt.
Trac was good for us for quite some time and it did the job until the dev-team got bigger, more projects came aboard and we generally needed to work and rely more on the issue-tracking and planning.
Jira is generally easier to use (especially for non-techies) as well as i has a already integrated "agile" mode which makes working with it easier and more fun. The close integration with the documentation-system "confluence" is also a pro. Said that Jira has its drawbacks most of all being slow and some quirks in the UI.
Considering the monthly fee one has to pay versus free software that is hosted inhouse a rough estimate of the ToC might be worth it. A free software package might be even more expensive in the end if you need to buy extra hardware to run it on and if you do the server maintenance yourself (getting less time on your projects) or hire somebody to do it for you.