Asana / node-asana

Official node.js and browser JS client for the Asana API v1
MIT License
264 stars 74 forks source link

Adding a task named `Ads` breaks the frontend #289

Open ssteiger opened 7 months ago

ssteiger commented 7 months ago

Super funny,

On your webapp task list screen: Adding a task with the task name Ads breaks the ui.

Screenshot 2024-02-06 at 11 00 29 Screenshot 2024-02-06 at 11 01 54 Screenshot 2024-02-06 at 11 02 08

Would love to hear the story behind the bug once it's fixed. 😃

jv-asana commented 7 months ago

Hi @ssteiger, I can't seem to reproduce this issue. I tried 2 scenarios:

Scenario 1 - 1:

  1. In Asana webapp/ui in a "Test" project add a task using the "+ Add task" button
  2. Named that new task "Ads"
  3. Created another task with the "+ Add task" button and named it "Ad"
  4. Observed no issues

Scenario 1 - 2:

  1. In Asana webapp/ui in a "Test" project add a task by clicking on the row
  2. Named new task "Ads"
  3. Added another task by clicking on the row and named it "Ad"
  4. Observed no issues

Scenario 2:

  1. Used the node-asana v3.0.1 library to createTask
  2. In request body specify name as "Ads"
  3. Make another request with name as "Ad"
  4. Observed no issues

EX Request:

const Asana = require('asana');

let client = Asana.ApiClient.instance;
let token = client.authentications['token'];
token.accessToken = "<YOUR_ASANA_PERSONAL_ACCESS_TOKEN>";

let tasksApiInstance = new Asana.TasksApi();
let body = {
    "data": {
        "name": "Ads",
        "projects": ["<PROJECT_GID_OF_TEST_PROJECT>"],
    }
};

let opts = {};
tasksApiInstance.createTask(body, opts).then((result) => {
    console.log('API called successfully. Returned data: ' + JSON.stringify(result.data, null, 2));
}, (error) => {
    console.error(error.response.body);
});

Do you have a recording you could share?