Can't make field readonly through SR Behaviours

Issue #55 closed
Иван Донченко created an issue
getFieldById(getFieldChanged()).setReadOnly(true)
getFieldById('customfield_*****').setReadOnly(true)

This code has no effect on a formField (neither visually nor functionally)

Comments (10)

  1. Yuval Zaltz

    I had the same problem,
    I have downloaded the new version 4.0.12.jar and it solves most of the problems but I still have the following problem.

    I have created the following Behavior in Script runner, to force uses single select although the field type is multi-select (I use the same values differently in different project).

    import com.onresolve.jira.groovy.user.FieldBehaviours
    import groovy.transform.BaseScript

    @BaseScript FieldBehaviours behaviours

    def components = getFieldById("customfield_11312").getValue() as List<Object>
    if (components.size() > 1){
    getFieldById("customfield_11312").setError("please select only one domain")
    }
    else{
    getFieldById("customfield_11312").clearError()
    }

    when doing inline editing

    When I add more then one value - I see the warning as expected

    When I click the X on one of the values there is no event the error stays , and you can’t create/update.

    I need to do inline editing again, select only one value

    and then it works

    Please advise

  2. Yuval Zaltz

    When do you think you will release this version? I don’t want to deploy it in my production env. till you officially release it

  3. Log in to comment