[openstreetmap/openstreetmap-website] Changeset metadata download to include number of changes (#1947)

mmd notifications at github.com
Tue Aug 14 08:45:54 UTC 2018


For statistical reasons, it might be interesting to also include the number of changes (field "num_changes" in changesets table) in the changeset(s) result. This way it would be possible to easily identify empty changesets, or avoid downloading large changesets only to find out how many changes are included. Also, editors like JOSM could display this additional column in the Changeset Manager.

If this is ok, I would create an accompanying issue for cgimap as well. 

```
diff --git a/app/models/changeset.rb b/app/models/changeset.rb
index 502637c2a..1aa1e1fd3 100644
--- a/app/models/changeset.rb
+++ b/app/models/changeset.rb
@@ -232,6 +232,7 @@ class Changeset < ActiveRecord::Base
     bbox.to_unscaled.add_bounds_to(el1, "_") if bbox.complete?
 
     el1["comments_count"] = comments.length.to_s
+    el1["changes_count"] = num_changes.to_s
 
     if include_discussion
       el2 = XML::Node.new("discussion")

```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/1947
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20180814/edfab63e/attachment.html>


More information about the rails-dev mailing list