Jira Automation throwing Field value error while trying to edit one of the mandatory field
Asked by Sanjay Dangi:

Hello Community,

While using the jira automation feature for the UseCase. "Move EPIC to Ready, when issue is transitioned to New State, after meeting few conditions.

As per the restrictions imposed by my product, for a epic to move to UnderRefinement from New state, one of mandatory field is "Sponsoring Product/ Area Product".

Through manual Jira edit, this field gives me a drop down option which i can choose. However, when i am trying to edit this field through automation it is throwing me this error "U***nknown fields set during edit, they may be unavailable for the project/type. Check your custom field configuration"*** . /" ***No Fields or field values to edit for issues***". Although i did observe that while setting the automation rule, when i set the value to this field, the exact name is not getting populated hence it is unable to match the required field.

When i checked my field settings through Admin console, i could see the fields are mentioned for my project.

Anyone can help me mitigate this issue?

TIA

Sanjay


Answers:
author: Bill Sheboy
body: Hi [@Sanjay Dangi](/t5/user/viewprofilepage/user-id/5451233) -- Welcome to the Atlassian Community!

For a question like this, please post an image of your complete automation rule, images of any relevant actions / conditions / branches, an image of the audit log details showing the rule execution, and explain what is not working as expected. Those will provide context for the community to offer ideas. Thanks!

Kind regards,  
Bill

comments: author: Sanjay Dangi
body: Apologies,

I do understand that I should have forwarded the screenshot. However, due to company restrictions, I could not that. Attaching the photos, if this helps.

Thanks and apologies again![SAVE_20240315_115434.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/312259i3BDBA2BF80A22D85/image-size/large?v=v2&px=999 "SAVE_20240315_115434.jpg")![IMG_20240315_113202.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/312260i0282A5F7289BF2EF/image-size/large?v=v2&px=999 "IMG_20240315_113202.jpg")


author: Bill Sheboy
body: The problem is related to the order of your rule steps and the issue's state...

When a rule edits an issue, it uses the state / field values at the time the rule loads. And so each of your edits is *restarting from that point*. The same is true for issue transitions.

First, I recommend combining all of those field edits in one action.

Next, please add a Re-fetch Issue action after that revised edit action. That will reload the issue date before proceeding.

Finally, add another Re-fetch after the first transition, and before the next. This will again reload the data before proceeding.

Thus you revised rule could be...

* trigger: issue transitioned
* condition: issue type is epic
* condition: issue type matches that field with JQL
* action: edit issue, changing the fields all at once
* action: re-fetch issue
* action: transition to Under Refinement
* action: re-fetch issue
* action: transition to Ready


author: Sanjay Dangi
body: Hello,

Thank you for your response. However, I am still facing the same issue with one particular field (I.e, sponsoring product/area product).

What I have noticed is that during my manual edit on epic l, when I try to update this particular field, it gives me a drop down list from where I can select the retired product. When it comes to automation "edit issue field", those drop down options (product names) are totally different what I have on the epic and most probably it is not matching with the product names and hence, it is throwing this error. ![IMG_20240318_100245.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/312586i2FB78EB80542B9AD/image-size/large?v=v2&px=999 "IMG_20240318_100245.jpg")


author: Bill Sheboy
body: First thing: please review that audit log as it shows two different custom field id values for "sponsoring product/area product"

* customfield_30502 when the issue edit is attempted, and fails
* customfield_14503 when the transition is attempted, and fails

This indicates there are at least two different fields with the same name. I recommend investigating that before making any rule changes.

Regarding what you described for the available field options in the dropdown list, is that field somehow dynamically loaded with values?

If so, the list shown when editing a rule may be based on the permissions / access of the person editing the rule. When a rule runs, it will be based on the rule actor (or the person triggering the rule by transitioning the issue.


author: Rebekka Heilmann _viadee_
body: Hi [@Sanjay Dangi](/t5/user/viewprofilepage/user-id/5451233) and welcome to the Community!

Can you post the part of the rule where you try to populate the field?