Since unflagged content comes in with a flag weight of 0, it makes the sort "ascending" less than optimal since uflagged content comes up first. It would be great to have another views sort option, flagged / not-flagged. That way, you could first sort on flagged items and then by ascending.

Files: 
CommentFileSizeAuthor
#5 1355864.5.FlagViewsSort7x2x.patch2.7 KBsocketwench
PASSED: [[SimpleTest]]: [MySQL] 61 pass(es).
[ View ]
#3 1355864.2.flag_.views-sort-by-flagged.patch2.74 KBjoachim
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1355864.2.flag_.views-sort-by-flagged.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#2 1355864.flag_.views-sort-by-flagged.patch2.83 KBjoachim
PASSED: [[SimpleTest]]: [MySQL] 61 pass(es).
[ View ]

Comments

Version:7.x-2.x-dev» 7.x-3.x-dev

Sorting by the flagged time works, though obviously if you wanted a secondary sort on say the title you'd run into problems.

This would need a custom handler that casts the flagged time to a boolean that can then be sorted on.

Status:Active» Needs review
StatusFileSize
new2.83 KB
PASSED: [[SimpleTest]]: [MySQL] 61 pass(es).
[ View ]

Status:Needs review» Fixed
StatusFileSize
new2.74 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 1355864.2.flag_.views-sort-by-flagged.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Issue #1355864 by joachim: Added a Views sort handler for flagged / unflagged.

Committed this patch with the handler tweaked slightly.

Version:7.x-3.x-dev» 7.x-2.x-dev
Status:Fixed» Patch (to be ported)
Issue tags:+Novice

Could be backported fairly easily:

- for 7--2, change the table names
- for 6--2, check handler methods work with Views 2.

Status:Patch (to be ported)» Needs review
StatusFileSize
new2.7 KB
PASSED: [[SimpleTest]]: [MySQL] 61 pass(es).
[ View ]

7.x-2.x backpoint.

Status:Needs review» Fixed

Thanks for the backport. Committed.

Automatically closed -- issue fixed for 2 weeks with no activity.