I’m invoking useProductContext() but it isn’t returning the environmentId or environmentType at all.
const { localId, environmentType } = useProductContext();
I’m invoking useProductContext() but it isn’t returning the environmentId or environmentType at all.
const { localId, environmentType } = useProductContext();
Hey, which module are you using?
Jira customfields
I can confirm that these fields are undefined here too (and others too):
productContext: {
accountId: '*****',
cloudId: '*****',
contentId: undefined,
localId: 'ari:cloud:ecosystem::extension/*****/*****/static/*****',
spaceKey: undefined,
installContext: 'ari:cloud:jira::site/*****',
platformContext: {
issueId: '10000',
issueKey: 'YOKO-1',
issueType: 'Task',
issueTypeId: '10007',
projectId: '10001',
projectKey: 'YOKO',
type: 'jira'
},
isConfig: undefined,
extensionContext: {
fieldValue: null,
fieldId: 'customfield_10100',
fieldName: '*****',
fieldType: 'ari:cloud:ecosystem::extension/*****/*****/static/*****',
renderContext: 'issue-view',
entryPoint: 'edit',
type: 'customFieldType'
},
license: undefined,
moduleKey: '*****',
environmentId: undefined,
environmentType: undefined
}
This is from the edit function of a customFieldType.
FYI I created a ticket some weeks ago to complain of the lack of coherence of the fields inside the different contexts: Forge - Issues - Ecosystem Jira