Large numbers after colons in task descriptions cause copy to fail

Issue #46 new
Steven Grimm created an issue

If you have a task with a description that includes something like, “Affected account ID: 9309745623098417”, the tool will fail to copy it to a new project. The problem is the workaround for a missing feature in one of PHP’s JSON parser implementations, which is supposed to turn large numbers into strings. Asana’s API returns large task IDs as fields in the response JSON.

The attached patch improves the situation a little bit by matching on double quote followed by colon followed by a large number, which will always be the pattern in the cases the tool cares about (large numbers as field values in JSON objects). Still possible to hit it in task text, but a bit less likely. The patch also adds a bit of logging to make it easier to see what’s failing.

Comments (2)

  1. Mike Houston repo owner

    Good catch, I’d forgotten about that parsing hack.

    Asana now supports string ‘gid’ fields which may be a more permanent solution. I’ll take a look at how much work it would be to switch over to use them compared to the improved regexp.

  2. Log in to comment