Hi,
I need some help, I am able to filter project picker list with this behavior script given below
But, after I get the filtered list, the "None" option is not present. I need to have the None option and it has to be the first option. Can anyone please help me on how to add None at the top of the project options
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.project.ProjectManager
def customFieldManager = ComponentAccessor.getCustomFieldManager()
def projectManager = ComponentAccessor.getProjectManager()
def projects = projectManager.getProjectObjects()
//Project-1 is customfield_14503
def formField = getFieldById("customfield_14503")
def prList = ComponentAccessor.getProjectManager().getProjectObjects()
formField.setFieldOptions(projects.findAll{if(it.projectCategoryObject) {it.projectCategoryObject.name in ["Common", "Lab Support", "Test Management"]}})