Automation Rule to update custom user field with person making the change

Angie Affolter
Contributor
November 23, 2024

I want the automation rule to update a custom user picker field with the user/initiator when they transition the issue.

I saw this on another post and I tried it and it runs to success and says it updated the issue but the field (Current Status Updated By) did not actually update.

{ "fields": { "Current Status Updated By": { "id": "{{initiator.accountId}}" } } }

Yes, the field is on the screen

The automation is also updating a custom date field with Now and that's working okay.

We're on release 9.17.3

Is my code wrong?  HELP!  and thank you!

2 answers

1 vote
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.
November 24, 2024

Hi @Angie Affolter 

To set a single-select user picker field, you may use the "name" or "id" value: https://confluence.atlassian.com/automation/advanced-field-editing-using-json-993924663.html#AdvancedfieldeditingusingJSON-Single-userpickercustomfield

Also please note smart values are name, spacing, and case-sensitive.  When an incorrect one is used, that may fail with no errors.  I recommend using this how-to article to confirm the smart value for your field, or perhaps to use the custom field ID value instead: https://confluence.atlassian.com/automation/find-the-smart-value-for-a-field-993924665.html

Kind regards,
Bill

0 votes
Humashankar VJ
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.
November 24, 2024

Hi @Angie Affolter 

Try using the accountID instead of id in your JSON

{

  "fields": {

    "Current Status Updated By": {

      "accountId": "{{initiator.accountId}}"

    }

  }

}

If the issue persists, try updating the field manually to ensure there are no permission issues or other restrictions, consider using a post function instead of an automation rule, as this has worked for some users with similar issues

To learn more - Solved: Jira Automation: change custom field to the curren...

Hope this helps - Happy to help further!!
Thank you very much and have a great one!
Warm regards

 

Angie Affolter
Contributor
November 24, 2024

Thanks for the suggestion.  I did try it and got:

Edit issue

Error while rendering additional fields.
Failed to get value for "fields": { "Current Status Updated By": { "accountId": "{{initiator.accountId
Purnendu Chavan November 25, 2024

Hello Angie,

I created a test automation rule in my Jira Datacenter.

This rule will update the custom user picker field automatically when the issue is transitioned.
Automation.png

This rule is working fine for me.

Like # people like this
Angie Affolter
Contributor
November 26, 2024

YES!  That worked!  Thank you!!

Like Humashankar VJ likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
TAGS
AUG Leaders

Atlassian Community Events