Hello,
I need to make a field readable only after it passes a particular status. For example, if there is a status called "A" then a custom field "ABC" should be readable after it transits from the status "A" till the workflow is closed. It should also be readable only on the edit screen
Kindly help me with a post function groovy script also let me know if this is feasible.
Hello @Priyanka Karguppikar
To make a field read-only you would need to use Behaviour module of the script runner plugin.
In the "initializer" section of the behaviour you can add the condition to make the field read-only for certain statuses.
Plenty of samples here
https://scriptrunner.adaptavist.com/latest/jira/behaviours-overview.html
API here
https://scriptrunner.adaptavist.com/latest/jira/behaviours-api-quickref.html
Hello @Tarun Sapra,
In the behaviour, an entire workflow is chosen. I want something which contains a specific status in the workflow. For example, after a status "a", I want two custom fields to be readable only. But before that status they are editable. Moreover, even if I write a behaviour script, This will only run if the status has a screen on it. For the status "a" there is no screen. I want to know if this can be done through a script even if there is no screen on the status and I also want to know if the field will be readable only the edit screen also.
Please help.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello @Priyanka Karguppikar
You will have to add the custom fields on the edit screen as you want them to be read-only only after certain status and not for all statuses. In this case you can write a script in behaviour in which make the field in read-only mode for a group of statuses that come after the status "a". You can add that script in the initializer function of the behaviour module.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.