Rich_text does not work for Status Updates

Thats my code:

function asanaAddStatusToProject(projectId, text, token) {
try {
var token = token || settings.PERSONAL_ACCESS_TOKEN;
var status = {
data: {
color : ‘green’,
html_text : ‘test strong
}
};

var options = {
  "method" : "POST",
  "headers" : {"Authorization": "Bearer " + token 
               ,"Asana-Enable" : "new_rich_text"}, 
  "contentType": 'application/json',
  "payload" : JSON.stringify(status) 
};

var url = 'https://app.asana.com/api/1.0/projects/'+projectId+'/project_statuses';

When status is created i get smth like this:
{“data”:{“gid”:“826339486093559”,“id”:826339486093559,“title”:“Status Update - Sep 18”,“color”:“green”,“created_at”:“2018-09-18T10:42:34.909Z”,“created_by”:{“gid”:“85707186205016”,“id”:85707186205016,“name”:“Константин Кузнецов”},“text”:“test strong”}}

And then in Asana it looks like this:

What am i doing wrong?

var status = {
      data: {
        color : 'green',
        html_text : '<body>test <strong>strong</strong></body>'
      }
    };
    
    var options = {
      "method" : "POST",
      "headers" : {"Authorization": "Bearer " + token 
                   ,"Asana-Enable" : "new_rich_text"}, 
      "contentType": 'application/json',
      "payload" : JSON.stringify(status) 
    };
    
    var url = 'https://app.asana.com/api/1.0/projects/'+projectId+'/project_statuses';

{"data":{"gid":"826348471710485","id":826348471710485,"title":"Status Update - Sep 18","color":"green","created_at":"2018-09-18T10:46:54.083Z","created_by":{"gid":"85707186205016","id":85707186205016,"name":"Константин Кузнецов"},"text":"<body>test <strong>strong</strong></body>"}}

Hey @dgraid, sorry to hear you’re having issues with rich text for status updates. This is actually a known bug that our API team is planning to fix soon. Cheers!

1 Like