Empty list values and simple (non-mergeable) lists are not possible in desktopcouch
Bug #510232 reported by
Eric Casteleijn
This bug affects 3 people
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
desktopcouch |
Fix Released
|
High
|
Vincenzo Di Somma | ||
desktopcouch (Ubuntu) |
Fix Released
|
High
|
Vincenzo Di Somma |
Bug Description
Currently, assigning any list or tuple value to a field in a desktopcouch.
- there is no way to create empty list values, which some applications may want to rather than remove the key.
- for lists of simple values (e.g. the "tags" in tomboy) there is no problem in determining identity of the items in the list, and so the mergeable lists are overkill.
I don't know how to best solve this, which is why I will mark this bug incomplete and assign it to Stuart who will likely come up with some really smart solution or say it doesn't need one.
Related branches
lp:~vds/desktopcouch/mergeable_list_not_default_anymore
- John Lenton (community): Approve
- Eric Casteleijn (community): Approve
-
Diff: 236 lines (+44/-32)3 files modifieddesktopcouch/records/field_registry.py (+3/-1)
desktopcouch/records/record.py (+11/-12)
desktopcouch/records/tests/test_record.py (+30/-19)
Changed in desktopcouch: | |
status: | New → Incomplete |
assignee: | nobody → Stuart Langridge (sil) |
importance: | Undecided → Medium |
Changed in desktopcouch: | |
assignee: | Stuart Langridge (sil) → Ubuntu One Desktop+ team (ubuntuone-desktop+) |
status: | Incomplete → Triaged |
Changed in desktopcouch: | |
milestone: | none → 1.0 |
Changed in desktopcouch: | |
status: | Triaged → In Progress |
Changed in desktopcouch: | |
assignee: | Ubuntu One Desktop+ team (ubuntuone-desktop+) → Vincenzo Di Somma (vds) |
importance: | Medium → High |
Changed in desktopcouch: | |
status: | In Progress → Fix Committed |
Changed in desktopcouch (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Vincenzo Di Somma (vds) |
milestone: | none → natty-alpha-1 |
Changed in desktopcouch (Ubuntu): | |
milestone: | natty-alpha-1 → natty-alpha-2 |
Changed in desktopcouch: | |
status: | Fix Committed → Fix Released |
Changed in desktopcouch (Ubuntu): | |
status: | In Progress → Fix Released |
To post a comment you must log in.
After discussing the issue with Manuel de la Peña, I think the best solution would be to allow regular list values in desktopcouch records, and treat any list value in json as a regular list by default, then providing API to explicitly assign a mergeable list type value to a key in desktopcouch.
For this to work, we should put an "_is_mergeable_ list": true property on each mergeable list json representation, rather than relying on the form of the keys to resemble uuids. (we should keep the checks in place that they are though.)
This automatically lifts the restrictions that you can't have empty mergeable list values as well, since the presence of the key would tell you that it is of this type.
The key is ugly, but unlikely to clash in practice, and what we have in place isn't any better.