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

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,463,526
Community Members
 
Community Events
176
Community Groups

Jira REST API call for issue create failing

Gaurav Community Leader Aug 04, 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 I'm New Here Nov 17, 2022

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

0 votes

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

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

Gaurav Community Leader Aug 04, 2022

Hello @Matt Doar__ LinkedIn 

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 Aug 04, 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 Aug 04, 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

Atlassian Community Events