<p>Supersedes PR <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1268" class="issue-link js-issue-link" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/1268" data-id="171061439" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#1268</a> , see also issue <a href="https://github.com/openstreetmap/openstreetmap-website/issues/841" class="issue-link js-issue-link" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/841" data-id="49609787" data-error-text="Failed to load issue title" data-permission-text="Issue title is private">#841</a></p>
<p>This PR builds on the work by <a href="https://github.com/sbagroy986" class="user-mention">@sbagroy986</a>, <a href="https://github.com/zerebubuth" class="user-mention">@zerebubuth</a>, <a href="https://github.com/woodpeck" class="user-mention">@woodpeck</a> and <a href="https://github.com/grischard" class="user-mention">@grischard</a> as we try to shepherd this GSoC project through review and into production.</p>
<p>I have cleaned up some aspects of this PR, purely to minimise the distractions when comparing diffs and trying to understand how it works. Please avoid nitpicking the code for now - we need to consider bigger questions first. For the avoidance of doubt, this PR not in a fit state for merging!</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/openstreetmap/openstreetmap-website/pull/1576'>https://github.com/openstreetmap/openstreetmap-website/pull/1576</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Basic models set up</li>
  <li>Controllers + a few tests + new notification added. Work pending on the notification view</li>
  <li>Added authorization + issues dashboard</li>
  <li>Added IssueComments + ForeignKeys + Indexes</li>
  <li>basic UI for reporting diary entries,diary entry comments and user profiles</li>
  <li>DB changes + Related issues added</li>
  <li>Fixed tests + Added new ones</li>
  <li>Fixed tests + Altered migration file + Added reporting strings + Added update method</li>
  <li>Moved strings to locales + Added 'Issues' button + Fixed typo in tests</li>
  <li>Issue reopens on Reports coming in after instance update</li>
  <li>Added search for issues</li>
  <li>Proper implementation of report strings + cleaning up</li>
  <li>Added Issue Type + Issue Reassigning + Last updated_by</li>
  <li>Small changes</li>
  <li>Replaced check_box_tags with radio_button</li>
  <li>Fixed existing tests</li>
  <li>Added a few tests</li>
  <li>Added a few more tests</li>
  <li>Added support for reporting Changesets + Deleting issues from the CLI</li>
  <li>Fixed an error + Added email notifications for moderators</li>
  <li>Added report strings for Changesets and Notes + minor controller changes</li>
  <li>Fixed link to DiaryComments</li>
  <li>Added report icon + changes to admin UI + changes to report form + few other minor changes</li>
  <li>Added sortable headers + search + reportable Notes</li>
  <li>Changed report button + Added disclaimer on report page + Added search filter</li>
  <li>Fixed error</li>
  <li>UI changes + Redirection after creating report fixed</li>
  <li>Fixed related issues positioning</li>
  <li>Added helper + minor UI changes</li>
  <li>Update en.yml</li>
  <li>Update en-GB.yml</li>
  <li>fix build on wily; fix some moderation branch language constants</li>
  <li>Reordered migrations to make them the latest.</li>
  <li>Made rubocop happy by formatting and minor syntax tweaks.</li>
  <li>More whitespace fixes. Attempting to get tests to pass.</li>
  <li>Revert changes to old migration.</li>
  <li>More cleanup after tests.</li>
  <li>Revert changes to Vagrantfile</li>
  <li>Remove unused files</li>
  <li>Whitespace fixes.</li>
  <li>Revert unrelated changes from db/structure.sql</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-0">Gemfile</a>
    (3)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-1">Gemfile.lock</a>
    (2)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-2">app/assets/stylesheets/common.scss</a>
    (51)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-3">app/controllers/diary_entry_controller.rb</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-4">app/controllers/issues_controller.rb</a>
    (283)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-5">app/helpers/issues_helper.rb</a>
    (74)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-6">app/models/issue.rb</a>
    (48)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-7">app/models/issue_comment.rb</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-8">app/models/notifier.rb</a>
    (11)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-9">app/models/report.rb</a>
    (4)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-10">app/models/user.rb</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-11">app/views/browse/changeset.html.erb</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-12">app/views/browse/note.html.erb</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-13">app/views/diary_entry/_diary_comment.html.erb</a>
    (9)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-14">app/views/diary_entry/_diary_entry.html.erb</a>
    (6)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-15">app/views/diary_entry/view.html.erb</a>
    (6)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-16">app/views/issues/_comments.html.erb</a>
    (30)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-17">app/views/issues/_reports.html.erb</a>
    (16)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-18">app/views/issues/index.html.erb</a>
    (43)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-19">app/views/issues/new.html.erb</a>
    (43)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-20">app/views/issues/show.html.erb</a>
    (60)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-21">app/views/layouts/_header.html.erb</a>
    (3)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-22">app/views/notifier/new_issue_notification.html.erb</a>
    (5)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-23">app/views/user/view.html.erb</a>
    (8)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-24">config/locales/en-GB.yml</a>
    (125)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-25">config/locales/en.yml</a>
    (125)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-26">config/routes.rb</a>
    (12)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-27">db/migrate/20160822153055_create_issues_and_reports.rb</a>
    (41)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-28">db/migrate/20160822153115_create_issue_comments.rb</a>
    (18)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-29">db/migrate/20160822153153_add_report_count_to_issues.rb</a>
    (7)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-30">db/structure.sql</a>
    (257)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-31">test/controllers/issues_controller_test.rb</a>
    (265)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-32">test/fixtures/issue_comments.yml</a>
    (13)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-33">test/fixtures/issues.yml</a>
    (23)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-34">test/fixtures/reports.yml</a>
    (15)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-35">test/models/issue_comment_test.rb</a>
    (7)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-36">test/models/issue_test.rb</a>
    (7)
  </li>
  <li>
    <strong>A</strong>
    <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576/files#diff-37">test/models/report_test.rb</a>
    (7)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1576.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/1576.patch</a></li>
  <li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/1576.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/1576.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/1576">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLS7WsLtVGDlHFXoWhyaEpEU-G16Kks5sK6mjgaJpZM4OOfLC">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLSgxbTv08i5P2F_c-tDHWQNPDYRcks5sK6mjgaJpZM4OOfLC.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/openstreetmap/openstreetmap-website/pull/1576"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/openstreetmap/openstreetmap-website","title":"openstreetmap/openstreetmap-website","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/openstreetmap/openstreetmap-website"}},"updates":{"snippets":[{"icon":"DESCRIPTION","message":"[WIP] Allow reporting of abusive users to moderators or admins (#1576)"}],"action":{"name":"View Pull Request","url":"https://github.com/openstreetmap/openstreetmap-website/pull/1576"}}}</script>