Formatting issue while creating new tasks using API

vbjain

I am automating the "Use as a Template (Copy Project)" action via API but API does not support it directly.

For that, I need to get one "note" from a task and copy it to another task using API, for that I first fetched the task details using API, here is the "notes" tag I received:

"notes": "\n\nClick on the Down Arrow button to the right of the project \nChoose \"Use as a template (Copy Project)\"\n\nChange the name to:  \"PS - CustomerName - ProjectTitle\"\n(For TM Projects: Change name to \"TM - CustomerName - SENumber (Time)\" )\n\nFind your new project in the project list in the left panel and re-order it alphabetically.\n\nChange the colour."

But when I pass the same "notes" to another task using API, it does not convert \n to new lines, and creating the notes with \n. Can you please suggest me how to solve this problem?

agnoster

Sending a "\n" in JSON does indeed map to a newline. If you're using formdata you would need to replace the "\n" with a literal newline character - if you're using JSON, make sure you're not accidentally escaping the "\n" into something like "\n" (or worse).

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

Issue while creating a AD Group using Graph API

Formatting issue with HTML while using JSoup for Java

PDFBox issue while creating a new page dynamically

Issue while creating SparkSession object using SparkConf

Issue while creating image slider using jquery

Issue while formatting date

Add status for JIRA Issue while creating it using JIRA SOAP API and PHP

Creating new objects using a iterator in a while loop

Creating Issue in Jira using REST API

Unicode conversion issue while using API gateway

Issue while creating multiple subnets using for_each in Terraform

Facing issue while creating mysql stored procedure using perl script

TypedQuery issue while creating query using two tables

Issue creating new variable with mutate R using strsplit

While Creating a new project

Error related to Tag creation while creating a new EC2 Instance using EC2 Java API

String formatting issue for creating the SQL query for BCP

Using previous row value while creating a new column

Getting error while creating a new Rule on an existing EventBus using CDK

Creating a new variable while using subsequent values in r

Creating fluent api issue

Issue with the XML while creating Channel

Issue while creating a controller in AngularJS

DecimalType issue while creating Dataframe

Issue with matplotlib formatting using pandas

Dependency issue creating SWRL Rule with SWRL API using gradle

Issue while formatting date in c#

Laravel issue creating new user

Creating a new data table for each row of an existing data table R while avoiding memory vector issue

TOP Ranking

HotTag

Archive