I'm trying to create an automation. I would like to assign a specific user to a field that I have created inside a jira form. Can really understand what JSON should be used for this
Hi @Jeet Damania,
Welcome to Atlassian Community!
Are you trying to add data to the Request form or Forms (found under Project settings > Forms)? Based on your question it sounds like the latter, and if that is the case the only way to do it would be to link the field in the Form to field in Jira. Your automation would then populate that custom field with the user, re-open and re-submit the Form and that would then sync the Form with the fields that are linked.
Thanks, @Mikael Sandberg as I missed the part about the form usage :^)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
its "Context Fields" under project -> project settings -> request types
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Okay, in that case then the KB that @Bill Sheboy linked to would be the way to go. You need to know the Atlassian Id for the user you want to add which you can get if you do a webrequest to the Find users endpoint.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Or...if this is the same user for all cases, you can do this to find their account id value one time:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. Now i keep getting this error
No fields or field values to edit for issues (could be due to some field values not existing in a given project):
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please post the following:
Those will provide context to help explain the symptom. Thanks!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
an image of your complete rule (ideally in one image),
an image showing the audit log details for the rule execution.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The syntax for your JSON is not quite correct. (Please note the documentation only shows the details for each field type, and does not repeat the "wrapper" code for each example.)
A full example would be this. Please add your account id value.
{
"fields" : {
"customfield_10702" : {
"id" : "yourAccountId"
}
}
}
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Jeet Damania -- 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...
Have you tried to use the Edit Issue action, select your field, and then select the user?
There may not be a need to use advanced edit with JSON, unless your field is not listed in the drop-down list. In that case, please look here to learn the correct syntax for single-select or multiple-select, user fields...depending on which applies:
Please note you will need to use the account id value when using JSON.
Kind regards,
Bill
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.