Forums

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

Error when using editing issue fields with a Forge Custom field (Automation rule)

Ben Greene December 16, 2022

I was looking into setting a default value for a custom field, specifically a forge custom field, but it seems that isn't possible atm: https://community.developer.atlassian.com/t/forge-custom-field-cant-edit-default-value-by-rest-api-3-field-fieldid-context-defaultvalue-api/54937

As a next best solution, I was hoping to be able to edit the value via an automation rule based on the Request Type. 

I had a go using the edit issue fields action, and as the forge custom field doesnt show up in the drop down, I tried the additional fields section using this:

{
"fields": {
"Issue Type MultiLevel": "Back Office"
}
}

My audit log returned this error:

Error editing issues (The value must be a JSON object. (customfield_10178)).
I imagine I need to tweak the line where I am setting the value, any ideas on specifically what to change?

1 answer

0 votes
Gokaraju gopi
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.
December 19, 2022

@Ben Greene 

What do you mean by forge custom field? Is it a drop down field or multi cascading field ?

Ben Greene December 19, 2022

Multi cascading field

Gokaraju gopi
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.
December 19, 2022

@Ben Greene 

If you have two level then following should help you. (test1 and test2 are just example names you can replace them with your option names)

{
  "fields": {
    "customfield_10178": { "value": "test1", "child": { "value" : "test2"} }
  }

}

If its only one level then you can remove child

{
  "fields": {
    "customfield_10178": { "value": "test1" }
  }

}

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
TAGS
AUG Leaders

Atlassian Community Events