I have an idea for territories: The ability to name them. It just so happens that my current city is my 7th (shame) top territory, and I have others in progress as well, so it would be cool to give them all decent names.
I’ll need to look into whether it’s possible. I completely rebuild them for each activity - because a new activity might join up two Territories. I know that I figured something out to keep their links consistent enough (joining multiple Territories will result in them being “merged” into the largest of them, with the smaller links getting reused by whatever smaller Territories you have) … that same approach could work for a name, but I don’t recall offhand and I’m not putting down this Aperol spritz to find out right now
I’d at least like them identified in some way, so I know which country they are in. The only way to identify them is to show them, and when I have territories on opposite sides of the world, the map jumps back and forth. Maybe a label of a city contained within.
I use the “from home” option to list my territories. That way they are in order from home city without jumping all over the country/world. It would be good if I could make that my default list.
I’m thinking you could use the lowest activity ID in a territory as the territory ID. This way there is something consistent to link the name too. The assumption is that new activities can never have a lower ID.
A result of this would be that if 2 territories merge, whichever has the oldest activity ‘wins’ and keeps the name.
I’m already auto-generating the Territory IDs as user_id-index. I could display that, but I found the sizes to be more descriptive than a generic “1-1”.
The first step of rebuilding the Territories is to delete them all, so I’ll have to carry along the name field somehow. I don’t know how to do that offhand (although while writing this I’ve come up with an idea), and I haven’t had a chance to look into it & try stuff (or use the wrong-answers-only machine to find out all the ways not to do it in order to arrive at how it should be done ).
Your sentiment of merging territories and ‘winning’ names lines up with how I’d expect it to work, and how the current ID generation code works.
It’s ordered by size, so the bigger Territories always have the lower IDs. If Territory 1 and 2 merge, they result in Territory 1 (and if there were 3, 4, 5, etc then those would move up to 2, 3, 4, etc).