Notes (aka OpenStreetBugs) #209

merged 252 commits into from Apr 23, 2013

6 participants

OpenStreetMap on GitHub member

I think I have now resolved the outstanding issues with the notes branch.

As agreed previously at EWG it now shows a warning when viewing a note with anonymous comments that such information should be independently verified.

It's running at so please try it out as much as possible and report any problems before it gets merged. You can comment here, or open issues against my repo at

apmon and others added some commits Mar 1, 2010
@apmon apmon Split comment field out of map bugs table
Rather than have all comments in a single text field, have each comment in its own entry
and only combine them back on output
@apmon apmon Allow for different formats to the getBugs call
This is a rudimentary initial version of a GPX and a rss
format for looking at bugs in an area.
@apmon apmon Fixed small bug where clicking on the "Report a Problem" link would d…
…irectly create a bug-report
@apmon apmon support json format in getBugs, add a limit and name parameter 0989506
@apmon apmon Change comment type from varchar(255) to text
Some bug comments in the current OSB have more than 255 characters,
so the format needs to be extended to accomodate
@apmon apmon Escape javascript in output ef9f53f
@apmon apmon Record time of closure of a bug. c22958f
@apmon apmon Add a browse page for bugs 01aa270
@apmon apmon try and make the OpenStreetBugs API a bit more consistent with the re…
…st of the API
@apmon apmon back out the registration of the gpx mime type, as it didn't seem work 3344e60
@apmon apmon Fixup some of the rss output and geocode bugs using nominatim 81113f3
@apmon apmon List bugs submited or commented on by user c9a3f91
@apmon apmon Fixup some error handling in map bugs 35bbf82
@apmon apmon Add some rudimentary initial tests for the map bugs api 6d668f6
@apmon apmon Merge -r 20198:20540 from trunc into openstreetbugs branch 03f733c
@apmon apmon Don't limit get map_bugs to a small Area, by disabling the quadtile i…
…ndex for those searches

The volumn of bugs seem small enough to get away with normal or GiST indexes (not included yet)

Also includes some other fixes
@apmon apmon Convert openstreetbugs javascript to new style api aa61dfb
@apmon apmon minor improvement to the map_bugs tests 4aec8dc
@apmon apmon Reuse the map_bug_comment table as a more general history table of ma…
…p_bugs including close and reopen events

