Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Behaviour with RefinedTheme Template

Ricardo da Silva
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 21, 2018

Hello,

i've got a problem. My Behaviour script dosn't work with refinedtheme for JSD, without the refinedtheme it works perfectly. Here is the script.

import com.onresolve.jira.groovy.user.FieldBehaviours
import groovy.transform.BaseScript
import com.atlassian.jira.component.ComponentAccessor

if(getFieldById(getFieldChanged()).getValue() == 'Festangestellt'){

def mainKpi = getFieldByName("Funktion")

def customFieldManager = ComponentAccessor.getCustomFieldManager()
def optionsManager = ComponentAccessor.getOptionsManager()

def customField = customFieldManager.getCustomFieldObject(mainKpi.getFieldId())
def config = customField.getRelevantConfig(getIssueContext())
def options = optionsManager.getOptions(config)

def optionsMap = options.findAll {
it.value in ["Abrechnung","Controlling"]
}.collectEntries {
[
(it.optionId.toString()) : it.value
]

}
mainKpi.setFieldOptions(optionsMap)}

 

Does anybody got the same Issue or did anyone got fix this, that behaviour works fine with refinedtheme?

0 comments

Comment

Log in or Sign up to comment
TAGS
AUG Leaders

Atlassian Community Events