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

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,456,314
Community Members
 
Community Events
176
Community Groups

ScriptRunner - make Multicheckboxes option read-only

Hello guys,

 

I have been searching a a lot and I could not find a good code / answer about my feature I've been trying to implement.

I just used a simple "Checkbox" field and fill it with options, then I fill it with default values using jira native custom field manager.

The only think I want to add (and I think it possible and easy enough using SR) is make my default values that I've picked earlier read only so users wont be able to deselect them.

 

basically Its a checkbox list with default and unchangeable options and a few changeable optiosn.

 

Thanks for help!

Daniel.

 

1 answer

0 votes
Niranjan Rising Star Oct 01, 2020

Hi @Daniel Ben Eliyahu ,

Here is a script to restrict options in the picker

https://library.adaptavist.com/entity/set-behaviour-multi-and-single-select-options-and-value

If you can make your values default values, you can then just limit the values to users. Needs little tweaking, but may work :)

unfortunately I am quiet a novice on script runner.

I know for sure that in JS that command to make an option read only is:

document.getElementById("summary-label")disabled=true

 

not sure how to figure it out on groovy.

I just solved it by creating another checkbox field with the same name and with the options I want to check on default, then used SR behaviors  to make it read-only.

 

Could not find any solution regarding my case at all.

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events