Tip: (Read about Issue Type Security at the bottom of the page!)
This is done through the JIRA marketplace. Or, simply download the plugin and upload it in the Addons section of JIRA.
Setup (With example)
Click Administration, then Issues.
2. Click Issue Type Filters in the Issue Types menu. You will now see an empty list of schemes.
3. Click Add Scheme.
4. Configure the scheme, by selecting which groups and roles (or allow all) for each issue type. You can also leave the fields empty, such that an issue type is not visible for anyone.
For subtask types you can also select which parent issues types are allowed. In practice, this means you can decide which subtask types can be created out from issue types. Maybe you want Subtask only to be added under Task..
5. Click Save
6. Click Back to schemes. Your added scheme should be in the list. Note that the Projects cell is empty. Click "Associate".
7. Choose the projects for which the scheme and its filters should be applied.
8. Click Associate. You are now returned to the Schemes list, and should see the selected projects in the Projects cell.
When the filter has been added, observe the effect: Create a JIRA issue. The Issue Type input box would appear like this, if only Task and New Feature was allowed.
Issue Type Security
The latest addition to the plugin is Issue type security.
It means you can limit browse/edit/transition/.. permission to specific issue types. E.g. you want bugs editable for some people, and tasks for other people.
To accomplish this, you need to:
1. Create your scheme (as above), and associate it to one or more projects.
2. For the project you want security, edit the permission scheme. Then grant Issue Type Filters Security to the Browse Projects permission, or any other permission related to the issue (e.g. edit/transition/..).
3. Re-index all your issues (in System - Advanced - Indexing).