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 :-(
I found the issue, the first element in the array for a custom field was null.
"customfield_35598": [
null,
"XT-858"
]
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.