Error creating issue with reporter

HI,

Been trying to create an issue with reporter specified using forge but getting the following error

 {
    errorMessages: [],
    errors: {
      reporter: "Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."
    }
  }

I am able to create an issue without reporter. I do see reporter field on the create issue screen and I am using the following payload

{
    "fields": {
        "summary": "this is it",
        "issuetype": {
            "id": "10004"
        },
        "project": {
            "id": "10000"
        },
        "reporter": {
            "accountId": "557058:f206d58a-04f9-40b5-9b68-c09130e5d0e8"
        },
        "description": {
            "type": "doc",
            "version": 1,
            "content": [
                {
                    "type": "paragraph",
                    "content": [
                        {
                            "text": "As a User, I want to...",
                            "type": "text"
                        }
                    ]
                }
            ]
        }
    }
}

using forge as

const response = await api.asApp().requestJira("/rest/api/3/issue", {
    method: "POST",
    headers: {
      Accept: "application/json",
      "Content-Type": "application/json",
    },
    body: JSON.stringify(issue),
  })

@jmadan,

As a “naked” REST API request (basic auth with API token, no Forge), this works for me:

{
    "fields": {
        "reporter": {
            "id": "5f64ffdf327ea50070942c01"
        },
        ...
    }
}

I’d like to rule out the underlying REST API itself. Can you post the body of the request you were trying to make?

@ibuchanan I have updated the initial text with the payload that I am trying. I have tried both blocks reporter with accountId and id to check if that makes any difference but it does not as error message does not change.
Using asApp because I am using an extension to create issue and assign the reporter as part of that. without reporter block in the above payload, I am able to create the issue.
I have the following permissions in my manifest.yml

- read:jira-work
- write:jira-work

not sure if I need any other permission

Any suggestions? @ibuchanan

just trying to bump this up if anyone has any clue or is this is a bug in Forge?

@jmadan,

Still catching up to the full Forge app, but we can rule out your scopes as the cause. Those are correct. I was able to execute a simple 3LO flow and REST API request with only those scopes.

this worked… I updated to latest version on Forge and updated the payload to have

"reporter": {
            "id": "557058:f206d58a-04f9-40b5-9b68-c09130e5d0e8"
        },

it created the issue with reporter

1 Like