Forums

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

Automation 'Edit Issue' Logs Success but Assets Object Field Not updated

Jakob Lindström
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 10, 2025

Hi everyone,

I'm stuck trying to update an "Assets Objects" custom field using Global Automation (Jira Cloud / JSM / Assets) and hoping someone has seen this before.

What I want: When my automation creates a Purchase Order object in Assets (e.g., AST-2700), I want it to link the original Jira issue (e.g., PO-25) back to that new Assets object using a custom field ("Related Purchase Order", ID customfield_XXXXX).

What I'm doing: My rule creates the PO, looks it up, saves the key (AST-2700) into a variable {{purchaseOrderObjectKey}} (I've confirmed this works with logging). Then, I use the Edit issue action with this Advanced JSON:

{
     "fields": {
               "customfield_XXXXX: [
                      { "key": "{{purchaseOrderObjectKey}}" }
                ]
       }
}

The Problem: The automation audit log shows the Edit issue step succeeding ("Issues edited successfully"). BUT, when I look at the Jira issue (PO-25), the "Related Purchase Order" field is still empty! The update just doesn't "stick".

What I've Checked:
The variable {{purchaseOrderObjectKey}} definitely has the right Assets key right before the Edit issue step.

Manual editing of the "Related Purchase Order" field on the issue works perfectly (so the field/AQL config seems fine).

The rule actor is set to Automation for Jira.

I've tried to ensure the Automation for Jira actor has Assets View permissions for the Purchase Order object type via Assets Roles (added Automation for Jira to a relevant role). I think this is correct, but maybe I missed something?

I have also set it as actor ME (admin)

My Question: Why would Edit issue report success but not actually update the field? Has anyone run into this silent failure with Assets fields? Any ideas what else to check, especially if the permissions seem okay? Thanks so much for any help!

Picture of Automation: 

https://imgur.com/a/aNMSMwu

2 answers

1 accepted

2 votes
Answer accepted
Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2025

Hi @Jakob Lindström 

Welcome to the community.

On the Edit action, if you select the field instead of the advanced option and set the field value to variable {{purchaseOrderObjectKey}}

or

{
"fields": {
"customfield_XXXXX: { "key": "{{purchaseOrderObjectKey}}" }
               }
}

Jakob Lindström
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 11, 2025

Hi Marc,

Thanks for helping.

I tried to set it without advanced option.

I then get this error:


Unable to retrieve the configuration management database (CMDB) when updating the issue field
Bad Request
Unable to find any issue field values to edit:
PO-41

and unfortunately, the JSON did not work as well.

If I run it with my advanced JSON as before with logging, i get this log:

Create object
Lookup objects
Create variable
Log action
Log
DEBUG: Key for Edit Issue = [AST-2765]
Edit issue04/11/2025, 13:41:56
Issues edited successfully
PO-44
According to the log, everything is fine.

But it does not automatically change in the issue.

I'm starting to wonder if it is even possible? Since the field is using this + sign

https://imgur.com/a/nhhu2Az

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 11, 2025

Hi @Jakob Lindström 

So you lookup provides the assets key right?

Then I was even wrong.

You should be able to edit the issue like this:

In the edit action select the field to be edited (in your case Related Purchase Order)

Then use the smart value: key in {{lookupObjects}}

 

Jakob Lindström
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 11, 2025

Yes,

I have tried to use the drop down list instead of the JSON. But it always fails. 

I tried using my variable name : {{purchaseOrderObjectKey}}
I tried with {{lookupObjects.first.key}}

This is the automation:
https://imgur.com/a/aNMSMwu


This is the details:
https://imgur.com/a/NXXuP6G

This is how it looks and some logs:
https://imgur.com/a/nhhu2Az

And this is how I want it to look:
https://imgur.com/a/cney3Cu


Thank you so much for helping me.

 

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 14, 2025

Hi @Jakob Lindström 

You should add a re-fetch issue data before editing.

The editing can be done without creating the variable.

In the edit action select the field to be edited (in your case Related Purchase Order)

Then use the smart value: key in {{lookupObjects}}

Jakob Lindström
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 14, 2025

Hi Marc,

It just doesn't work.

I've gone thru the documentation multiple times now. 

It even says that Issues edited successfully. But still doesn't change

{A545A61B-0622-4974-9322-A5A96CF11884}.png

{C647B50C-FD58-401B-93BC-EF247F516C15}.png

But I can choose it manually.

{8989E8D1-1A61-4C64-B8A7-2F438A2AB255}.png

I've also double checked my permissions and I've tried to run it as Jira Automation or as myself as admin.


Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 14, 2025

Hi @Jakob Lindström 

What is you edit action configuration?

Jakob Lindström
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 14, 2025

I've tried with 

{
"fields": {
"customfield_10190": [
{ "key": "{{purchaseOrderObjectKey}}" }
]
}
}

(Which says all is good)

And I've tried the following (not advanced)


{{lookupObjects.first.key}}


{{purchaseOrderObjectKey}} (Which I've set as a variable)


{{lookupObjects}} (Which give me error:  Unable to retrieve the configuration management database (CMDB) when updating the issue field: Bad Request

 

Marc - Devoteam
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 14, 2025

Hi @Jakob Lindström 

Stop doing the edit like this.

Do the editing like this:

In the edit action select the field to be edited (in your case Related Purchase Order)

Then use the smart value: key in {{lookupObjects}}

 

Jakob Lindström
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 14, 2025

Omg. 

I'm so stupid. I was positive that i've already tried that. 

But obviously not. 

Thanks a lot @Marc - Devoteam 

 

1 vote
Trudy Claspill
Community Champion
April 10, 2025

Hello @Jakob Lindström 

Welcome to the Atlassian community.

What is the custom field type "customfield_XXXXX"?

The attribute "key" may not be applicable to the custom field depending on what type of field it is.

Jakob Lindström
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 10, 2025

Hi Trudy,

It is type Assets objects (Advanced custom field)

Like Verhulle Robin likes this

Suggest an answer

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

Atlassian Community Events