Custom field not appearing as field selection at Subtask Level
Asked by Brittany Montgomery:

We have two custom fields that appear at the Epic and Story level but will not carry over to the subtask level. In the automations, these two fields do not appear as options when selecting fields to set. The fields are already added to the Subtask Issue Type, so that is not the issue. Is there custom HTML coding that can be added in the text field under more options, additional fields, or a better alternative? The fields are labeled "Compliance Lead" and "State Manager". ![Capture.PNG](/t5/image/serverpage/image-id/328699iB6AE0661BB31CA24/image-size/large?v=v2&px=999 "Capture.PNG")


Answers:
author: Trudy Claspill
body: Hello [@Brittany Montgomery](/t5/user/viewprofilepage/user-id/5339746)

You can use More Options \> Additional Fields area to supply JSON code for editing fields in the issue. The documentation for Advanced JSON editing can be found here:

<https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/>

What is the field type for each of these custom fields? If we know what type they are we can assist you with figuring out the correct JSON code.

comments: author: Brittany Montgomery
body: Hi Trudy,

Both field types are people fields. Thanks for your assistance!

Brittany


author: Trudy Claspill
body: Is this for a Team Managed project?

Custom People fields in Team Managed projects are not currently available to select from the field list in the Edit action in Automation. You would have to edit those fields using Advanced JSON Editing.

The JSON code you need would look similar to this:

```
{
  "fields": {
    "TS People Field": [ 
      { "id": "{{issue.assignee.accountId}}" } 
    ]
  }
}
```

Substitute the name of the field you want to update in the Subtask where I have **TS People Field**

Where I have **{{issue.** you need to use **{{issue.parent.**

Where I have **assignee** you need to substitute in the name of the field you are copying data from.


author: Brittany Montgomery
body: Hi Trudy,

The good news is that we were able to have the first part of the JSON code working correctly, but when we tried to insert the State Manager field, the automation failed. Can you tell me how to add multiple fields with the JSON formatting? Thank you!

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/328714i7E4271F752CA1FAD/image-size/large?v=v2&px=999 "Capture.PNG")


author: Trudy Claspill
body: When your automation rule fails, please provide the output from the Audit Log for that execution of the rule. Valuable information is available in that log.

I believe this is the code that you need:

You incorrectly added a comma at the end of line 4, and omitted the required square bracket and comma on line 5.

> ```
> {
>   "fields": {
>     "Compliance Lead (RCM)": [ 
>       { "id": "{{triggerIssue.Compliance Lead (RCM).accountId}}" } 
>     ],
>     "State Manager (RCM)": [ 
>       { "id": "{{triggerIssue.State Manager (RCM).accountId}}" } 
>     ]
>   }
> }
> ```


author: Brittany Montgomery
body: Hi Trudy - I apologize for not including the audit log on my previous inquiry, but this time it worked perfectly with your coding correction! Thank you so much!


author: Trudy Claspill
body: I'm glad I was able to help you.

Please consider clicking on the Accept Answer button to mark you post as Solved. That helps others searching for solutions find the posts with validated answers.


Tags: cloud

jira-cloud

jira-work-management