Ability to name Territories

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.

James Chevalier 5:04 pm

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 :smiley:

:tropical_drink:

2 Likes

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.

1 Like

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.

1 Like

That’s an interesting feature, thank you. How did you set your Home location? For some reason my Home is in Western Australia :kangaroo:

Edit: I see it also defaults to tiny “sort by tiny descending arrow”, so I’m now closer when I fixed that, haha. But still question remains.

Thanks. I either missed that or forgot about it.

Home is Settings - Default city

1 Like

I like this idea

If two territories with names get merged, maybe the largest one wins for the name?
I’m not too fussed about links to the territories myself

1 Like

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 :rofl:).

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.

Does the index not change when territories get merged? I’ve found that stored URLs sometimes take me to a new territory after a merge.

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).