Page MenuHomePhabricator

No unit is not consistently represented in JSON
Open, NormalPublic


As I reported in, no unit is not consistently represented and no explanation was given as to why the JSON format should have multiple ways to represent the same thing, so I can only assume it's a bug.

If you leave the field blank, it will store the unit as "1". If you enter Q199 as the unit, it will store the unit as "". It will display both as not having a unit even though the underlying data is different. Storing the same thing in two ways for the same format seems like a bad idea to me because everyone using the JSON data will need to check for two different values to find out whether something has no unit or not. I haven't tested it, but I imagine it could also create "duplicate" statements when merging since the units are technically different, even though people using the website have no way of knowing that the statements are different.

I would expect that either leaving the field blank and entering Q199 are both considered ways to say that a value has no unit and it saves it using whichever value it prefers (in the same way that "1" and "01" and "000001" for a quantity are all normalised to "1"), or I would expect that Q199 is not considered a way to say that a value has no unit and the website stops displaying it as if it is.

You can see an example on (last two statements).

Event Timeline

Nikki created this task.May 18 2016, 7:19 AM
Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptMay 18 2016, 7:19 AM
hoo added a subscriber: hoo.May 19 2016, 9:23 AM
Lydia_Pintscher triaged this task as Normal priority.May 19 2016, 12:09 PM
Lydia_Pintscher added subscribers: daniel, aude.
Jc3s5h added a subscriber: Jc3s5h.Aug 27 2016, 11:04 AM