Show Assets objects by name on the JSM portal

The customer’s laptop is linked to the request. The portal shows a number. This is why, and what to do.

The problem

An Assets (CMDB) field arrives from Jira’s issue API as identifiers and nothing else: a workspace ID and an object ID. That is why a portal usually shows the customer’s laptop or service as blank, or as a number nobody recognises.

What the app does

It looks up the object’s name in Assets when the request is viewed, and shows that. The name is used to render the page and is not stored. The app’s access to Assets is read-only; it never asks for permission to change your CMDB.

Letting the customer choose the object

  1. Switch on editing for the Assets field and choose the object types a customer may pick from. The portal search stays inside that list.
  2. Use Detect accepted types. It reads the types already used on the field in real requests, which are by definition types Jira accepts.
  3. Test with a real request before opening the field to customers.

What to watch out for

Jira applies its own filter to an Assets field, and no API makes that filter readable to an app. If your allowed types are wider than it, Jira refuses the save and the customer is told the object lies outside the field’s filter. Nothing is written, and no success is reported. Assets requires JSM Premium.

Start with the three fields your customers ask about most

Show them first. Open one for editing when you are ready. Nothing becomes editable until you switch it on.