worldcubeassociation.org icon indicating copy to clipboard operation
worldcubeassociation.org copied to clipboard

Ability to cross list Delegates for two or more regions

Open JonEsparaz opened this issue 1 year ago • 4 comments

Is your feature request related to a problem? Please describe. I'll provide a specific example: my co-Delegate, Abdullah Gulab, is mainly based in Ontario, Canada, but regularly runs competitions in Pakistan (at least pre-pandemic and hopefully again soon), thus it is important that he is recognized by both the Canadian and Pakistani cubing communities. Currently, he is only (and can only) be listed under Asia West & South > Pakistan.

Describe the solution you'd like Delegates who cover two regions and/or live in two or more locations during the year (e.g., Delegates who are in university live at school for 6-8 months and somewhere else for 6-8 months) should be cross listed.

This means we require a many-to-many relationship between Delegates and Senior Delegates (a Delegate can have multiple Senior Delegates and Senior Delegates obviously have many Delegates under them). We would probably want a table that defines this hierarchical link with at least three fields: delegate_id, senior_delegate_id, and region.

Describe alternatives you've considered N/A

Additional context I could see some overlap with https://github.com/thewca/worldcubeassociation.org/issues/4851 since we'd be redefining the structure of how Delegates are stored in the DB anyways, so we might want to same idea as above, but more generalized to be: delegate_id, supervising_delegate_id, and region, which would allow Delegate -> Regional Delegate, Regional Delegate -> Senior Delegate linkings.

JonEsparaz avatar May 01 '23 20:05 JonEsparaz

There is a rework of the Delegates table being planned over at https://github.com/thewca/worldcubeassociation.org/pull/5417

With the proposed table structure of that PR, listing a Delegate multiple times would be as simple as inserting a second (or third, fourth, etc.) table row referencing the same user account ID

gregorbg avatar May 08 '23 07:05 gregorbg

The rework in Gregor's comment is now being worked on at #8122.

dunkOnIT avatar Sep 10 '23 13:09 dunkOnIT

@danieljames-dj just confirming that your current rework takes this requirement into account? It looks like a delegate could have multiple regions as specified under the Type Enum, but just want to confirm

dunkOnIT avatar Sep 10 '23 13:09 dunkOnIT

Yes this is already taken into account.

danieljames-dj avatar Sep 11 '23 01:09 danieljames-dj