<p dir="auto">Blocks table update in <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="1864305331" data-permission-text="Title is private" data-url="https://github.com/openstreetmap/openstreetmap-website/issues/4200" data-hovercard-type="pull_request" data-hovercard-url="/openstreetmap/openstreetmap-website/pull/4200/hovercard" href="https://github.com/openstreetmap/openstreetmap-website/pull/4200">#4200</a> was done before <code class="notranslate">deactivates_at</code> was introduced. Because of that there's still code that checks <code class="notranslate">updated_at</code> instead of <code class="notranslate">deactivates_at</code>.</p>
<p dir="auto">This PR fixes a bug which should be difficult to notice because it happens only with zero-duration blocks that don't need to be viewed. Usually it doesn't make sense to create such blocks. These blocks are incorrectly reported as "read" in the table even if they weren't read because <code class="notranslate">updated_at</code> is slightly greater than <code class="notranslate">ends_at</code>.</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/5476'>https://github.com/openstreetmap/openstreetmap-website/pull/5476</a></p>
<h4>Commit Summary</h4>
<ul>
<li><a href="https://github.com/openstreetmap/openstreetmap-website/pull/5476/commits/7e8fd5d7b7874b60b977c3a190094a93e1e3ff85" class="commit-link">7e8fd5d</a> Check deactivates_at to report if block was read after its end date</li>
</ul>
<h4 style="display: inline-block">File Changes </h4> <p style="display: inline-block">(<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5476/files">2 files</a>)</p>
<ul>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5476/files#diff-4a98c66cfd9aac927556a0afaba70f5a1ecfdf8d1bcc845584a08c9858e8a48f">app/helpers/user_blocks_helper.rb</a>
(2)
</li>
<li>
<strong>M</strong>
<a href="https://github.com/openstreetmap/openstreetmap-website/pull/5476/files#diff-7b1664ebd556062821a678e3622cf5c89c4ba8c7f83253627ad267ac30b121c4">test/helpers/user_blocks_helper_test.rb</a>
(32)
</li>
</ul>
<h4>Patch Links:</h4>
<ul>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5476.patch'>https://github.com/openstreetmap/openstreetmap-website/pull/5476.patch</a></li>
<li><a href='https://github.com/openstreetmap/openstreetmap-website/pull/5476.diff'>https://github.com/openstreetmap/openstreetmap-website/pull/5476.diff</a></li>
</ul>
<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/openstreetmap/openstreetmap-website/pull/5476">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAK2OLIEOPRMMXY3LJO6GWT2JLCODAVCNFSM6AAAAABUWDZ4VKVHI2DSMVQWIX3LMV43ASLTON2WKOZSG43TCMJZGU4DIMA">unsubscribe</a>.<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAK2OLP7R7EPPSCNRY6H5LD2JLCODA5CNFSM6AAAAABUWDZ4VKWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHKKLIXYA.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><openstreetmap/openstreetmap-website/pull/5476</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/openstreetmap/openstreetmap-website/pull/5476",
"url": "https://github.com/openstreetmap/openstreetmap-website/pull/5476",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>