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".
Hello @Brittany Montgomery
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.
Hi Trudy,
Both field types are people fields. Thanks for your assistance!
Brittany
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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}}" }
]
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.