From ScriptRunner Behaviour we set a multi-select Assets field read-only depending on user role etc but it is still possible to remove values (not add though). It is not like this if I deselect the "Multiple" option in the configuration for the field. Why is this? How do I make the field read-only so that no values can be removed?
I don't think this is possible.
My assumption Asset multi select is not related to the behaviour set in scriptrunner, unless you specify the possible selectable options.
But to be certain on your options, you might want to revert this question to scriptrunner support.
AdaptaVist Group support was able to reproduce our problem and consider it a bug. After upgrade to the latest version, 9.29, they are no longer able reproduce it. Looking at release notes, I see that the bug was fixed in 9.26, mentioning read-only fields in general.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Magnus Ljungkrantz
What version of Jira are you using?
What version of the ScriptRunner plugin are you using?
Can you share with us your code?
What configuration options have you set in the Behaviour?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Trudy,
Not sure if I got all the parameters right when I submitted the question but we are on Jira Data Center with:
Jira Software 10.3.12
Adaptavist ScriptRunner for JIRA 9.24.0
We set the Assets field read-only from the initialiser in our Behaviour for the Bug issue type using:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
According the the Scriptrunner 9.x documentation Multi-select Insights fields are supported.
https://docs.adaptavist.com/sr4js/9.x/features/behaviours/behaviours-supported-fields
So, I would recommend that you contact Adaptavist support about this unusual behaviour that you are witnessing.
It would be helpful to the community if you report back here what you learn.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.