Name of the territory does not stick

CityStrides Profile Link

Message

Option to name Territories is wonderful! I went and named all of the 10 pages of the territories but noticed that several of the names didn’t stick. After some time after naming I noticed that the name had reverted back to “Territory 47” or other number. One territory I named at least three times. But most names have stuck at least for now. I don’t see any pattern why some names change back

For example this one I named “Luite asum” but it has gone back to Territory 47: https://citystrides.com/territories/61677-47
And this one I named “Hiiumaa Vilivalla” but it has gone back to Territory 22: https://citystrides.com/territories/61677-22

I had a couple of these as well, where my naming failed to update also. I don’t know if they “reverted”, or didn’t change in the first place. This one for example: Territory of Mitch LeBlanc - CityStrides

and this one ( Territory of Mitch LeBlanc - CityStrides ) you can see my browser is auto-completing it also, implying I did name it previously.

:thinking: Territories are only rebuilt after saving an activity & I just added this feature yesterday … I’d expect it would be more likely that the save just didn’t happen than that it saved properly and then reset :thinking:

Let me see what I can figure out…

Just named my page 14 of Territories, confirmed they all saved with green pop-up, and refreshed a couple times, I’ll let you know if I see any reset.

I just manually rebuilt your Territories … how’s it looking?

Addition: I’m also interested in the timing of your edits… Did you recently sync an activity while making those name changes?
I noticed your Territory rebuild took a little while, so I’m wondering if they were being rebuilt while you were renaming them. :thinking:

While naming the territories I noticed that some territories were only one very-very short activity in the middle of a larger territory so I deleted a few activities while naming territories. Meaning I selected a activity from a territories map, went to a activity page and deleted it. Maybe deleting activity affected saving some previous territory names?

Yeah, deleting activities triggers a Territory rebuild.
So hopefully that’s it - two changes were happening at the same time, and the others ‘won’.

I think I can add some code to check for the rebuild & block / alert edits while that’s running.

No activity syncs occurred, and I don’t recall deleting any activities (maybe one yesterday?)

This territory name seems to have reset itself after I posted above, so you can check the timestamp of the rebuild perhaps and see if that’s the issue?

:thinking: I’m seeing its name displayed as “Sherwood, Calgary” right now. Is it supposed to be something different?

I just fixed it again, before I posted that, sorry. It was reset, I swear!

The timing was close enough that I can’t be sure.
I’m about to release an update that will display a big warning on the Edit page if the Territories are being rebuilt. Maybe that’ll be a :light_bulb:

If it does happen again, please share its link and avoid updating it - I’ll want to look at all the available timestamps.

Others that reset that I haven’t fixed:

  • https://citystrides.com/territories/1909-88
  • https://citystrides.com/territories/1909-149
  • https://citystrides.com/territories/1909-146

OK, great, they all share the exact same creation/update timestamp - so it was the rebuilt that stomped the edits out. So, hopefully the warning message will help avoid that.

I had several territories (named early on) reset themselves again. All said updated on Oct 12, so I renamed them all at once and named 6 new ones this morning (half of page 15). I’ll reply back if any of these reset. Some of these ones I’ve named a couple times now, I’m noticing.

Next time, please do not rename them again. I can’t review anything if you update them again. :slightly_frowning_face:

I’d also be interested in whether there were any changes to the Territories (anything joined up by a new activity).

please do not rename them again

Copy that. I did run last night, it did merge with an existing territory, but none of the ones that were de-named were involved.

Yeah, the timestamps that are present suggest everything happened safely (no edits mid-creation).

Are any of the de-named Territories overlapping others?
The code carries along names based on overlaps, so I wonder if that’s not behaving as expected.

And they were just de-named, right? The name wasn’t moved to another Territory…

Looks like several of my territories have again reverted back to the original name with a number also. After I named them again I made sure that I didn’t delete any activities or didn’t add any activities during the next 12 hours at least. At least I think I didn’t.
Some of the examples are

https://citystrides.com/territories/61677-64

https://citystrides.com/territories/61677-55

https://citystrides.com/territories/61677-79

Thanks, both of you, for sharing examples … I was able to see that these are nested Territories & found that my code wasn’t handling those situations well. I’ll be able to get a release out sometime today that will fix this up.