Blocking transition

Anele June 18, 2024

I am writting a validator script that only allows transition when No is chosen but it blocks all transitions including when No is selected

 

 

import com.atlassian.jira.component.ComponentAccessor


def cfManager = ComponentAccessor.getCustomFieldManager()
def issue = issue


def customFieldName = "There are no previous withdrawals loaded for this contract"


def customField = customFieldManager.getCustomFieldObjects(issue).find {
    it.name == customFieldName && it.getCustomFieldType()?.key == "com.atlassian.jira.plugin.system.customfieldtypes:radiobuttons"
}


if (customField) {
    def selectedOption = issue.getCustomFieldValue(customField)
    if (selectedOption?.value = "No") {
        return true
    }
}


1 answer

0 votes
Fadoua
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 21, 2024

Good Day @Anele 

Can you please take a screenshot of your workflow? Please hide any confidential info if any

Best,

Fadoua 

 

Suggest an answer

Log in or Sign up to answer