useIssueProperty in CustomFieldEdit Component throws error

Hello there,

since some weeks we have some problems with our Custom Field.

const VoucherFieldEdit = () => {
    const {extensionContext, platformContext} = useProductContext();
    const {issueKey} = platformContext as JiraContext;
    const {fieldValue} = extensionContext as CustomFieldExtensionContext;
    const [, setVoucherId] = useIssueProperty<string>('voucher_id', '');
    /*
    .....
    */
}

When trying to create a new issue following error appears:

Error: product context does not contain issueKey for the useIssueProperty hook
    at Object.exports.useIssuePropertyWithRequest (voucher-field.js:1485:15)
    at Object.exports.useIssueProperty (voucher-field.js:1459:81)
    at Object.VoucherFieldEdit [as type] (voucher-field.js:33290:40)
    at voucher-field.js:2374:36
    at async voucher-field.js:1840:31

When trying to wrap useIssueProperty in a if(issueKey) following error appears (on edit):

Error: cannot use a hook outside of a component
    at ReconcilerState.get wipFiber [as wipFiber] (voucher-field.js:28764:19)
    at Object.exports.useAction (voucher-field.js:28346:13)
    at Object.exports.useIssuePropertyWithRequest (voucher-field.js:27778:42)
    at Object.exports.useIssueProperty (voucher-field.js:27739:81)
    at onSubmit (voucher-field.js:22262:48)
    at Object.onSaveFn [as onSubmit] (voucher-field.js:28246:29)
    at voucher-field.js:28607:60
    at asyncMap (voucher-field.js:28589:30)
    at voucher-field.js:28610:35
    at asyncMap (voucher-field.js:28589:30)

Updated to the latest forge/cli, forge/ui and forge/ui-jira version :slight_smile: