kmpoppe / noteSolver

JOSM Plugin: Automatically resolve notes after uploading a changeset.
https://wiki.openstreetmap.org/wiki/User:Kmpoppe/Plugins#noteSolver
GNU General Public License v3.0
12 stars 3 forks source link

Note gets uploaded early #18

Closed daganzdaanda closed 1 year ago

daganzdaanda commented 2 years ago

I set this note https://www.openstreetmap.org/note/3019711 to be remembered after I added a comment to it. Then I fixed the error there and made some minor edits in the area. I moved this https://www.openstreetmap.org/node/245779053 a bit and pressed "M" to merge it with the next node. Just after that, the "uploading changed notes" popup showed up for a short time. I checked and saw that indeed the note was uploaded (with comment) and closed by noteSolver. The autosolve note mentions https://www.openstreetmap.org/changeset/47061934 which happens to be the changeset that last touched that node. I still haven't uploaded my changeset... but here are the gists for the JOSM --debug output and the JOSM status info.

This seems to be the same thing that you noticed in #11

daganzdaanda commented 2 years ago

That's my changeset now: https://www.openstreetmap.org/changeset/119404789 The changeset comment was not pre-filled.

daganzdaanda commented 2 years ago

image The keyboard shortcut M is for merge, but the NoteSolver entry seems a little odd.

daganzdaanda commented 2 years ago

I tried to recreate with the master-dev JOSM install and couldn't. https://master.apis.dev.openstreetmap.org/changeset/234135#map=16/80.0685/12.5076&layers=ND https://master.apis.dev.openstreetmap.org/note/30261

I will install all the plugins from my normal install one by one to see if I can make this issue show up again.

kmpoppe commented 2 years ago

Ah.

So this happens because of the way I'm currently figuring out if the upload worked. I'm looking for an Event called CHANGESET_ID_CHANGED which fires when you upload the OsmData you changed and the objects in the changeset get assigned the new changeset ID. What you're doing is merging two Objects, which in turn, I would guess, changes the Changeset Id of one or both Objects - that then uploads the notes.

Will need to find a way to hook into the onPostUploadToServer of the OsmDataLayer, but that's really not that easy.

Found a way to look out for the Property that determines if a layer needs an upload. That will change the way of processing the note Uploads. Maybe this also clears #16, let's see.

kmpoppe commented 1 year ago

So ... while #16 hasn't had any improvements ... is THIS still happening?

daganzdaanda commented 1 year ago

Hm, haven't worked a lot with notes for a while, but can't say I remember this showing up again. I probably would have posted it here 😉
So I guess it's likely this fix has worked... you could close the issue, and if I notice something again, I'll let you know anyhow.

kmpoppe commented 1 year ago

Fixed - not sure by which change.

daganzdaanda commented 1 year ago

Can you reopen this? Unfortunately, it looks like this has not been solved. See https://github.com/kmpoppe/noteSolver/issues/16#issuecomment-1520717716 and https://github.com/kmpoppe/noteSolver/issues/16#issuecomment-1669578333 I described what I did to get the sudden late upload and it was the same sequence twice.