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,463,347
Community Members
 
Community Events
176
Community Groups

Losing Newline character when creating customer request through Jira API?

We are using the "Create customer request" Jira Service Desk API (POST /rest/servicedeskapi/request) to create Jira Service Desk tickets.

How can we include a newline character (e.g. \n) within any of the textual parameters like "description"?

We've tried many variations of \n but nothing seems to work.  The ticket just gets created with the plain text.

Note that we have disabled HTML in our Jira Service Desk for security reasons.

2 answers

1 accepted

4 votes
Answer accepted
Mark Segall Community Leader Dec 02, 2022

Hi @Daniel Pohl - Have you tried using markdown?

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. \\ Habitant morbi tristique senectus et netus et malesuada. Feugiat nisl pretium fusce id velit ut tortor pretium. Sed euismod nisi porta lorem.

Yes, we tried \\ but it just renders the plain text with 2 backslashes.

Looks like Atlassian Community does the same thing!

Mark Segall Community Leader Dec 02, 2022

There are limitations with the portal experience.  Have you considered maybe going the route of creating an issue via the Jira API rather than a customer request via the JSM API?  You may get a little more leeway on it.

Note - I believe there are issues with setting the Request Type field during the create issue call so you may have to create the issue and then set the Request Type as a second edit issue call immediately after the issue is created.  I know it's clunky, but it may remove some of the constraints you'll face with the JSM API.

Actually, it looks like \\ does in fact create the newline through the ServiceDesk API.  Looks like we were making a mistake in our post that was messing things up.

Like Mark Segall likes this

Actually, it looks like \\ does in fact create the newline through the ServiceDesk API.  Looks like we were making a mistake in our post that was messing things up.

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS

Atlassian Community Events