I am creating a new automation for my project that involves a field titled "Forms". We've used this field in other automations without issue. However, when I was creating a new automation using this field, the field is not populating when selecting "choose fields to set". The field is assigned to the project as shown in the screenshots. Does anyone have a solution or a possible workaround for the component "Then: Edit work item fields"?
There is an existing smart value named forms to support JSM data, and thus your rule may be colliding on the values. I recommend not using field names which are the same as built-in fields or smart values for this same reason.
Kind regards,
Bill
Hi Bill,
Thanks for your reply. We've had this field for over a year and haven't had any issues until now. It's a people field and is used by other projects as well. The field is "Forms" with a capital "F" and it appears the forms you referenced is lowercase. Is there a workaround to allow this field to be selected in automation rule creation? Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
First, sorry I missed this is a People type field in the question; those are a bit "weird" and only used in Team-managed projects / spaces, and they have a few challenges with automation rules:
To use the People field in a rule for an edit, you may use a JSON expression in the advanced edit section of the action, and you will need to add / remove people from that type of field using their account ID values and the custom field ID.
First, use the { } at the right of a field or this how-to article to identify the correct custom field ID: https://support.atlassian.com/cloud-automation/docs/find-the-smart-value-for-a-field/
Then to build your JSON expression, please see this information: https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Multi-user-picker-custom-field
Please let me know if you need help with the JSON, perhaps describing what you want to do the to field: set the value, add a person, remove a person, etc. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Bill! I took a screenshot of the automation I am working on to help with what I'm asking it to do. On the highlighted component for editing work item fields, this would specify that if the previous components are true, then edit field Forms to fill in to user ID 5cf977af623cba0f42e00fd1. If you wouldn't mind, could you help me with the JSON needed for the advanced section of this highlighted component? Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your field needs the single user value, the JSON would be:
{
"fields": {
"customfield_12345" : [
{
"id": "5cf977af623cba0f42e00fd1"
}
]
}
}
And you would replace customfield_12345 with the value for your field. I described earlier how to find that field ID.
One more thing: does your Send Email action refer to any updated fields, such as the People one?
If so, please add a Re-fetch Work Item Data action after the edit and before the send email one to reload the new data from the cloud.
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.