Custom Field not being reflected on Ui modification

Hello there,

We are trying to get the value of custom field on Ui Modifications but are not receiving any change.

Here is the code we are trying on Ui Modifications :

onInit(
  async ({ api, uiModifications }) => {

    const select = api.getFieldById < 'com.atlassian.jira.plugin.system.customfieldtypes:textfield' > ('customfield_10046')
    console.log('select', select)
  }, () => {
    return ['summary', 'description', 'customfield_10046'];
  }
);
onChange(
  async ({ api, change, uiModifications }) => {

   const select = api.getFieldById<'com.atlassian.jira.plugin.system.customfieldtypes:textfield'>('customfield_10046')
    console.log('select', select)
  },
  () => { return ['summary', 'description', 'customfield_10046'] }
);

The below code is from manifest :

modules:
  jira:customField:
    - key: issue-template
      name: Apply Issue Template
      description: Apply Templates
      edit:
        function: apply-issue-template
      type: string
      function: apply-issue-view

And here is snippet we are using to render the customField

const ApplyTemplate = () => {

  const onSubmit = (formValue) => {
    return formValue.template
  }

  return (
    <CustomFieldEdit onSubmit={onSubmit} header="Select Template" width="medium">
      <Fragment>
        <Select label="Templates" name="template" isRequired>
          <Option label="low" value="1" />
          <Option label="medium" value="2" />
          <Option label="high" value="3" />
        </Select>
      </Fragment>
    </CustomFieldEdit>
  );
};

Help!

1 Like

Hello @UmeshChaudhary,
The current version of UI modifications does not provide support for custom fields that are declared by Forge apps. For now, a workaround would be to declare this custom field through Jira REST API and manage it from the Forge app. Let us know if that helps.

1 Like

Hi @vdebone thanks for the insight.

It looks like managing through REST API is not great as you have to also maintain options for select field types.
Is there a ticket in Forge issue tracker that we can watch for update?

Ok, anyone seeing this thread, there is a related ticket in Forge Issue Tracker: [FRGE-1220] - Ecosystem Jira