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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

rest api create issue problem with request type from AO_54307E_VIEWPORTFORM table

Hi. I'm trying to create an issue using Jira API and need to fill the customer request Type.

According to doc, I need to get the "customer request type" as follows:

https://confluence.atlassian.com/jirakb/how-to-set-request-type-when-creating-an-issue-via-rest-api-using-rest-api-2-issue-endpoint-938041214.html

I looked into that table, KEY has this values, for Viewport-id = 4 (the project number from the URL in the portal):

name key VIEWPORT_ID
Incident f5abfb34-b191-40c0-8666-33bc07634022 4
Requirement 08d71935-7739-4dd7-8b5e-032291aaeb18 4

So my JSON looks like this:

$ cat dvcor-create-issue-11fields.json
{
"fields":
{
"project" : { "id": "10300" },
"issuetype" : { "id": "10002" },
"reporter" : { "name": "llagos"},
"summary" : "Requerimiento creado via JSD REST API",
"description" : "Ejemplo desde API Jira Core",
"customfield_10001": "DVCOR/f5abfb34-b191-40c0-8666-33bc07634022",
"customfield_10704": "extension 5942",
"customfield_10400": { "id": "10204" },
"customfield_10325": { "id": "10112" },
"customfield_10322": [{ "key": "SER-3695" } ],
"customfield_10717": [{ "key": "GRES-8461" } ],
"customfield_10408": [{ "key": "SER-16" } ],
"customfield_10412": [{ "key": "SER-33593" } ],
"customfield_10413": [{ "key": "SER-33596" } ]
}
}

However, I'm getting the following error:

{
"errorMessages": [],
"errors": {
"customfield_10001": "Value of customer request invalid"
}
}

So, what am I doing wrong?

Thanks for any hint!

1 answer

1 accepted

1 vote
Answer accepted

try to use the project key in lower case

I'm having a same issue. It seems using lower case of project key works for him but it's not working with mine.   my project key is "SDSAITSD" and key value is like "85d5823b-5d68-4491-930b-a834963ec3xx" so i put a value of "sdsaitsd/85d5823b-5d68-4491-930b-a834963ec3xx"  then I got this error message "invalid customer request value".  any suggestion? thanks a lot! 

the value in the DB is the original project key in lower case. If the project was rekeyed, you have to know what it was originally.

so if it originally was MYKEY and was rekeyed to SDSAITSD, you need to use "mykey/85d5823b-5d68-4491-930b-a834963ec3xx"

Like Jaesang Kim likes this

Thank you for your suggestion. 8)  

@Martina Riedel's comment is what solved this for me.

 

For anyone else who may be struggling with this, if you are using the following endpoint to get your request type key value:

/rest/servicedesk/1/servicedesk/request/ISSUEID/request-types

 You should also see a "portalKey" in the same record.  This is what I had to use!  It turns out my portal key was different than my project key (must have been rekeyed without my knowledge).

@Kyle Keefer - interesting new piece, but I can't get 

/rest/servicedesk/1/servicedesk/request/ISSUEID/request-types

to return anything.

For ISSUEID I'm using the  id that /rest/api/2/issue/MYKEY-1 returns. I tried with several existing issues.

I'm on JSD 4.5.5 now. 

Is that what you are doing? Which JSD version?

Suggest an answer

Log in or Sign up to answer
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you