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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joachim’s picture

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.

joachim’s picture

Status: Active » Needs review
FileSize
2.83 KB
joachim’s picture

Status: Needs review » Fixed
FileSize
2.74 KB

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

Committed this patch with the handler tweaked slightly.

joachim’s picture

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.

socketwench’s picture

Status: Patch (to be ported) » Needs review
FileSize
2.7 KB

7.x-2.x backpoint.

joachim’s picture

Status: Needs review » Fixed

Thanks for the backport. Committed.

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