Is it possible to make one of the values in the enumeration list read-only or disable its selection(CCM)?
Hello Team ,
Here i am describing that the goal is to restrict user interaction with a specific enumeration value. This means the value should remain visible in the list (for reference or legacy purposes) but should not be editable or select-able when users modify the attribute in the work item. This ensures controlled usage of certain values while maintaining historical data integrity.
2 answers
You can't do this directly in the enumeration but you can do it in a round about way via a Value Set attribute customisation.
You'll need to do this in the EWM Eclipse client as the web UI doesn't have the ability to create Attribute Customisations. Create a new value set and either choose:
- Script Based Value Set. This will let you create a Javascript function to return an array of allowed values
- Dependent Enumerations. This will let you choose a subset of values in your enumeration based on the value of some other enumeration This one is a bit of a hack - pick any other enumeration as your start point and the enumeration you want to control as the dependent. Then edit the default set to include the values you want visible. This has the effect of showing the subset no matter what the value of the first enumeration is
Once created, add it to the attribute definition and that should be it
Comments
Another option is using a custom (Javascript) condition that prevents saving if certain values are selected.
https://rsjazz.wordpress.com/2022/11/25/ewm-attribute-customization-introduction/ has an introduction.