Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Copy Custom Field Value to "Reported By" Field

Meredith October 19, 2023

I'm using an API connection to import requests into Jira. The reported by field is blank because the linked field does not match a user or customer in the system. 

I created a custom field that's also called "reporter" in the hope that I can use Jira automation for analyst responses to be sent to the email listed in this custom field. I've tried several JSON code combinations, but with no success.

Some that I've attempted:

1)

{
"update": {
"Reporter" : [
{
"set": {
"customfield_10583": "a single line of text"
}
}
]
}
}

 

2)

{
"fields": {
"reporter":{"value": "{{customfield_10583}}"}
}
}

 

For context, the custom field is a free text field that is entered as an email address by the submitter in Wordpress that is then copied over via API.

1 answer

1 vote
Marc - Devoteam
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.
October 20, 2023 edited

Hi @Meredith 

What are the error messages you received?

Error messages + screen shot of your rule as well.

This will help on getting to the solution of your issue.

I would als rather not call the custom field reporter, as that could create a lot of confusion.

I would set it as Requester fro example.

On API doc is states the following for using a custom field on issue creation:

--data '{
"fields": {
   "customfield_40000": {
         "content": [
              {
                 "content": [
                     {
                         "text": "Occurs on all orders",
                         "type": "text"
                     }
                   ],
                 "type": "paragraph"
              }
           ],
     "type": "doc",
     "version": 1
  }
}'

Meredith October 20, 2023

rule config.png error.png results.png Displaying both the custom and system-owned fields for demonstration purposes. I'd like the rule to overwrite the system field with the custom value. Would a good alternative be to use JSON to code the custom value as a ticket participant so that they receive customer responses?

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events