Jira REST API call for issue create failing

Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

Hello All,

One of the scripts to create issues using REST API is giving the return code 400, with the following message:

Truncated server response: {"errorMessages":[],"errors":{"reporter":"Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."}} (use muteHttpExceptions option to examine full response)

This is after the script defines the reporter and the user credentials used to execute the script have the relevant permissions on the project. This screen scheme has also been validated, and the create screen has the 'Reporter' field.

Code segment is as below:

var data = {
    "fields": {
      "project": {
        "key""ABC"
      },
      "issuetype": {
        "name""Story"
      },
      "reporter": {
        "accountId":"622724d2302c6b006af51ec4"
      },
      "summary"summary,
      "description": {
        "type""doc",
        "version":1,
        "content":[
          {
            "type""paragraph",
            "content": [
              {
                "text"description,
                "type""text"
              }
            ]
          }
        ]
      }
    }
  };
The Atlassian documentation available here, mentions setting the reporter differently. This has also been tried but still gets the same error.
Has some on seen this behaviour previously?
Looking forward to hearing from community experts on how to resolve this.
Thanks
Gaurav

3 answers

0 votes
Bob Lopez November 17, 2022

@Gaurav did you figure this out? I'm having the same problem with the exact same error message.

0 votes
Matt Doar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

So this is a company-managed project in Jira Cloud?

Worth checking the field configuration doesn't have the Reporter field hidden for some odd reason

Matt Doar
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

And the account used may need to have the Modify Reporter permission in that project

Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

Hello @Matt Doar 

Yes, this is a company-managed project in Jira Cloud, a standard subscription.

The reporter field is visible on the Create Issue screen and the user (myself) does have the Modify Reporter permission in that project.

Thanks,
Gaurav

0 votes
Dam
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

Hi @Gaurav 

like the doc you mentioned, you should use reporter > id and not reporter > accountId in your var data ;) 

"reporter": { "id": "5b10a2844c20165700ede21g" },

I hope this helps. 
Let us know if its solved the problem. 

Cheers,
Dam. 

Gaurav
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
August 4, 2022

Hello @Dam 

Thanks for the prompt response. As suggested, I updated the code to use 'id' but it still fails with the same error.

"issuetype": {
        "name""Story"
      },
      "reporter": {
        "id":"622724d2302c6b006af51ec4"
      },
Truncated server response: {"errorMessages":[],"errors":{"reporter":"Field 'reporter' cannot be set. It is not on the appropriate screen, or unknown."}} (use muteHttpExceptions option to examine full response)
I had tried this option previously as well without success. Any other suggestions to resolve this?
Thanks,
Gaurav

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events