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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Behaviour with RefinedTheme Template Edited

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
Community showcase
Published in Jira Service Management

Atlympic Event: Jira Service Managemnt

Hello Community!  Quick disclaimer: We are running a contest on Community (The Atlympics!) from July 23rd - August 8th of 2021. If you are interested in participating in this contest (prizes! ...

325 views 4 6
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you