Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,365,266
Community Members
 
Community Events
168
Community Groups

Automation for JIRA: Set Custom User Picker Field by user who triggered the event.

Here is the full details of my issue.

 

I have a custom field, that is a user picker field. The name of my custom field is "UX2_Reviewed_by" .

 

I have one other field in my ticket that is a set of check boxes. I cannot get the below proposed automation to work. Any ideas?

 

Proposed automation

When a user updates the value on the checkbox field, I want the user to automatically be populated in my custom user picker field. I am trying to accomplish this using the action: "set entity property", however, i keep receiving the following error "Error setting entity property for issue:"

I have tried variations of the following property keys/property value.

 

accountID

DisplayName

 

set_ent_property.png

2 answers

1 accepted

1 vote
Answer accepted

Hey Jeffrey,

 

Since you're trying to update a custom field, you should use the "Edit Issue" component to update the UX2_Reviewed_by custom field.

Thanks, but when I do edit issue, there is no option to set this as "user who triggered the event"...... am I missing something

 

Automation rules - JIRA 2019-12-30 18-37-35.png

Hey Jeffrey,

From there you can use the "Additional Fields" section. Set it up as the screenshot below and it should work for you. Also you can refer to the documentation here for advanced field editing: https://docs.automationforjira.com/issues/edit-additional-fields.html#format-of-the-json

Screen Shot 2019-12-30 at 8.50.04 AM.png

Amazing! Thanks so much for the help. 

 

I had to make a few adjustments, so for anyone else who wants to do this here is the proper code. 

 

 "UX2_Reviewed_by": {"id": "{{initiator.accountID}}" }



@michael.mandel @Jeffrey Bistrong Hi both, I know this is a slightly old post but I could really do with some help with something very similar!

I'm looking to set a user picker custom field (called "Task owner") to the same value as the assignee (or initiator, if assignee isn't possible...) when the issue is transitioned from A -> B. I've tried a few combinations, but I'm getting an audit log error of Error while parsing additional fields. Not valid JSON. Any suggestionscode.PNG

No worries, fixed it! I had the wrong format with my brackets :)

I wonder if anyone can help me sort this out. I'm doing basically exactly what you guys have typed above. I have a custom field user picker that I want to update. I used the same code I see above and I get a success when it runs. However, the custom field doesn't update. It clears the current value then doesn't update to the new value.

2020-08-14_16-28-51.png2020-08-14_16-29-30.png

I would suggest using the log action to verify it is logging the proper output

This will help you determine what layer the problem is a and whether the proper value is being set.

Automation rules - JIRA 2020-08-18 09-50-10.png

Like Brock Jolet likes this

I never did get this solution to work as typed. However, after a re-index my custom field appeared as an option in the drop-down to simply automate it through the UI.

When I take the ", I get a JSON parsing error.

Error while parsing additional fields. Not valid JSON.

{
    "fields": {
        "Story point estimate": {{triggerissue.Story point estimate}}
    }
}

works for me too yeay... for multi user picker i used this

{
"fields": {
"Approved By": [{
"id": "{{initiator.accountID}}"
}]
}
}

 

So I'm trying I'm using the status transition to populate the user picker field but for some reason its just showing unassigned. Any suggestions


{
"fields": {
"Triage Engineer": {
"id": "{{initiator.accountID}}"
}
}
}

Screenshot 2022-07-21 112340.png

Hey Matthew, 

 

could you use the log action to confirm your output is correct?

 

Are there any errors in audit log?

 

Could you show a screen shot of the automation?

Like Dave Liao likes this

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events