Hi,
I want to set `jira.issue.editable` property to false if the field value is x. I want to do it through behaviour or script listener.
Can anyone please help me to set this property via groovy script
This won't work.
The jira.issue.editable property is a workflow property. It kicks in on a workflow status. This means that if you did write a script that would set it to false when a custom field was X, all issues using that workflow would become uneditable while in the status you set it on as soon as you did it for the first issue.
There's no way to block edit on an issue just because a field changes.
Hi @Nic Brough -Adaptavist-, Thanks for the answer.
Is there any other way to override the workflow property then?
What I am thinking, Lets set the 'jira.issue.editable' to false when the issue is moved to certain status. So, issue will not be editable when it is in X status.
But, I want to monitor the field through script listener or behavior. So, if field X doesn't have value set, I would like to override the workflow property. Meaning, It should make the issue to editable or atleast it should make the particular field to editable.
Please share your thoughts.
Thanks for your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Here is my requirement,
- Lock the issue (make it non-editable) when it is moved to certain status. : So, I will add a 'jira.issue.editable' property to false to a status
- Behaviour script/ script runner should check the value of an field at anytime. If the field is not having value as production, then it should make the issue to editable.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Again, the property belongs to the status, not the issue. There isn't anything to override based on fields, because it's a status property.
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.
You could validate instead - on a transition, use a validator that checks what you need and refuses to let the issue move on unless it is correct.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In our case, we should not restrict the user to move an issue to certain status based on the value of the field.
thats the problem...
We should let the user to move the certain status irrespective of field value.
Depends on the field value, we should make the issue non-editable.
anything can be done to achieve this @Nic Brough -Adaptavist-??
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
No. As I said. Your best option is a validator.
You could also muck around with javascript, or better, Behaviours from Scriptrunner, but these can easily be bypassed if people feel like it and will be completely ignored by certain add-ons and automations.
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.