Adding behaviour to hide/show okapya.jira.checklist

Beth Starr January 23, 2019

I am trying to use scriptrunner to hide/show a checklist field but I am getting an error - the field xyz is not hideable, so it will only be hidden when the issue is editable.  The field shows on the view/edit screen and I would like this to only be viewable by one group(team)which is the helpdesk.  I have not created behaviors with scriptrunner before so this is all new to me.

My code is as follows:

import com.okapya.jira.checklist.*
def checkboxField = getFieldByName("Checklist for Helpdesk")
def selectList = getFieldByName("Team.")

def selectListValue = selectList.getValue()

if (selectListValue == "Helpdesk") {
    checkboxField.setHidden(false)
}
else {
    checkboxField.setHidden(true)
}

1 answer

0 votes
Maxime Lefebvre _Okapya_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 18, 2019

Hi Beth,

Sorry for the late response.

I recently tried the ScriptRunner Behavior plugin on a Checkboxes custom field and the result is the same as the Checklist plugin. It is still visible in the Issue Detail, and will be hidden only in the Edit Issue view.

From what I understand, this is how the Behavior plugin works.

Greetings,
Maxime

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events