This helps the rss feed to work on a per event basis rather than on a per bug basis
@apmon apmon Fixed some minor bugs and add tests to spot them abf3358
@tomhughes tomhughes Merge branch 'master' into openstreetbugs acbc99a
@apmon apmon Merge branch 'master' of git:// into opens…
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 0caaf54
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 959442d
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 568ce75
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 273706a
@tomhughes tomhughes Merge branch 'master' into openstreetbugs b5d0de8
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 4b17b92
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
@tomhughes tomhughes Merge branch 'master' into openstreetbugs b9c9d6c
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 02ad2f5
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 52395b3
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
@apmon apmon Merge branch 'master' into openstreetbugs2 001ff57
@apmon apmon Minor fix to updated OpenLayers 91b9b65
@apmon apmon users.visible has changed to users.status 3d3f398
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 8980da4
@tomhughes tomhughes Merge remote-tracking branch 'apmon/openstreetbugs2' into openstreetbugs e7ed263
@apmon apmon Use local files rather than remote ones for osb images d7afad9
@apmon apmon Change bug comment to a textarea to make it easier to input longer co…
@apmon apmon Grey out username text field for bugs when logged in. 4a23ee8
@apmon apmon Link the openstreetbugs browse pages 5e335b6
@apmon apmon Remove references to old server location f414d3c
@apmon apmon Forgott to copy over an image from 890fbca
@apmon apmon Deactivate OSB controller immediately after clicking a new bug 8cb83ad
@apmon apmon Update OSB internationalisation to match the rails_port way ad75dd1
@apmon apmon Add a note that the OSB client side js library has been adapted from …
…the original
@apmon apmon Send notification emails when someone comments on a map bug report b3d62bb
@tomhughes tomhughes Merge branch 'master' into openstreetbugs af68e07
@tomhughes tomhughes Merge remote-tracking branch 'apmon/openstreetbugs2' into openstreetbugs 0a3087c
@apmon apmon Only show "Report a problem" link at zoom level 12 and higher c322b0c
@apmon apmon Make the bug popups look a little nicer 1ac7f20
@apmon apmon Increase font-size of the "report a problem" link 14ed7ad
@apmon apmon Don't enable OSB layer by default 3b3896d
@apmon apmon Merge branch 'openstreetbugs' of git:// in…
…to openstreetbugs2
@apmon apmon Merge branch 'master' of git:// into opens…
@apmon apmon Don't require a second click to create an OpenStreetBug 6476388
@tomhughes tomhughes Merge branch 'master' into openstreetbugs e7cd90f
@tomhughes tomhughes Tidy up some of the map bugs code fb4d003
@tomhughes tomhughes Switch back to using the local OL build as it seems to work fine 4da9fd7
@tomhughes tomhughes Detabify and tidy up some more of the bugs code 4b0191b
@tomhughes tomhughes Factor out common code into partials 560e41e
@tomhughes tomhughes Get returning of bugs as GPX files working cc311ff
@tomhughes tomhughes Merge the gpx_bugs action into the main get_bugs action 6aec21b
@tomhughes tomhughes Detabify and tidy up some more of the bugs code a2495c8
@tomhughes tomhughes Always get the bug commenter name from the user if there is one 63e9c47
@tomhughes tomhughes Place legacy routes after their replacements 54b42ec
@tomhughes tomhughes Rename association between map_bugs and map_bug_comment to comments 8852454
@tomhughes tomhughes Don't add a geographic condition when fetching an RSS feed with no bbox cbcbd7a
@tomhughes tomhughes Add a C implementation of QuadTile.iterate_tiles_for_area 7bba798
@tomhughes tomhughes Use quad tiling to select bugs in an area
Remove the _no_quadtile versiond of the selection routines and switch
to using the ordinary ones but with a (large) limit applied on the size
of the area to prevent us spending ages working out the list of tiles
to be selected.
@tomhughes tomhughes Make the edit action default to z17
If an attempt is made to invoke an editor without specifying a zoom
level (as with the GPX edit links) then default to z17 instead of z14
to avoid trying to load too much data. Fixes #3728.
@smsm1 smsm1 Add the .DS_Store file to the gitignore (often added by default). bab8ad3
@smsm1 smsm1 Update the rss feed logo, to use the new logo. 741c624
@tomhughes tomhughes Make sure the ruby quadtile code give the same result as the C version d2cf09f
@tomhughes tomhughes Rename some columns and indexes in the bug tables 882700c
Mendhak Allow any valid (per RFC 3986) scheme name in OAuth callback URLs
Changed the callback_url regex so that you can have custom schemes such
as myapp: or my-lovely-app: instead of just http and https. This should
help with mobile development where users can authorize with OSM in their
browser and are automatically redirected to the registered app.
@tomhughes tomhughes Add methods to get a bug's author details from the first comment f77a3c7
@tomhughes tomhughes Use the right author name for bugs in RSS format ae844f3
@tomhughes tomhughes User an RJS template for the javascript response c7bb260
@tomhughes tomhughes Fix a few minor issues in the print stylesheet
Stop the mobile header appearing, and set the size of the attribution.
@tomhughes tomhughes Simplify URL scheme name matching in OAuth callback URLs a little 6cb69b5
@tomhughes tomhughes Don't allow libxml 2.0.0 and later to be used a2f08cc
@tomhughes tomhughes Make "all traces" and "your traces" links more consistent
Make sure we always show the "all traces" and "your traces" links
in the same place and that they don't accidentally inherit parameter
values that we don't really want.

