Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Seeking Assistance for Field Restriction Automation in Jira Cloud

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.

Best regards,

Reda

2 answers

2 accepted

0 votes
Answer accepted
Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 15, 2023 • edited

Hi Ahmed,

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.

0 votes
Answer accepted
Trudy Claspill
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 14, 2023

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:

https://www.scriptrunnerhq.com/inspiration/blog/behaviours-arrives-for-issue-view-plus-2-other-announcements

Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 15, 2023

Hi Trudy,

I can confirm we have now released support on the issue view screen for the backlog view and board view as mentioned in our documentation page located here.

Regards,

Kristian

@Trudy Claspill @Kristian Walker _Adaptavist_ thank you so much for your answer it worked.

I set up a script in script runner behavior which allows me to do that.

Kristian Walker _Adaptavist_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Nov 22, 2023

Hi Ahmed,

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.

Regards,

Kristian

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events