Page MenuHomePhabricator

List of Integer and List of Boolean only storing one value
Closed, ResolvedPublic

Description

Issue

  • Somewhere between v2.3.1 (3aab640) and v2.4 (1705f03), a field declared as List (;) of Integer will no longer store more than 1 Integer.
  • In v2.3.1 or earlier, a field declared as List (;) of Boolean will only store a single value (which appears to be whether the list is not 0).

List of Integer

Inputv2.3.1v2.4
10[10][10]
10;20;30[10,20,30][10]

List of Boolean

Inputv2.3.1v2.4
0[0][0]
1[1][1]
0;0[1][1]
0;1[1][1]
1;0[1][1]
1;1[1][1]

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJan 30 2020, 4:41 AM
BryghtShadow updated the task description. (Show Details)Jan 30 2020, 4:42 AM

I don't think a field holding a list of Boolean values makes sense; maybe Cargo should simply prohibit users from declaring this.

The problem with the list of integers does sound like a real bug, though.

Change 619492 had a related patch set uploaded (by Priyanshu varshney; owner: priyanshu-3390):
[mediawiki/extensions/Cargo@master] Fix for List of Integer storing only one value

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

Change 619492 merged by jenkins-bot:
[mediawiki/extensions/Cargo@master] Fix for List of Integer storing only one value

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

Yaron_Koren closed this task as Resolved.Aug 14 2020, 8:01 PM
Yaron_Koren claimed this task.

I believe that, between this patch and the other one (https://gerrit.wikimedia.org/r/c/mediawiki/extensions/Cargo/+/619846), this bug is now fully fixed.