getting-things-gnome / GTGOnline

An Online Application for Getting Things Gnome!
21 stars 7 forks source link

API: task status should be a text constant #10

Closed Kernald closed 10 years ago

Kernald commented 10 years ago

Currently, when retrieving the tasks, the status is given this way:

status (integer) = ['0' or '1' or '2']: Status of the Task

0, 1 or 2 should be replaced by text values (I guess they are "new", "dismissed", …), which would be:

parinporecha commented 10 years ago

@Kernald , I chose such values initially to avoid spelling mistakes in text. GTG uses 'dismiss' for dismissed tasks. This had caused a lot of problems because the parser could not identify 'dismissed' coming from the sync.

Yes, text is more clear and update-proof but due to the parsing errors, I stuck with integers because the chances of a developer making mistakes with 0,1 and 2 is very less compared to the word strings

I could not understand the "introducing a new state" part. If you give a state other than the listed, then it won't cause any problems. Please can you explain it more ?

Kernald commented 10 years ago

I could not understand the "introducing a new state" part. If you give a state other than the listed, then it won't cause any problems. Please can you explain it more ?

Let's say 0 is "todo" and 1 is "done" (I don't know the actual meanings), and you want to introduce an "in progress" state. You have two possibilities:

However, this part is not really an issue as it's really not likely to happen. I just think using text-constant would have been more clear, but if that's causing issues with the parser, don't worry :-)

Kernald commented 10 years ago

Maybe this issue should be closed?