Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,462,572
Community Members
 
Community Events
176
Community Groups

Adding tables to comment doesn't appear properly in latest comment script field

Edited

I have a script field called "Latest Update" which will update the last comment from put it in the script field. 
The problem I face is that,

When I add a table to comment, that table is not getting updated properly it just displays as a single comment rather than a table. Attached the screenshot for reference.
I want the exact table in comment section should be displayed in "Latest Update" field as well.
Kindly someone help !!!!!

Screenshot 2021-08-03 at 6.01.19 PM.png

2 answers

1 accepted

1 vote
Answer accepted

There should be two options when it comes to rendering wiki content n a scripted field

1) render the wiki to html in your velocity template

2) render the content to html in groovy

I've dabbled with velocity rendering, but I was having issues after some upgrade and converted my own scripted field to use groovy-level rendering.

On your last line of the script, just add something like this

ComponentAccessor.rendererManager.getRenderedContent('atlassian-wiki-renderer', wikiText, issue.issueRenderContext)

 This assumes you've populated a variable called wikiText with your comment body.

Hi @Peter-Dave Sheehan
Your script helped me. I am done :D 

Thank you so much.

0 votes
Leo Community Leader Aug 03, 2021

Hi @Rahini Balamurugan

May I know how you are getting and updating comment to field. are you using wiki renderer on fetched comment before you return the value to field?

also it would be better if you pass the script to look further

 

Regards,

Leo

Hi @Leo ,
I used wiki renderer as suggested by peter and it worked.

 

Thanks to you both <3 

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events