Urgent.News

What's breaking now, across thousands of outlets.

Tech

JSM Portal Request Create Property Panel Submit

A jiraServiceManagement:portalRequestCreatePropertyPanel module is supposed to be one of the simpler Forge surfaces: a small form on the customer portal's request-creation screen, a call to view.submit() , and the value lands as a Jira issue property you can read back later. On the Atlassian developer forum, one developer built exactly that, called view.submit() , and found the property came back…

When creating a Jira Service Management portal request, the JSM Portal Request Create Property Panel module is designed to be a straightforward Forge surface. It involves a small form on the customer portal's request-creation screen, a call to view.submit(), and the resulting value becomes a Jira issue property that can be retrieved later. However, developers have encountered issues when using this module.

One developer built a simple implementation and called view.submit(), only to find that the property came back undefined. Another developer faced the same issue three months later and sought clarification on how the first developer had resolved it. The answer revealed that the problem stemmed from an incorrect object shape.

The @forge/bridge package does not prevent developers from making this same mistake. Its own shipped types declare submit as (payload?: any) = Promise void, meaning any object can compile and resolve, even if it doesn't match the expected shape. This tutorial aims to provide the correct shape, how to read the value back, and explain any challenges that may arise in the process.

To successfully submit a value to a JSM request, follow these steps:

1. Confirm the payload shape:

- The fields array is required and must contain field objects with a key (string) and a value (object).

- The isValid boolean is also required and must be true.

2. Check the submitted value:

- Atlassian's example code demonstrates how to submit the value correctly using await view.submit({ fields, isValid }).

- Ensure that the submitted object adheres to the correct shape.

3. Understand when the write happens:

- The actual writing of the value occurs after view.submit() resolves, not during the resolution itself.

4. Read the value back:

- Use the jiraServiceManagement:portalRequestDetail module to check the submitted value.

5. Be aware of the context:

- Filling a real custom field from the submitted value is a separate, more complex problem.

It's important to note that the correct payload shape is not enforced by the tools, so relying solely on types or editor/build warnings may not catch mistakes. Always verify the shape explicitly as shown in the examples provided.

By following these guidelines, developers can avoid the silent failure mode and successfully create Jira issue properties using the JSM Portal Request Create Property Panel module.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

Vue `nextTick`: Wait for the DOM to Update Before You Touch It

One of the first things you learn with Vue is that changing reactive state automatically updates the DOM. But there is an important detail that can sometimes cause unexpected behavior: 👉 The DOM…

  • nextTick() is a Vue utility waiting for DOM updates after state changes
  • Vue batches DOM updates to improve rendering efficiency, not immediate updates
  • Call await nextTick() after state changes to ensure DOM has updated before interaction

More from Monday 21 September →