Automation to set a custom User single field from another custom user field

Systems Analyst March 8, 2024

I have a Custom Field called Manager that auto gets the manager when an item is created from the Creator field. That part is working fine.

Because it is a global field, I cant show it in the Product Discovery Team Managed project. When viewing the rest API for the issue, I seen it works and auto fills out the customfield_10186 aka Manager, so we have a different field for Product Discovery called Creators Manager (customfield_10190), and whenever an issue is created, Basically I want to stick the user from customfield_10186 into the new field customfield_10190. I have tried so many different options in Automation Edit Issue advanced properties, but none of them seem to be working. Please help? 

 

{

    "fields": {

 "customfield_10190": {"id": "{{ issue.customfield_10186.accountId }}" }

    }

}

 

{

    "fields": {

        "customfield_10190": { "id":{{issue.customfield_10186.accountId.asJsonStrnig}} }

    }

}

 

{

    "fields": {

        " customfield_10190": {{ issue.customfield_10186.accountId.asJsonObject("id")}}

    }

}

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 8, 2024

Hi @Systems Analyst -- 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!

Until we see those...

You seem to be describing changing issues in multiple different projects.  Is that the case?

If so, your rule scope cannot be in a single project; instead it will need to be multiple-project or global.  Rules like that need to be managed by your Jira site admin rather than the project admin.

Kind regards,
Bill

Systems Analyst March 8, 2024

jira.png

Systems Analyst March 8, 2024

Its one rule, super simple in a Jira Product Discovery Project. Whenever the Manager field (Customfield_10186) changes, which is on issue creation based on an add-on, i want that fields user to be put in the Product Discovery Custom Field (customfield_10190).

Systems Analyst March 8, 2024

The trigger part works perfect, its the edit issue fields I cant seem to get to work right.

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 8, 2024

People fields in JPD (and team-managed projects) are multi-select user fields.  Please try using that JSON syntax to set this field, adding the square brackets for an array around the value on the right of the colon.

https://support.atlassian.com/cloud-automation/docs/advanced-field-editing-using-json/#Multi-user-picker-custom-field

Suggest an answer

Log in or Sign up to answer