Based on work by Andrzej Zaborowski <>.
@tomhughes tomhughes Handle large bounding box changesets better
If the bounding box of a changeset is much larger than the map then
there seem to be problems with OL not rendering the feature correctly
so reduce the highlight to just be the extent of the map plus a small
margin in that case.
@tomhughes tomhughes Rename a number of methods in the map_bugs controller f4928d0
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
@tomhughes tomhughes Mass rename of "bugs" as "notes" for increased user friendliness e3b8b89
@tomhughes tomhughes Tidy up the note model a bit 33c0f15
@tomhughes tomhughes Tidy up the note_comment model a bit ab2acea
@tomhughes tomhughes Update tests for change in name from "map_bug" to "note" etc 08d6a0c
@tomhughes tomhughes Tidy up the note controller
Go through most of the note controller, tidying things up, fixing
a few bugs, and making sure we have tests for everything.
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 5ff9f2d
@tomhughes tomhughes Merge branch 'master' into openstreetbugs c20b31b
@tomhughes tomhughes Merge branch 'master' into openstreetbugs 7c98b41
@tomhughes tomhughes Merge branch 'master' into openstreetbugs
@tomhughes tomhughes Use correct URL for note details a693862
@tomhughes tomhughes Get the note browse pages into a vaguely working state 81a6c7b
tomhughes and others added some commits Oct 14, 2012
@tomhughes tomhughes Set attributes on newly created notes 513bec8
@tomhughes tomhughes Improve styling of notes popups 352d936
@tomhughes tomhughes Remove unused translations 9d90474
@tomhughes tomhughes Remove unused stylesheet rules 5cb9f2b
@tomhughes tomhughes Fix up issues with notes in the data browser c6be5f3
@tomhughes tomhughes Correct field name e6c400b
@tomhughes tomhughes Fix links to user notes 324c37a
@tomhughes tomhughes Return the body of a note comment as a rich text object 654d22e
@tomhughes tomhughes Replace htmlize call by rich text to_html call e54f9ed
@tomhughes tomhughes Merge branch 'master' into notes 3fb931f
@tomhughes tomhughes Update list of filtered methods in notes controller e2f1d60
@tomhughes tomhughes Disable buttons while form submission is in progress c0ee3f6
@tomhughes tomhughes Recover properly from a failed notes load
Patch OpenLayers so that it doesn't consider an area as loaded if
the HTTP request fails, so that it will try and load the area when
you zoom back in again.
@tomhughes tomhughes Merge branch 'master' into notes
@tomhughes tomhughes Fix formatting of comments in the notes RSS feed 129d505
@tomhughes tomhughes Get the notes tests working again fd6abf4
@apmon apmon Remove nearby_place from the note model
Instead of storing the auto-generated meta information nearby_place
in the database, just look up the information on the fly when needed
and cache it for performance.
@tomhughes tomhughes Move caching of reverse geocodes to describe_location 5fe5777
@tomhughes tomhughes Merge branch 'master' into notes
@tomhughes tomhughes Rework notes UI using leaflet de78176
@tomhughes tomhughes Add a scrollbar when a note gets too big 9847507
@tomhughes tomhughes Make sure popups don't overlay controls or the top bar 146e987
@tomhughes tomhughes Police the MAX_NOTE_REQUEST_AREA limit on the client 7f89545
@tomhughes tomhughes Abort any existing load before starting a new one 7ec003d
@tomhughes tomhughes Remove the author_name field from notes ba5107e
@tomhughes tomhughes Include a user URL in JSON and XML responses 9477d7a
@tomhughes tomhughes Link user names to their pages dbc523b
@tomhughes tomhughes Format note comments correctly in the data browser c3cb1de
@tomhughes tomhughes Return note comments as formatted HTML as well as text 2ddd667
@tomhughes tomhughes Display formatted notes in the web UI c533fb4
@tomhughes tomhughes Convert author_ip to a proper INET field 31a031b
@tomhughes tomhughes Style disabled permalinks appropriately 0d11ad7
@tomhughes tomhughes Don't try and add a note when the control is disabled ee530d8
@tomhughes tomhughes Merge branch 'master' into notes
@tomhughes tomhughes Set width of comment entry area in note popups 8cd6168
@tomhughes tomhughes Fix notes page in data browser to match new site style 76559d3
@tomhughes tomhughes Merge branch 'master' into notes 56db9ca
@tomhughes tomhughes Improve comment descriptions in note popups db5c58e
@tomhughes tomhughes Localise dates and times in notes popups e957aaa
@tomhughes tomhughes Tweak sizing of note popups 0b993e5
@tomhughes tomhughes Improve display of anonymous note comments 2ef58f4
@tomhughes tomhughes Improve styling of the per-user notes list view 9d3b419
@tomhughes tomhughes Add anonymous comment warning to note popup 5ad4554
@tomhughes tomhughes Show anonymous user warning in data browser note view 16a0f14
@tomhughes tomhughes Make notes RSS feeds work ff73d12
@tomhughes tomhughes Touch notes when new comments are added 43f39c5
@tomhughes tomhughes Only show each note once is the user notes view 8e5364b
@tomhughes tomhughes Improve date display in user notes list 7f83692
@tomhughes tomhughes Move the note popups up slightly
The default position makes it hard to grab the marker and move it
when adding a note, so move themm up a few pixels.

