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,558,994
Community Members
 
Community Events
184
Community Groups

How to replace HTML tags in description field?

Hi, i try to create a manual automation rule which can to replace(or delete and save only text in desc. field) HTML tags (<div>; </div>; <br />) with empty value in description field.

The fact is that there is a third-party service through which tasks for Jira are created and in the Description field, customers often highlight something with color or something related to HTML. There is no official solution to this problem, so I try to get out through the automation rules.

Can anyone suggest how to implement this?

2 answers

2 accepted

1 vote
Answer accepted

@Gonchik Tsymzhitov @Bill Sheboy 

I found a way to work with HTML tags through an automation rule. It is not ideal and for each specific case, most likely, you will have to either supplement the existing rule, or create a new one. But in my case, I have specific text and specific tags, so this method worked perfectly.

1.JPG 

I am just using the function to replace a specific tag with an empty value.

2.JPG

So, by analogy with any other tags or even entire HTML constructions.

1 vote
Answer accepted
Gonchik Tsymzhitov
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
Jan 06, 2022

Hi! 

Well, only rest api third party solution I see :( 

Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
Jan 06, 2022

Hi @Andrey Rudnev 

Yes, and...to what @Gonchik Tsymzhitov suggests:

Although you could probably write a regular expression to remove most of the markup, the edge-cases would probably mess up your description field.

If you can, I suggest investigating if the source service can send plain text.  The next option is the already provided suggestion to look for another REST API to strip off the HTML tags...although that is going to add time to rule execution (up to several seconds).

Kind regards,
Bill

@Gonchik Tsymzhitov  @Bill Sheboy 

Thanks a lot for your answers!

Like Bill Sheboy likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events