Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
  • Community
  • Q&A
  • Jira
  • Questions
  • HELP: API throw "errorMessages" when It is creating ticket, for required fileds by other screen

HELP: API throw "errorMessages" when It is creating ticket, for required fileds by other screen

The Big Boss
June 1, 2018

Hi guys, (sorry for my english, but I am not native).

 

When I try to create a new ticket in my API 

POST: https://viajesfalabella.atlassian.net/rest/api/latest/issue

This response with the next message:

 

{
"errorMessages": [
"Hotjar - Area Derivada: Hotjar - Area Derivada es obligatorio.",
"Hotjar - Evidencia Derivación: Hotjar - Evidencia Derivación es obligatorio.",
"Hotjar - Motivo Cierre: Hotjar - Motivo Cierre es obligatorio."
],
"errors": {}
}

 

but these fields are required in another screen...

 

I try put default value in the fields, but I get this error:

 

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

 

I can't understand how to solve this problem...


I am making a new integration for our internal system.

 

Please I need your help.

 

 

1 answer

1 accepted

2 votes
Answer accepted
Alexey Matveev
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 Champions.
June 1, 2018

Hello,

1. It says that the fields are required. Are you sure they are not marked as required in the field configuration scheme for the project?

2. If you want to set a custom field during issue creation, it must be on the create screen. I guess, customfield_12675 is not on the create issue screen.

The Big Boss
June 1, 2018

Thanks for reply Alexey.

the fields are required, but not in the creation of the issue.

they are required in another screen, that is call in a transition of the workflow.

I use those fields to the change the issue state in a transition, but not in the creation.

I hope to explain it well.

 

in this screen are required, but not to the create issue.

Screenshot_20180602-015317_Chrome.jpg

Alexey Matveev
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 Champions.
June 1, 2018

Could you attach the screenshot of your create issue screen?

The Big Boss
June 2, 2018

Ok

in the create issue screen, aren't the fields that appear in the API response.

 

SmartSelect_20180602-033502_Chrome.jpgSmartSelect_20180602-033448_Chrome.jpgSmartSelect_20180602-033431_Chrome.jpg

Alexey Matveev
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 Champions.
June 2, 2018

Could you also have a look in the field configuration for the project Hotjar, wether these fields are required or not?

The Big Boss
June 2, 2018

the fields that API throw error, are required only in Hotjar-Derivada screen

 

SmartSelect_20180602-100926_Chrome.jpgSmartSelect_20180602-100750_Chrome.jpg

Alexey Matveev
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 Champions.
June 2, 2018

Why do you think that they are required only in Hotjar-Derivada screen? According to your configuration they are required on the create screen, because you make a field required in the project field configuration scheme. If you want to make a field required only for a transition (a certain screen), then the field must be optional in the project field configuration scheme. You need to add a validator to the transition with the required screen.

The Big Boss
June 2, 2018

wow, I am going to try that.

When I will modify the configuration and add the validation in the transition, I will show the result here.

Thanks so much Alexey...

You are great.

The Big Boss
June 2, 2018

Thanks Alexey...

I add one validation on transition and now it is work correctly.

 

Thanks for you time and patience.

 

SmartSelect_20180602-105711_Chrome.jpgSmartSelect_20180602-124027_Chrome.jpgSmartSelect_20180602-123057_Chrome.jpg

Alexey Matveev
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 Champions.
June 2, 2018

If you feel that I answered your question, kindly accept my answer. In this case other people, who have the same problem, will be able to find this answer.

The Big Boss
June 2, 2018

Thanks so much.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events