I want to set content for a custom wiki description field on view issue behaviour, !not creat.
I have a behaviour script which is doing well on create issue but not on view issue.
// returns DescriptionField
const descriptionValue = getFieldById("customfield_10887").getValue();
//if (statusValue == "10716") {
// If description field is wiki markup access the content property
if (typeof descriptionValue !== "string") {
const descriptionValueContent = descriptionValue.content.toString();
if (!descriptionValueContent) {
getFieldById("customfield_10887").setValue(
{
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Beschreibung: Die Anforderungen oder die Kriterien, die der IT-Bedarf erfüllen muss."
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Beispiel: Die mobile App soll eine vertikale Ansicht des Live-Feeds für iPhone-Benutzer bieten, eine Schaltfläche zum Umschalten in die Vollbildanzeige für Desktop-Benutzer haben, einen Link zum Apple Store für Android-Benutzer enthalten und ein ansprechendes Design und eine einfache Navigation haben.",
"marks": [
{
"type": "textColor",
"attrs": {
"color": "#4c9aff"
}
}
]
}
]
},
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "!Den Beschreibungstext sowie den blau hinterlegten Text bitte löschen bzw. durch eigene Inhalte ersetzten!",
"marks": [
{
"type": "textColor",
"attrs": {
"color": "#ff5630"
}
}
]
}
]
}
]
})
}
}
//}