Power Scripts™ for Jira 2.5.2+ (server)
We want to hide some issue types from certain users during the issues creation.
For example, we want to remove issue types `New Feature` and `Improvement` from the list of the available Issue Type during the issue creation, if the current logged in user is not the project leader.
We will use the lfRestrictSelectOptions to hide some issue types for the project leader. All you have to do is to create the following script and associate it with the main Live Fields configuration on your project, as described here. Note that we do not look for the "Create Issue" screen, since we do not want the user to create an issue and then change its type using Edit. This way, the issue types will be hidden regardless of the screen (create/edit/transition).
Pay attention to pass in the first parameter correctly for the lfRestrictSelectOptions routine, using quotes ("issueType"), in order to pass in the actual field label name for the current screen.
Otherwise, SIL™ Interpreter will attempt to get the issueType from the current issue and will fail on the "Create Issue" screen since the issue is not yet created.
The above SIL™ script makes use of the lfRestrictSelectOptions routine offered by Power Scripts™ for Jira's Live Fields feature.
- Restricting resolutions based on issue type
- Forbidding specific priorities for certain projects
- Hide fields from users not in a project role
- Limit Number of Characters in Text Field
- Lock an issue - a better variant (Live Fields)
- Locking Issues
- Making an issue read-only
- Require an issue to have attachments
- Require User to Log Work Before Transitioning Issue
- Restrict issue type availability by user
- Restrict workflow based on status of dependencies
- Validator for component lead