I have tried a few methods, but I'm unable to prevent the Fix Version/s field from being edited in about 4 statuses. I've created a Behaviour and tried the following conditions (at different times), but neither are preventing edits to the Fix Version/s field.
When : Workflow Step <status 1>
Workflow Step <status 2>
Workflow Step <status 3>
Workflow Step <status 4>
&
Except: Workflow Step <status 5>
Workflow Step <status 6>
Workflow Step <status 7>
Workflow Step <status 8>
Workflow Step <status 9>
Workflow Step <status 10>
The Behaviour is mapped to All Issue Types & a few projects. The workflow steps would also span multiple workflows.
I have another Behaviour preventing a custom field from being edited by project role, not status. I tried disabling that to see if they were conflicting with each other, but no luck.
Hi @Shannon Bennett,
I have tested below code in my sandbox by adding it as server-side script for fix versions field in behaviour
def fVersions = getFieldById("fixVersions")
def status = underlyingIssue?.getStatus().name
if(status == "To Do"){
fVersions.setReadOnly(true)
}else{
fVersions.setReadOnly(false)
}
Hope this helps
BR,
Leo
Behaviours will not work on the "View screen", rather if a field is "affected" by a behaviour and a user tries to edit it, it will direct them to the Edit screen instead where the Behaviour should work.
Could you show us the behaviour implementation -- the settings and conditions?
Could we eliminate this being a bug by setting the fixVersion field read-only at all times, in some sample project? Just to see if it will work regardless of the status.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Shannon Bennett ,
See if these two links below could help you to achieve your goal:
https://library.adaptavist.com/entity/set-behaviour-read-only
https://scriptrunner.adaptavist.com/5.0.2/jira/recipes/workflow/get-workflow-vars.html
Try to use if-else statements in your Behaviour to set the setReadOnly() method as true or false and determine which status the field can or cannot be edited.
I hope this can help you.
BR,
Alexandre de Sousa.
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.