You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
Hello Atlassian Team and Community Members,
I am reaching out for assistance or advice on a specific challenge I am facing in Jira Cloud.
I am currently working with Jira Cloud and am looking for an automation solution, possibly through JMWE (Jira Misc Workflow Extensions), JMCF (Jira Misc Custom Fields), or ScriptRunner, to implement a specific rule. My goal is to restrict editing of certain fields for certain users, making these fields read-only for them.
I am particularly interested in finding out if anyone has successfully created a script or automation to address this use case in Jira Cloud. Any help, script examples, or pointers to relevant resources would be greatly appreciated.
Thank you in advance for your time and expertise.
I can confirm that the Behaviours feature inside of Scriptrunner for Jira Cloud will be able to help with your requirements.
An example script here shows how to restrict issue types to users in a specific project role.
You can modify this to achieve your requirements by replacing the restrict issue type API calls with calls to make the fields you want to make read-only, and I can confirm our documentation page here shows how to make a field read-only.
In the linked example, just replace the logic inside the if block where the optionsVisibility is being set on the issue type field to add a line for each field you want to set to read-only.
It is worth mentioning behaviours only works on the Global Create view and the Global issue view, and issue views of the board view and backlog view currently but does not currently support transition views.
To see what views are supported as they are added, you can follow the documentation page here.
I hope this information helps.
Hello @Ahmed Saci
Recently Adaptavist (makers of ScriptRunner) announced an update to their Behaviours app such that it can now be used on the issue View screen to modify some fields. Unfortunately due to limitations in the APIs provided by Atlassian they are currently able to modify only the View screen when it is viewed fully as a browser tab. They can't yet modify the screen when it pops up as a modal.
For more information you can check out their announcement here:
I am glad you got it working.
Can you please mark mine and Trudy's answers as accepted to help show other users that this is a correct answer.