Forums

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

Requirement : table should come while creating ticket in desc field

Alok Deo
December 18, 2025

Want to achieve the same through script runner behaviour, but not happening:

Trying below code : 

const descField = getFieldById("description");

// Get existing value
const currentValue = descField.getValue();

// Only set if description is empty
if (!currentValue || !currentValue.content || currentValue.content.length === 0) {

descField.setValue({
version: 1,
type: "doc",
content: [
{
type: "table",
content: [
{
type: "tableRow",
content: [
{
type: "tableHeader",
content: [
{
type: "paragraph",
content: [{ type: "text", text: "Field" }]
}
]
},
{
type: "tableHeader",
content: [
{
type: "paragraph",
content: [{ type: "text", text: "Details" }]
}
]
}
]
},
{
type: "tableRow",
content: [
{
type: "tableCell",
content: [
{
type: "paragraph",
content: [{ type: "text", text: "" }]
}
]
},
{
type: "tableCell",
content: [
{
type: "paragraph",
content: [{ type: "text", text: "" }]
}
]
}
]
}
]
}
]
});
}

1 answer

0 votes
Mohamed Benziane
Community Champion
December 18, 2025

Hi,

Can you elaborate what is not working ?

You can use this ADF builder to create the content you want and past it into behaviour
Document builder

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
STANDARD
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events