Custom field not populated even after the rule executed successfully.
Asked by Umesh Kulkarni:

```
?
```

Hello,

here is the rule that I am running. It is not working, and Rule automation audit logs show success.

Scenario - User is populating the custom field to populated custom field 1 and based on it, i would like to populate custom field 2.

The rule runs perfectly fine however the custom field 2 does not get populated.

Any help in this regard is greatly appreciated.

{

"trigger": {

"type": "issue_created"

},

"condition": {

"type": "field_condition",

"field": "customfield_1",

"operator": "equals",

"value": "Service 1"

},

"action": {

"type": "edit_issue",

"fields": {

"customfield_2": \[

{

"Value": "Team 1"

}

\]

}

}

}

Here is the output -

![image.png](/t5/image/serverpage/image-id/348562i4DD740F4FC9505C1/image-size/large?v=v2&px=999 "image.png")


Answers:
author: Walter Buggenhout
body: Hi [@Umesh Kulkarni](/t5/user/viewprofilepage/user-id/5537858),

It is hard to tell what is wrong by the information you are providing. But if your custom field *2* really is the *team* custom field I think it is, then very likely the value *"Team 1"* is not a correct value for that field.

If you perform a JQL search for all issues having the Team field filled out, you might see that the team name gets converted into a long sort of *hashed code*, which is the actual value you would need to fill out.

Hope this helps!

comments: author: Umesh Kulkarni
body: [@Walter Buggenhout](/t5/user/viewprofilepage/user-id/783225)

Thanks for taking a look. I tried with the hashed code but that did not work.

Please let me know what more information can help check this issue further.

here are current details -

* customfield_1 is a multi select dropdown field
* customfield_2 is a single select dropdown field
* that values "Service 1" and "Value 1" are valid
* and here is the configuration

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/348563iC9AFA42AC532B289/image-size/large?v=v2&px=999 "image.png")


author: Walter Buggenhout
body: Before anything else, [@Umesh Kulkarni](/t5/user/viewprofilepage/user-id/5537858): why are you trying to use json in the additional fields instead of using the simple editor:

![Screenshot 2024-09-22 at 10.39.05.png](https://community.atlassian.com/t5/image/serverpage/image-id/348564i734E9B0A7703D106/image-size/large?v=v2&px=999 "Screenshot 2024-09-22 at 10.39.05.png")

And, secondly, if the field you are trying to set were an unsupported field, why are you including *trigger* and *condition* settings in your json? These are already in your rule, I would assume. Normal syntax to set a value for a field would be something like this:

```
{
"fields": {
"Custom Field Name": {
"value": "red"
    }
  }
}?
```

I would recommend only to revert to the advanced json syntax if you can't find your field under the list of supported fields.


author: Umesh Kulkarni
body: [@Walter Buggenhout](/t5/user/viewprofilepage/user-id/783225)

Thanks for your continued support.

I gave a try to use additional fields because the usual way did not work. I am using custom fields as mentioned in my earlier post and i kept getting validation errors like shown in the screenshot below. This query does work well when searched from within "Assets" but JIRA rule automation gives error.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/348640i1FFB7B16795746F4/image-size/large?v=v2&px=999 "image.png")

for this input it gave error - (data was not an array (Team))

```
{
"fields": {
"Custom Field Name": {
"value": "red"
    }
  }
}?
```

so instead I used the below earlier, but it gives same behavior that is the rule runs successfully however the issue is not edited.

```
{
"fields": {
"customfield_2": [{
"value": "Tried putting here the value as well as hashed id"
}
]
}
} 
```

Any further guidance is much appreciated.


Tags: cloud

jira-cloud