How to submit value of JSM module?

Hello there,

I have added jiraServiceManagement:portalRequestCreatePropertyPanel to customer portal form as below:

This is the <Select /> component in the form:

I want to use that selected value in the jiraServiceManagement:portalRequestDetail module. However, value is not submitted to anywhere.

This is my manifest file:

modules:
  jiraServiceManagement:portalRequestCreatePropertyPanel:
    - key: aip-forge-jsm-panel-property
      name: Forge Assets Portal
      resource: portal-create-property
      render: native
      resolver:
        function: resolver
  jiraServiceManagement:portalRequestDetail:
    - key: aip-forge-jsm-portal-detail
      title: Forge Assets Portal Request Detail
      resource: portal-view-property
      render: native
      resolver:
        function: resolver
  function:
    - key: resolver
      handler: index.handler
resources:
  - key: portal-create-property
    path: src/frontend/index.jsx
  - key: portal-view-property
    path: src/frontend/view/index.jsx

This is the scopes defined:

permissions:
  scopes:
    - admin:connect-jira
    - read:connect-jira
    - write:connect-jira
    - act-as-user:connect-jira
    - manage:jira-configuration
    - read:custom-field-contextual-configuration:jira
    - write:custom-field-contextual-configuration:jira
    - read:jira-work
    - write:jira-work
    - read:servicedesk-request
    - write:servicedesk-request

As you see, property is undefined:

I also tried to get property via Jira Rest API, but it adds my app id to the endpoint and it returns 404.

  const issueResponse = await api
        .asApp()
        .requestJira(
            route`/rest/api/3/issue/${issueKey}/properties`
        );

Thanks in advance!
Furkan,

Hi @AbdulbakiFurkanTanrv ,

TBH, that’s a bit of pain :slight_smile:

You can retrieve the issue property value via API and then display it in your jiraServiceManagement:portalRequestDetailPanel.

Make sure that you call the API in the Forge backend asApp if you want it to work with customers and not just Jira users.

Hope this helps!
Cheers,
paul

2 Likes

Hi @ppasler ,

Thank you for your answer!

Edit:
I think this is the answer for UI Kit & Custom UI:

The view.submit method can be invoked every time the fields in the Forge portal request create property panel form is updated. The field data would be store in the Jira issue property when the request form is submitted.

Once the portal request creation form is saved, the data stored using the jiraServiceManagement:portalRequestCreatePropertyPanel module can be retrieved from the extension context of jiraServiceManagement:portalRequestDetail.

The problem is when/how to invoke view.submit to save the value of my component to jira issue properties.

Kind regards,
Furkan

Solved