Just a heads up: On March 24, 2025, starting at 4:30pm CDT / 21:30 UTC, the site will be undergoing scheduled maintenance for a few hours. During this time, the site might be unavailable for a short while. Thanks for your patience.
×Hi, we set a behaviour script that limits the Issue type options to prevent specific users to create some kind of issues in a specific project just like this example:
https://scriptrunner.adaptavist.com/latest/jira/recipes/behaviours/restricting-issue-types.html
Please note that in the behaviour I use its API (formField.setFieldOptions()) to limit the issue types.
I have a custom post-function script that clones the current issue in a selected project, but if they select that project, I get a forbidden exception due to the issue type behavior set limits.
I would like to be able to bypass this limit, in the script, forcing it somehow, but I've not access to behaviour API in the post-function.
Besides if I check available issue this way:
import static com.atlassian.jira.issue.IssueFieldConstants.ISSUE_TYPE
def issueTypeField = ComponentAccessor.getFieldManager().getField(ISSUE_TYPE)
lg.info("issueTypeField.getOptionsForIssue(issue, false)*.getName())
I get ALL issue types in schema, even the limited ones, so I can't even detect the case in the script...
Any idea?
Thanks, Stefano
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.