Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to solve the repeated rendering problem in SelectCFType?

Wenjing Liu July 30, 2025

Hi all, I'm developing a jira plugin custom field extends SelectCFType class, and I Override the OptionsManager.getOptions() function, but when I refresh the portal, the options will be rendered repeatedly like below. Could anyone solve this?

And here's my getOptions funciton.

@Override
public Options getOptions(FieldConfig fieldConfig, JiraContextNode jiraContextNode){

try {
List<Option> options = new ArrayList<>();
IQLFacade iqlFacade = ComponentAccessor.getOSGiComponentInstanceOfType(IQLFacade.class);
String iql = "Key != \"\"";
List<ObjectBean> assets = iqlFacade.findObjects(iql);

log.debug(assets.toString());

for(ObjectBean asset : assets){
String key = asset.getObjectKey();
Integer id = asset.getId();

log.debug(key);
log.debug(id.toString());

options.add(ComponentAccessor.getOptionsManager().createOption(fieldConfig,null,Long.valueOf(id),key));
}
log.debug(options.toString());

return new OptionsImpl(options,fieldConfig,ComponentAccessor.getOptionsManager());

} catch (InsightException e) {
throw new RuntimeException(e);
}
}

Any adivce will be appreciated. Thanks in advance.

Annotation 2025-07-31 102328.png

0 answers

Suggest an answer

Log in or Sign up to answer