Hello
I am trying to insert a table in the description field when creating a ticket in cloud via api.
I have tried with the following json but it gives me an error.
{
"fields": {
"project": {
"key": "DES"
},
"summary": "Test api table",
"description": {
"type": "doc",
"version": 1,
"content": [
{
"type": "table",
"content": {
"type": "tableRow",
"content": [
{
"type": "tableHeader",
"content": [
{
"type": "text",
"text": "Columna 1"
}
]
},
{
"type": "tableHeader",
"content": [
{
"type": "text",
"text": "Columna 2"
}
]
},
{
"type": "tableHeader",
"content": [
{
"type": "text",
"text": "Columna 3"
}
]
}
]
}
},
{
"type": "table",
"content": {
"type": "tableRow",
"content": [
{
"type": "tableCell",
"content": [
{
"type": "text",
"text": "Dato 1"
}
]
},
{
"type": "tableCell",
"content": [
{
"type": "text",
"text": "Dato 2"
}
]
},
{
"type": "tableCell",
"content": [
{
"type": "text",
"text": "Dato 3"
}
]
}
]
}
},
{
"type": "table",
"content": {
"type": "tableRow",
"content": [
{
"type": "tableCell",
"content": [
{
"type": "text",
"text": "Dato 4"
}
]
},
{
"type": "tableCell",
"content": [
{
"type": "text",
"text": "Dato 5"
}
]
},
{
"type": "tableCell",
"content": [
{
"type": "text",
"text": "Dato 6"
}
]
}
]
}
}
]
},
"issuetype": {
"name": "Task"
}
}
}
The error is as follows.
{
"errorMessages": [
"INVALID_INPUT"
],
"errors": {}
}
Welcome to the community ... You can use the ADF library utilities below
One is to verify Html to ADF and other does the opposite. By doing a comparison of your input with the playground, you can find the issue with the INVALID_INPUT
https://developer.atlassian.com/cloud/jira/platform/apis/document/playground/
https://developer.atlassian.com/cloud/jira/platform/apis/document/viewer/
Hope it helps
Cheers
Ajay
With this tool I have been able to solve the problem perfectly.
Thank you very much for your help :)
Cheers!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Your are welcome :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Álvaro Quesada , can you share the payload here what you used to create table in the description
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.