Is there a way to get the configuration of an insight customfield using the JAVA API?

Hi guys!

I’m having a problem.

For some reason, I need to get all the valid options of an insight customfield using the java API. As it’s not a regular select customfield, I can not get the options using the optionsManager.

My idea was to get the configuration of the customfield, and from that, get the IQL for that customfield. Then i could proceed to execute that IQL using the insight java API and get all the options for that field.

The issue is that, after an exhaustive analysis of both the jira java API and the insight java API, I could not find a way to retrieve this IQL. Has anyone managed to accomplish this? (I’m open to use the rest API if i need to).

In the insight API i found this class, that seems to be exactly what i need:
https://insight-javadoc.riada.io/insight-javadoc-8.6/insight-core/com/riadalabs/jira/plugins/insight/services/model/customfield/AbstractCustomFieldConnectBean.html

But unfortunately, I did not find any Facade that retrieves an object of that class based on a Jira customfield ID.

Any ideas? Thank you very much in advance.

Hello Angel,

Currently I’m also experiencing the same problem. Do you have any ideas now?

Regards,
Yaoqi Huang

I want to know too. My goal is to programmatically migrate a custom field from one Jira site to another, and to do that, I must be able to include the custom field’s Insight configuration as well.

Poking around the source code, I can find in Insight-9.0.7.jar a class called RestBeanAssemblerImpl.assembleCustomFieldEntry() that uses AbstractCustomFieldConnectBean.

The RestBeanAssemblerImpl class seems to be a builder for the custom field Insight configuration, but I haven’t traced how it is used yet. It also doesn’t have methods to read said configurations.

Instead I can tell you about this table:

SELECT * FROM AO_8542F1_IFJ_DCF_CONNECT 

That is the table that stores the Insight configuration of a custom field.

The next step should be to check the source of the Edit Insight Configuration link…
http://localhost:2990/jira/secure/admin/InsightDefaultCustomFieldConfig.jspa?…
Find the source code of that and we should have the answer.