SortFilterModel can't filter on subproperty like content.title

Bug #1488821 reported by Didier Roche-Tolomelli
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
ubuntu-ui-toolkit (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

SortFilterModel doesn't enable to filter on subproperty.

Here is a simple non working example:

SortFilterModel {
    id: currentmodel
    model: billsResults
    filter.property: 'contents.title'
    filter.pattern: /BAR/
}

Knowing that most of the u1db models are exporting into a "contents" property handling the rest, it seems that to chain it to a SortFilterModel, it would be interesting to have it able to filter through subproperties

ProblemType: Bug
DistroRelease: Ubuntu 15.10
Package: qtdeclarative5-ubuntu-ui-toolkit-plugin 1.3.1603+15.10.20150812-0ubuntu1
ProcVersionSignature: Ubuntu 4.1.0-3.3-generic 4.1.3
Uname: Linux 4.1.0-3-generic x86_64
ApportVersion: 2.18-0ubuntu7
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Aug 26 10:10:49 2015
InstallationDate: Installed on 2012-05-28 (1184 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
SourcePackage: ubuntu-ui-toolkit
UpgradeStatus: Upgraded to wily on 2014-10-31 (298 days ago)

Tags: devexp
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :
Revision history for this message
Cris Dywan (kalikiana) wrote :

I don't think this conceptually works since even though these are called properties, they are technically role names and can't be nested - what you perceive as sub properties in this context are Variant children.

That said, bug 1266529 addresses this in U1Db.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Invalid
Revision history for this message
Didier Roche-Tolomelli (didrocks) wrote :

I don't think the bug as being invalid (reopening it).
From a developer experience point of view, how would you so direct such children so that they can be filtered in a SortFilterModel, especially when coming from u1db or other where they are are Variant children?

I think there is something to do. The invalid state is bogus, it can be "won't fix", but there is a clearly something we can't filter on. Maybe the least would be a note in the documentation and examples on how to do this directly in, for instance, u1db (once the bug is fixed there).

Changed in ubuntu-ui-toolkit (Ubuntu):
status: Invalid → New
Revision history for this message
Cris Dywan (kalikiana) wrote :

I agree in hindsight this bug can at the least be resolved with better documentation.

Changed in ubuntu-ui-toolkit (Ubuntu):
status: New → Confirmed
importance: Undecided → Medium
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.