Since there's no captcha, is there any server-side anti-spam mechanism (like API call throttling) to prevent abuse of anonymous notes?

OpenStreetMap on GitHub member

The "close" button in the popup is ambiguous: does it close the popup or the note/issue? (I accidentally closed my own note just after creating it...). Better use something like "mark as fixed".
Should it be possible to close a note without commenting?
Is there a way to re-open a closed note (and: is there a way to comment on a closed note)?

tomhughes added some commits Feb 5, 2013
@tomhughes tomhughes Remove the "new note" marker when the user clicks somewhere else 51dcf86
@tomhughes tomhughes Avoid javascript warning d92ca41
@tomhughes tomhughes Remove redundant return c12fe5f
@tomhughes tomhughes Pass parameters to APIAlreadyDeletedError correctly 6279d83
@tomhughes tomhughes Make the API reject changes to closed notes ae27f7a
@tomhughes tomhughes Reject note comments with no text d1aa084
@tomhughes tomhughes Change "Close" button to "Resolve" in notes popup 9f02513
@tomhughes tomhughes Stop newly added notes disappearing a5ca0f4
@tomhughes tomhughes Merge branch 'master' into notes 8090e08
@tomhughes tomhughes Separate the links in the bottom right map corner better 68044c6
@tomhughes tomhughes Reject attempts to create notes with no comment text eed9de5
@tomhughes tomhughes Clear the note cache when the note layer is turned off 34f823a
@tomhughes tomhughes Update "new note" messaging to provide more guidance 5bb55c2
@tomhughes tomhughes Preload sender/recipient details for messages 3a06235
@tomhughes tomhughes Reimplement User#is_friends_with? in a non-insane way abd2900
@tomhughes tomhughes Improve selection logic in DiaryEntry#rss 9d23b0d
@tomhughes tomhughes Optimise database reads in DiaryEntry#list 9717b81
@tomhughes tomhughes Avoid reading nodes twice in WayController#full 6300fa2
@tomhughes tomhughes Use changeset and user caches in Changeset#download 78e8828
@tomhughes tomhughes Force translations to be preloaded during startup 652b09b
@tomhughes tomhughes Wait until after rails has initialise I18n to preload the resources 30f8e41
@tomhughes tomhughes Mark CORS responses as uncacheable d53bbe5
@tomhughes tomhughes Add javascript OAuth support e8d3263
@tomhughes tomhughes Use OAuth for notes API calls and require authentication to close 38255f9
@tomhughes tomhughes Merge branch 'master' into notes
@tomhughes tomhughes Add missing padding at right hand end of greeting menu 15be6b3
@tomhughes tomhughes Tidy up javascript OAuth code 00a4d9f
@tomhughes tomhughes Don't try and use OAuth if we don't have a token 84f7d32
@tomhughes tomhughes Fix display of updates on newly loaded notes d00994d
@tomhughes tomhughes Focus on the text field when a note is opened 0a4b860
@tomhughes tomhughes Test that closing and deleting notes require authentication 544113a
@tomhughes tomhughes Add a new write_notes permission needed for OAuth access to notes 97e0d5a
@tomhughes tomhughes Restriction note deletion to moderators f4b599e
@tomhughes tomhughes Allow a comment to be supplied when hiding a note 030bb31
@tomhughes tomhughes Return an updated copy of the note from the delete call 4b669ec
@tomhughes tomhughes Add a "Hide" button to notes when viewed by moderators 979822f
@tomhughes tomhughes Merge branch 'master' into notes
@tomhughes tomhughes Merge branch 'master' into notes 52611a5
OpenStreetMap on GitHub member

I think this is probably ready for merging now, unless anybody can see any major problems that should be resolved first?

@openstreetmap-mirror openstreetmap-mirror merged commit 52611a5 into openstreetmap:master Apr 23, 2013
@tomhughes tomhughes deleted the tomhughes:notes branch Apr 23, 2013
@tomhughes tomhughes restored the tomhughes:notes branch Apr 23, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment