Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Automatically setting the relevant object in the "Personnel" field (asset type) of an issue.

田中優貴 October 17, 2025

Please propose a solution to the following problem, or provide a sample automation for populating an asset into an asset-type field.

What I want to do
Objective: I want to automatically set the relevant object in the "Personnel" field (asset type) of an issue.
Current operation flow

  1. Manually trigger the automation

  2. Search Assets (lookupObjects) for an object with the same name as the summary of the triggered issue

  3. Edit the work item field
    Insert the obtained object into the empty asset-type field.

Current issues

  • Searching and retrieving the object works correctly (confirmed via comment output)

  • However, I cannot automatically set the object in the asset-type "Personnel" field, and an error occurs
    What I have tried so far

  • Granted the Assets schema permission to the automation rule

  • Confirmed via comments that the intended object is being retrieved

Automation screen
image-20251017-042209.pngimage-20251017-042224.png

Asset-type field settings

 

 5e6328a0-4b00-4423-9e9f-e3d621acef07.png

 


1 answer

0 votes
Christos Markoulatos
Community Champion
October 17, 2025

Hey @田中優貴 

From what i can see in the pics, here is what i believe is set up correctly

  • Trigger: Manual trigger is configured.
  • Lookup Objects: Using AQL Name = "{{issue.summary}}" against schema. This is correct for finding the matching Personnel object.
  • Edit Work Item: You’re trying to set the fieldusing {{lookupObjects.get(0).Name}}.\ → This is the problem: Assets fields require the object ID, not the Name string.

Why it fails

  • JSM Assets fields don’t accept plain text; they expect an object reference in the format: { "id": ":" }
  • Using Name only works for comments/logging, not for setting the field.

You have two options:

Option 1: Advanced JSON (recommended)

In the Edit work item → More options, use:

{

  "fields": {

    "customfield_XXXXX": [

      { "id": "<<workspaceId>>:{{lookupObjects.get(0).id}}" }

    ]

  }

}

  • Replace customfield_XXXXX with the ID of the Personnel field.
  • Replace <<workspaceId>> with your Assets workspace ID.
  • If the field supports multiple values, loop through lookupObjects:

{

  "fields": {

    "customfield_XXXXX": [

      {{#lookupObjects}}

        { "id": "<<workspaceId>>:{{id}}" }{{^last}},{{/last}}

      {{/lookupObjects}}

    ]

  }

}

Option 2: AQL in Edit Action

If the field supports AQL input, use:

Key = "{{lookupObjects.get(0).Key}}"

This works only if the field allows AQL assignment.

Hope this helps!

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events