Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Edit Issue Custom Single-User Field

tmaliszewski March 25, 2022

Hi All,

I am trying to define Automation rule for my team to automatically assign fields. I am struggling with a custom field type single-user picker. My field is not available via the 'Choose fields to set..' so need to go with JSON.

I tried following but none of the works:

{"fields": {"customfield_10829" : { "name": "61ead3cc9d1740006900db46"}}}

{"fields": {"customfield_10829" : { "id": "61ead3cc9d1740006900db46"}}}

{"fields": {"customfield_10829" : { "name": "currentUser()"}}}

{"fields": {"customfield_10829" : { "id": "currentUser()"}}}

also tried all above with using update/set but still getting same result, an error

 (data was not an array (customfield_10829))

Ideally I would like it to work on a team level so it should assign the field for current user.

Not sure where I am making things wrong.. Appreciate your help!

2 answers

2 votes
Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2022

Hi @tmaliszewski 

What's the full rule? I assume the user picker is a custom field, not the assignee field?

It'd be good to clarify some things about the field also...

  • Is the field on the Screen?
  • Is it a visible field - i.e not hidden in the Field Configuration?

^ Because if it's a normal User Picker (Single User), it should be possible to use without JSON.

For example, I used a custom field, Owner, and then used this rule to populate it:

  • Trigger: Issue Created
  • Action: Edit Issue
    • Field: Owner
    • Value: {{initiator}} - this Smart Value populates Owner with the user who triggered the rule

Ste

tmaliszewski March 25, 2022

Hi Stephen,

Thanks for your response. 

The full rule is:

Trigger: When issue created

Condition: Reporter is current user

Action: Edit Issue (advanced = JSON, as the custom field I want to edit is not showing up on the drop down list. On the drop down list is a text: AVAILABLE FIELDS SHOWING 50 OF 391, but the custom one I am looking for is not there)

My JSON in the advanced edit issue is following:

{"fields": {"customfield_10829" : { "name": "61ead3cc9d1740006900db46"}}}

I tried all the above options but with same error.

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2022

Hi @tmaliszewski 

Is the field available if you search for it in the Choose fields to set field?

As I say, it'd be good to clarify why the field isn't showing rather than trying to resolve it with JSON (which still might not work if there's a reason the field is not editable).

It should be there in the list, there's no reason above which states otherwise.

Ste

Like Stefan Salzl likes this
tmaliszewski March 25, 2022

Thanks Stephen, 

Let me dig into it to try find out why that field is not showing up on the Choose fields field.

Thanks!

Tomasz

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 25, 2022

No worries Tomasz!

Let us know how you go, and if we can be of any further help :)

Ste

Like tmaliszewski likes this
tmaliszewski April 1, 2022

Hey!

I have been going back and forth with it and not found much how the People type field might be configured further. The only option I am finding is to make single or multiple user field. However my automation rule does not work in both cases still giving same error.

Also regardless of the field being single or multiple user it is still not showing up on the drop down Choose Fields to set list.

I would appreciate if anyone can share how you managed to configure such automation around User/People type custom filled using the dropdown list of JSON.

Thanks lots!

Stephen Wright _Elabor8_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
April 1, 2022

Hi @tmaliszewski 

Can you clarify Mark's comment below - is this a Team-managed Project?

The field name would be People rather than User Picker if it is.

 


If yes, then it's not currently possible to set this field via Automation - see this help page for more information. The feature request for this can be viewed via AUT-1651 

Your alternative would be to create a Company-managed Project instead, where this is possible using User Picker custom fields.

Ste

tmaliszewski April 3, 2022

Hey!

Yes my project is indeed Team-managed. That clarifies the limitations. 

Thanks for pointing me into the links, very helfull!

Cheers!

Tomasz

0 votes
Mark Chaimungkalanont
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
March 30, 2022

Is the field in question a People field in one of the Team managed project types? That field type isn't supported yet, which may explain why it doesn't appear on the list

tmaliszewski March 30, 2022

Hey Mark,

My field is a custom field defined on a project level and it is user field. Are you saying that type of field is not supported in the automation rules yet?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events