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

iD integration: Use "hashtags" to prefill hashtags and "comment" for a more meaningfull commit message #1482

Closed
tordans opened this issue Apr 12, 2019 · 2 comments

Comments

@tordans
Copy link

tordans commented Apr 12, 2019

The current behavior of tasking manager is to prefill the comments section / commit message with hashtags. Those are used by iD to create and prefill the hashtags attributes on the changeset.

This should be change:

  • the recommended hashtags should only prefill the hashtags-section in iD
  • the comment field should be empty by default and as such suggest a proper message

Alternative solution:
Since the comment field is a required field, I assume it to be an issue to have it empty, since new tasking manager mapper don't know what to do with it.
However, putting the hashtags in there is still not a good solution IMO, it's just clutter.
Instead, maybe add a default text like

Mapping for section https://tasks.hotosm.org/project/5876?task=315

This way there is a link back to the original task where one can see the discussion. And also a more understandable message that does not just show hashtags.

Required change:

  • The iD API docs show, that there is the param hashtags that can/should be used https://github.com/openstreetmap/iD/blob/master/API.md.
  • This is probably the place for the tasking manager
    /**
    * Launch the iD editor
    * @param centroid
    * @param changesetComment
    * @param imageryUrl
    * @param projectId
    * @param taskId
    */
    function launchIdEditor(centroid, changesetComment, imageryUrl, projectId, taskId){
    var base = 'http://www.openstreetmap.org/edit?editor=id&';
    var zoom = mapService.getOSMMap().getView().getZoom();
    var url = base + '#map=' +
    [zoom, centroid[1], centroid[0]].join('/');
    // Add changeset comment
    var changeset = ''; // default to empty string
    if (changesetComment && changesetComment !== ''){
    changeset = changesetComment;
    }
    url += '&comment=' + encodeURIComponent(changeset);

For reference, this is what the URLs look like ATM:
Source

http://www.openstreetmap.org/edit?editor=id&#map=16/-19.97851145722339/33.2391357362335&comment=#hotosm-project-5876 #CycloneIdai #MissingMaps #Mozambique Expanding Road & Waterway Networks&gpx=https://tasks.hotosm.org/api/v1/project/5876/tasks_as_gpx?tasks=87&as_file=false&filename=task.gpx

(Raw format http://www.openstreetmap.org/edit?editor=id&#map=16/-19.97851145722339/33.2391357362335&comment=%23hotosm-project-5876%20%23CycloneIdai%20%23MissingMaps%20%23Mozambique%20Expanding%20Road%20%26%20Waterway%20Networks&gpx=https%3A%2F%2Ftasks.hotosm.org%2Fapi%2Fv1%2Fproject%2F5876%2Ftasks_as_gpx%3Ftasks%3D87%26as_file%3Dfalse%26filename%3Dtask.gpx)

This is also a ping to my list at openstreetmap/iD#5856 (comment)
This is a follow up to openstreetmap/iD#6169 (comment)

@pantierra
Copy link
Contributor

Thanks for the input, @tordans. This is related to #1358.

@pantierra pantierra added Status: Needs implementation type: enhancement Improving an existing functionality labels May 13, 2019
@pantierra
Copy link
Contributor

pantierra commented Mar 18, 2020

Looking into that, I saw on the osm wiki this not being widely agreed on, whether to use hashtags in comments or in the separate field. From a Tasking Manager perspective we add the hashtagged terms into the comment, because it seems most osm tools right now support only to search changesets by comment, not by any tag. Once there is a critical mass of data inspection tools supporting it, it makes a lot of sense to switch or post to both.

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