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

Copy value of the reporter/creator field into a custom people field

Mari-Ann Eriksen June 13, 2024

Hi, 
I have a custom @ people field called Contact, which may contain one or more people. 

I want to populate this field with the value of the reporter or creator of the idea (when idea is created, if not filled already). Is this possible? Can someone help me with such automation? I get error when using {{issue.creator}} or {{issue.reporter}}:

23.JPG22.JPG

3 answers

1 accepted

2 votes
Answer accepted
Nick H
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 13, 2024

Hi @Mari-Ann Eriksen ,

I believe @Gary Spross is correct, and you will need to use the "Additional fields" section (under "More options").

When searching for a custom JPD people-field within an automation (at least when mapping to this field-type when creating an idea), I cannot seem to find it. For example:

peep1.jpegpeep2.jpeg

 

So instead I used the JSON body below to copy the idea's Reporter to the JPD people-field in my project / idea:

{
"fields": {
"customfield_XXXXX": [ { "accountId": "{{issue.reporter.accountId}}" } ]
}
}

customfield_XXXXX above would be the ID of your Contact field. Check out this page on how to find the field's ID: How to find any custom field's IDs

 

Also something to note: any custom JPD people-field is parsed as an array, so formatting is important! Otherwise the automation would have errors mentioning something like, "data was not an array."

The JSON body shared above should be the correct formatting needed to get this working as expected.

 

Here's the automation for visibility, along with a test:

peep3.jpeg

peep4.jpeg

 

Hope that helps!

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.
June 13, 2024

Hi @Mari-Ann Eriksen 

Yes, and...to the suggestions from Nick and Gary:

How do you want to use the People field later in automation rules?

I recall team-managed project (TMP), People fields have limited data within rules.  And JPD projects seem based upon TMP.  For example, People fields cannot be used in rules to send emailshttps://jira.atlassian.com/browse/AUTO-519

If you believe you need that capability, there is no workaround yet for JPD.  (The workaround for TMP is to add a global, user-select field.  That is not yet possible for JPD.)

Kind regards,
Bill

Mari-Ann Eriksen July 4, 2024

Thanks a lot, @Nick H and @Gary Spross, the detailed explanation was very helpful! This worked! :) 

Thanks for the information @Bill Sheboy I will keep this in mind, but as of now, there is no plans to automate emails to this people field. 

 

What I also discovered is that I had the wrong field. We used to keep the ideas in Jira before and the Contact field that I selected was actually from Jira and not JPD. That explains why it was available to select for me, and you were not able to reproduce to pick a people field @Hermance NDounga This has fooled me many times. I find it confusing that fields from Jira is appearing in the automation for JPD, when the scope is specifically set to the JDP project (and not being a global rule)

Like Bill Sheboy likes this
0 votes
Hermance NDounga
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 13, 2024

Hello, 

Can you click the three dots don't he right to the field instead, and choose copy, select the field creator. 

However, I'm going to be very honest - I thought people fields were not supported in this interface, and I am personally not able to pick a people field to reproduce your issue. 

Best Regards,
Hermance
Product Manager @ Jira Product Discovery

 

0 votes
Gary Spross
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.
June 13, 2024

I think you need to set the field using the "Additional fields" section (under "More options"). Not sure of the exact syntax (and this is untested), but below is my first thought:

{

"fields":{

"customfield_10061": "{{issue.reporter}}"

}

}

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events