Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moving hashtags to dedicated changeset tag #48

Open
bhousel opened this issue Aug 10, 2017 · 5 comments
Open

Moving hashtags to dedicated changeset tag #48

bhousel opened this issue Aug 10, 2017 · 5 comments
Milestone

Comments

@bhousel
Copy link

bhousel commented Aug 10, 2017

related: openstreetmap/iD#2834

Because some OSM users don't like the use of hashtags in comments, I'm planning to add another field to iD just for the hashtags. This new field will appear below the comment box, and (like the comment) will be settable via the url api. Hashtags will be saved with a new changeset tag like hashtag=#thing1;#thing2;#thing3

I think there might be a service to fetch "registered" mapathon hashtags? If so, please let me know and I'd be happy to connect iD to this service to allow users to either pick hashtags from a list, or type their own.

For a while, I'll continue to support hashtags in both the comments and this new field, so there will be time to switch over any tools like osm-stats or osm task manager. There's no rush!

@dalekunce dalekunce added this to the .2 milestone Aug 11, 2017
@dalekunce
Copy link
Member

@bhousel thanks for the heads up. The hashtags are pre-populated in iD/JOSM from the Tasking Manager 95% of the time. This would require an update to the Tasking Manager and OSM Stats.

One thing to keep in mind is that moving the hashtags to a special tag should be done in conjunction with the other editors, especially JOSM. This will prevent us from having to search in multiple places for them on the edits.

I'm ok with this change by it will require some work on our end that we didn't have in the pipeline and don't have funding for either on the tasking manager or osm-stats.

cc @kamicut @mojodna @bgirardot @smit1678

@bhousel
Copy link
Author

bhousel commented Aug 19, 2017

Just wanted to followup on this - I added a hashtags field to iD.

Any hashtags detected in the comment will be automatically extracted into this new field - so there is no rush to switch over the task manager code to use it. But it can eventually allow apps like osm-stats more flexibility to perform changeset analysis, and it frees up the comment field for users to add more meaningful comments.

related issues:
hotosm/osm-tasking-manager2#703
openstreetmap/iD#2834
openstreetmap/iD#4223 (comment)
#48

hashtags

@mojodna
Copy link
Member

mojodna commented Dec 12, 2018

osm-stats-workers (and OSMesa, for data backfills) still use the comment field for a few reasons:

  1. this is iD-only and we need to track hashtags from JOSM (etc.) edits
  2. we can control the regular expression to identify / extract tags (we've made multiple iterations to it and likely no longer match iD's; the current versions are #([^\u2000-\u206F\u2E00-\u2E7F\s\\'!"#$%()*,.\/;<=>?@\[\]^{|}~]+) (OSMesa) and (#[^\u2000-\u206F\u2E00-\u2E7F\s\\'!"#$%()*,./:;<=>?@[\]^{|}~]+)` (osm-stats-workers))
  3. data backfills run against changeset data that predates the addition of the hashtags field (or pre-dates adjustment of the regular expression to match our expectations)

@mojodna mojodna closed this as completed Dec 12, 2018
@mojodna mojodna reopened this Dec 12, 2018
@mojodna
Copy link
Member

mojodna commented Dec 12, 2018

@bhousel if you do decide to exclude hashtags from the comment field, please update this issue; we'll need to update our end to read both changesets and comment for hashtags (for the ^^ reasons)

@1ec5
Copy link

1ec5 commented Nov 10, 2023

OSM Stats is possibly the root cause of the proliferation of hashtags in comments that causes mappers to get yelled at all the time. There’s even a proposal to automatically revert people’s changes if they only provide hashtags without anything more human-readable. OSM Stats may not be responsible for the lack of these human-readable explanations, but editors would automatically nudge mappers to provide them if the hashtags aren’t there.

It looks like this task entails simplifying the following code to read the hashtag tag instead of the comment tag and parse it as a comma-delimited list instead of trying to sniff out #hashtag syntax in freeform text:

https://github.com/AmericanRedCross/osm-stats-workers/blob/de6219edaf5b0ba80b0b71588ff4aace23d92364/src/stats.js#L213-L217

Since the osm-stats system is already storing the hashtags in a more structured field, there’s probably no need to consider backwards compatibility: you can just cut over, and the stats will continue to reflect older changesets from before the cutover.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants