u3a-siteworks-development / u3a-siteworks-core

The core plugins
GNU General Public License v2.0
1 stars 0 forks source link

OP1058 Add support for order By District in group list display #97

Open nicktrosnant opened 2 months ago

nicktrosnant commented 2 months ago

Where the support for the District field is enabled in the u3a Settings (Venues tab) provide additional button on the front end to list groups sorted by District Screenshot from 2024-07-05 17-22-27

edwery commented 1 month ago

This can be done - but should it? The district field is a freeform text field in the venue - so to get groups list ordered by district would be similar to the way in which the list is ordered by venue. We would first need to retrieve all the possible districts by retrieving every venue, and building a map from district to an array of venues in that district. Next we would build a metaquery like the current venues one, but using 'in' and providing a list of venue ids from each map entry. This seems complex for an optional function. I will continue to develop it, but feel free to stop me.

nicktrosnant commented 1 month ago

Agreed that the fact that "District" is a free text field rather than a taxonomy will make this subject to the accuracy or otherwise of data entry by the WM. We will be relying on them to be 100% consistent.

Also agree that as District is an attribute of a Venue it does mean a fairly convoluted set of queries to produce the listing.

If you are enjoying the challenge then by all means carry on, but if you think it doesn't justify the work involved then we can go back to the change board and suggest this is a "will not fix". This would be a "Feature" so would not be deployed to users until the next Feature update - November-ish.