Hi everyone.
This is my first post (likely not my last), I've tried searching through other questions and other sites for my answer however I am struggling to get to where I need - I get close but not close enough!
I am running Jira 7.11.0 Server and ScriptRunner 5.5.5
On all issues I have a checkbox that when checked I want to prevent users who are not in a specific Project Role from selecting a specific priority level.
I have seen the example script here however this does not do exactly what I want, I have no experience in Java/Groovy so do not know what I need to do in order to modify this to suit my needs.
My custom field id for my checkbox is 'customfield_23347', it is currently restricted so that it is only able to be edited by users in the 'Administrators' Project Role.
Minimum Requirement:
- When 'customfield_23347' is checked, if the user is not in a Role of a Project Administrator, then the list of available priorities should be restricted (e.g. the option to select Critical should not be available).
- If 'customfield_23347' is not checked then there should be no restrictions and users should see all available priority levels.
Nice to have:
- When the above restriction is in place, advise the user with a comment under the Priority field that they are unable to set a specific priority level since they are not an Administrator of the project.
There is no concern around users setting the priority and then checking the checkbox since only Administrator are able to set this checkbox and will be responsible for ensuring that the priority level is set correctly.
Thank you in advance for your help!