Page MenuHomePhabricator

Boolean Type: Adding aliases true/false
Closed, ResolvedPublicFeature

Description

Feature summary (what you would like to be able to do and where):
Adding true/false as aliases for boolean type and/or a filter (e.g. throw an error message if someone tries to add a non defined value).

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
I'm used to the standard true/false aliases for boolean types and experienced that cargo only supports 1/0 or aliases Yes/No (and NULL).

I know this is a rtfm issue, but this could lead to major issues when users like me just see a boolean type and expect the commonly known aliases true/false to work, because cargo interprets both (true and false), and actually everything non defined, as 1(Yes).
I was lucky to catch this early on, otherwise i would have to update and check a couple of thousand entries.

Benefits (why should this be implemented?):
Aliases true/false are commonly used in many programming languages or databases. Adding them and/or maybe a filter would prevent user errors.

Event Timeline

Change #1196129 had a related patch set uploaded (by Yaron Koren; author: Yaron Koren):

[mediawiki/extensions/Cargo@master] Add handling for "false" value for boolean fields

https://gerrit.wikimedia.org/r/1196129

Change #1196129 merged by jenkins-bot:

[mediawiki/extensions/Cargo@master] Add handling for "false" value for boolean fields

https://gerrit.wikimedia.org/r/1196129

Yaron_Koren claimed this task.
Yaron_Koren subscribed.

@Gorasuhl - thanks for pointing this out; I think this is fixed now.