Hi Team,
I am trying to auto-populate a nested list in the description field with behaviour, but I am unable to find options other than ordered and unordered lists. I am looking for something similar to what is shown in the picture.
Referred document :
https://developer.atlassian.com/cloud/jira/platform/apis/document/nodes/listItem/
For your requirement, you could try looking into typescript and play around with the bullet point formatting.
I gave a basic test in my environment with this code:-
const descriptionValue = getFieldById("description").getValue();
let str = "blah•blah•blah";
let strArr = str.split("\u2022");
let newStr = '\u2022' + strArr.join("\n\u2022");
// If description field is wiki markup access the content property
if (typeof descriptionValue !== "string") {
const descriptionValueContent = descriptionValue.content.toString();
if (!descriptionValueContent) {
getFieldById("description").setValue({
"version": 1,
"type": "doc",
"content": [
{
"type": "paragraph",
"content": [
{
"type": "text",
"text": "Test\n",
"marks": [
{
"type": "strong"
}
]
},
{
"type": "text",
"text": newStr
}
]
}
]
}
)
}
}
Please note that the sample code above is not 100% exact to your environment. Hence, you must make the required modifications.
Below is the output that I was able to achieve:-
I hope this helps to answer your question. :-)
Thank you and Kind regards,
Ram
Create a new custom field of the type text paragraph, set the context to the required projects and set a place holder text.
Update the screens used in the project(s), to present the field.
This is the simple solution.
I you want to keep using the description field, create an automation that on issue creation copies the value from the CF field to the description field.
Then only use the field on the create screen and not on edit or view screen.
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.