<p>Hey <a href="https://github.com/tomhughes" class="user-mention">@tomhughes</a> & <a href="https://github.com/zerebubuth" class="user-mention">@zerebubuth</a>, I did suggest for <a href="https://github.com/mstn" class="user-mention">@mstn</a> to open this issue here first just to get an opinion of whether it was something worth fixing at the API level.</p>
<p>The example given isn't strictly a "circular" relation, but it is an example where the user created the Route Master first, and the the Route children afterwards.  iD assigns temporary keys in sequential order, so it's not unusual for some relations to contain member keys that appear later in the file.</p>
<ul>
<li>Master Route (<code>r-1</code>), members: (<code>r-2</code>, <code>r-3</code>)</li>
<li>Child Route (<code>r-2</code>)</li>
<li>Child Route (<code>r-3</code>)</li>
</ul>
<p>iD could probably take a pass through all the relations and move <code>r-1</code> to the end of the file as a workaround, but... I'd really rather see this fixed in the API.</p>

<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/issues/1465#issuecomment-282343402">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABWnLXqtzbIryfxpWn4eFSSPH8n4Sbvzks5rfwvDgaJpZM4MLUZv">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABWnLSf2raUBANAFaRuGT2o-fZIoUwPqks5rfwvDgaJpZM4MLUZv.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/issues/1465#issuecomment-282343402"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue 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":"PERSON","message":"@bhousel in #1465: Hey @tomhughes \u0026 @zerebubuth, I did suggest for @mstn to open this issue here first just to get an opinion of whether it was something worth fixing at the API level.\r\n\r\nThe example given isn't strictly a \"circular\" relation, but it is an example where the user created the Route Master first, and the the Route children afterwards.  iD assigns temporary keys in sequential order, so it's not unusual for some relations to contain member keys that appear later in the file.\r\n\r\n- Master Route (`r-1`), members: (`r-2`, `r-3`)\r\n- Child Route (`r-2`)\r\n- Child Route (`r-3`)\r\n\r\niD could probably take a pass through all the relations and move `r-1` to the end of the file as a workaround, but... I'd really rather see this fixed in the API. \r\n\r\n"}],"action":{"name":"View Issue","url":"https://github.com/openstreetmap/openstreetmap-website/issues/1465#issuecomment-282343402"}}}</script>