Custom Field Configuration Context

Hi, I am creating a custom field in the project I am working on. After Settings → Issues → Custom fields (on left bar), I have more than one context in my custom field and I have unique settings for each context. In the View and Edit page of the custom field, I operate according to the configurations in this context and I need to get these configurations. https://developer.atlassian.com/platform/forge/manifest-reference/modules/jira-custom-field-type/ According to the document here, there are context and configuration in forge UI and customUI in extensionContext, but when I get them, it returns to me as undefined. So I have to send configuration context request to rest api with issue type id and project id and it is a problem in terms of optimisation. In the Currency Project shown as an example, a request was sent to the rest api to get the context, but according to the document, we should be able to get it directly from getContext or extensionContext. I would appreciate if you can help. Is this related to Atlassian? Photos are attached.

1 Like

Hi @emre

For CustomUi apps, you use view.getContext() but I think you’ll find that the extensionContext property is being deprecated. Have you tried extension instead?

Cheers,
Mel

I am already using extension for the customUI part in my project, but when I write console.log(context.extension.configuration), it returns undefined, but the values of context.extension without the configuration context return correctly. When I use Forge UI kit, the same thing is valid for extensionContext because I use customUI for Edit part and Forge UI kit for View part. When I log the context to the console in UI kit, it returns undefined.

const context = useProductContext() to my component where I use forgeUI kit as code;
console.log(JSON.stringify(context, null, 2)); I get the following output.

. According to the document describing the custom field type, there should be a configuration value, but it cannot be accessed. This applies to the view page.