Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

When creating a issue I get {"errorMessages":["Internal server error"],"errors":{}}

Peter Jaeckel
March 25, 2022

I use the Rest API via C#. It is possible to create several issues (Test cases for XRAY) but this one does not work and i don't know why...

{
"fields": {
"components": [
{
"project": "XT",
"name": "TPR-W01 Electrical Cabinet",
"id": "94930"
}
],
"description": "*Case ID:* TPR-W01-001\\r\\n\\r\\n*Target(s):*\\r\\n * Defined machine shut down by power fail and defined start up with no memory loss after power return\\r\\n\\r\\n*Comment(s):*\\r\\n * Additional alarms are displayed on control panel\\r\\n * Depending on the UPS setting, this can vary in duration",
"project": {
"key": "XT"
},
"summary": "Function: Shutdown by power fail",
"issuetype": {
"name": "Test",
"id": "15200"
},
"customfield_35598": [
null,
"XT-858"
],
"customfield_35594": {
"steps": [
{
"index": 1,
"fields": {
"Action": "Go to 'Dashboard'",
"Data": null,
"Expected Result": null
}
},
{
"index": 2,
"fields": {
"Action": "Go to '[K03] Control system - Counters - Batch: Accepted total'",
"Data": null,
"Expected Result": null
}
},
{
"index": 3,
"fields": {
"Action": "Note current value: _____________",
"Data": null,
"Expected Result": null
}
},
{
"index": 4,
"fields": {
"Action": "Switch off main switch",
"Data": null,
"Expected Result": "\\r\\n* Batch is interrupted\\r\\n* Controlled shutdown is executed, message is displayed"
}
},
{
"index": 5,
"fields": {
"Action": "Wait until all LED lights are switched off at the USP",
"Data": null,
"Expected Result": null
}
},
{
"index": 6,
"fields": {
"Action": "Wait 3 minutes",
"Data": null,
"Expected Result": null
}
},
{
"index": 7,
"fields": {
"Action": "Switch on main switch",
"Data": null,
"Expected Result": "\\r\\n* Batch is in state 'inactive'"
}
},
{
"index": 8,
"fields": {
"Action": "Go to 'Dashboard'",
"Data": null,
"Expected Result": null
}
},
{
"index": 9,
"fields": {
"Action": "Go to '[K03] Control system - Counters - Batch: Accepted total'",
"Data": null,
"Expected Result": null
}
},
{
"index": 10,
"fields": {
"Action": "Note current value: _____________",
"Data": null,
"Expected Result": "\\r\\n* Interrupt is logged in Audit Trail\\r\\n* No disturbance, no loss of memory"
}
},
{
"index": 11,
"fields": {
"Action": "Resume production, start machine",
"Data": null,
"Expected Result": "\\r\\n* Batch is continued"
}
}
]
}
}
}

 

as an answer I receive "{"errorMessages":["Internal server error"],"errors":{}}". I do not have access to the log files :-(

 

2 answers

1 accepted

0 votes
Answer accepted
Peter Jaeckel
April 5, 2022

I found the issue, the first element in the array for a custom field was null.

"customfield_35598": [
null,
"XT-858"
]
0 votes
Bill Sheboy
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.
March 25, 2022

Hi @Peter Jaeckel -- Welcome to the Atlassian Community!

When I got an example to check the attributes for an issue, I did not find the "project" attribute listed for "components", but you show that one in your example.

Perhaps try the minimum needed for components and just include the "name" attribute.

Kind regards,
Bill

Peter Jaeckel
March 27, 2022

Hi Bill,

Attlassion.Jira.ProjectComponent comes with this attribute. I use the same component (with the project key) in other issues and there it works...

Kind regards, 
Peter

Bill Sheboy
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.
March 28, 2022

Thanks, Peter.  In that case, I recommend working with your site admin to submit this one as a ticket to Atlassian Support: https://support.atlassian.com/contact/#/

When you hear back from them please post what you learn to help the community.  Thanks!

Suggest an answer

Log in or Sign up to answer