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,456,701
Community Members
 
Community Events
176
Community Groups

Copy the content of an Insight Textarea Attribute to a jira custom field in the same format

Edited

Hey,

I want to copy the content of an Insight Textarea Attribute to a jira custom field.
I do this with an Insight Postfunction “Set a Jira custom field with the attribute value from a selected object”
The content is copied, but the formatting is not correct. It looks like HTML-code is being copied. 

How do I make sure that the text in the jira field is displayed the same as in the Insight object?

I am now using a jira multi text field with wiki rendering.

 

Anyone tips, suggestions?

 

Thanks in advance.

 

Groetjes,
Greetings,
Marco

p.s. Attached a screenshot of the display in the jira field.

Screenshot 2021-08-26 at 10.11.35.png


And a screenshot where you can see the display in Insight and the result in jira custom field

Screenshot 2021-08-27 at 09.52.01.png

2 answers

This is actually quite a huge issue.

I am facing to this and trying to solve that last few months.

Got official Atlassian reply - it is not supported.

There are two or three workarounds.

First is to strip all HTML tags and receive a plain text - use 

textToStrip.replaceAll("\\<.*?>"," ");

Second approach is to create translation library - own method to convert html tags to wiki markup tags.

The last approach I dug somewhere deep in community is to use 

com.atlassian.renderer.wysiwyg.converter.DefaultWysiwygConverter

class from the atlassian-renderer library and call convertXHtmlToWikiMarkup method for the object.

I am planning to go with last one, but had no time to proof it is working yet.

Hope it helped, let me know in case of success. Facing very same issue.

Cheers, Tom, Czechia

0 votes
Fabian Lim Community Leader Aug 30, 2021

Hi @Marco Brundel

My first suggestion would have been to update the field configuration to ensure it's a wiki rendering, but you have done that already.

Have you tried clearing the formatting on the insight object attribute? Copy and paste it to notepad.

Cheers

Suggest an answer

Log in or Sign up to answer
TAGS

Atlassian Community Events