Achievement API: is_completed is not always correct

I’ve noticed while consuming the achievement API that is_completed is sometimes set to false even if the criteria was met by a specific character.

It appears to happen when a character subsequently completes an achievement that has already been completed by another character on the same account.

As an example, let’s take achievement ID 10458 (“Ready for Raiding V”) which is not an account-wide achievement. For the character(s) in question, the ‘Display only character achievements to others’ option is disabled.

Character A criteria:
id:46593,is_completed:true,completed_timestamp:1475812212000
Character B criteria:
id:46593,is_completed:false,completed_timestamp:1593320645000

As you can see the timestamps are pretty different, but character B’s is_completed flag is false. The game UI shows the achievement as completed for character B (as opposed to saying it was only earned by character A).

Currently the only way to work around this is by comparing timestamps. If they are close enough to each other (i.e. within a few minutes), then one can assume it was earned by the character whose is_completed is set to true, and that the achievement was not yet earned by the other.

If the timestamps differ by a larger margin, we may ignore the flag and trust the completed_timestamp over is_completed.

I’m not sure if this is intended, but I posit that character B’s is_completed should be set to true.