Ticket #195 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

Association listings should be alphabetically sorted (e.g. a group's packages)

Reported by: rgrp Owned by: rgrp
Priority: critical Milestone: v0.11
Component: ckan Keywords:
Cc: Repository:
Theme:

Description

Where an item has an association listing (e.g. package's tags or group's packages) these should be sorted in a sensible way. For present choose to sort alphabetically by name.

Cost: 2h

Change History

comment:1 Changed 4 years ago by rgrp

  • Status changed from new to closed
  • Resolution set to fixed

Easy for groups because simple secondary=m2m table setup in sqlalchemy (done in cset:9e17314583ce).

For packages+tags was hard because PackageTag? is versioned and therefore only get the package_tags relation to work with in mappers. Tried various methods but gave up (see cset:ea4a790e9db9 for details).

My conclusion was that if you want the fields ordered let's just do it by hand with a dedicated attribute or method and added packages_ordered and tags_ordered attributes to Tag and Package respectively (cset:3d3c1025a311).

Note: See TracTickets for help on using tickets.