Id: Deleting a restriction is creating a new restriction in the TR window

Created on 28 Mar 2018  路  4Comments  路  Source: openstreetmap/iD

While trying to delete a wrongly added restriction (no_u_turn) in iD, through the TR window, ended up creating a new restriction (only_u_turn) in addition to deleting the old one without any visible warnings.

trbug4

osm Change file:

<?xml version="1.0" encoding="UTF-8"?>
<osmChange version="0.6" generator="iD">
   <create>
      <relation id="-8" version="0">
         <member type="way" role="from" ref="417310791" />
         <member type="way" role="via" ref="573973104" />
         <member type="way" role="to" ref="573973107" />
         <tag k="type" v="restriction" />
         <tag k="restriction" v="only_u_turn" />
      </relation>
   </create>
   <modify />
   <delete if-unused="true">
      <relation id="8155829" version="1">
         <member type="way" role="from" ref="417310791" />
         <member type="way" role="via" ref="573973104" />
         <member type="way" role="to" ref="573973107" />
         <tag k="restriction" v="no_u_turn" />
         <tag k="type" v="restriction" />
      </relation>
   </delete>
</osmChange>

bug

Most helpful comment

Awesome thanks @srividyacb and @abhisheksaikia for the detailed report 馃憤

All 4 comments

Thanks for reporting @abhisheksaikia - I noticed in the screenshot that the turn arrow didn't even turn blue (only_u_turn). Maybe the bug happens when the user can clicks _very_ fast - is this what you did?

I'll check the code and try to reproduce the issue - we might have to block clicks until the graph update has caught up..

@bhousel

Area in OpenStreetMap

  • click the way in iD
  • Delete no_left and no_u turn-restriction
  • While deleting no_left - first click it changes to only_left (blue) and second click deletes the TR.
  • While deleting no_u - the first click (in single action) both only_u and deletion is happening (no visible change in colors).

(_in gif you can notice, deletion of no_u doesn't change to blue but directly deletes but doesn't give indication of TR creation_)

Follow the steps as per to reproduce the problem

new-relation

Awesome thanks @srividyacb and @abhisheksaikia for the detailed report 馃憤

Thanks this is fixed now..
The issue was that we were only allowing the only_ to go in one direction along the bidirectional connecting road. (I guess I was thinking about oneways the day I wrote that code).

Deleting the no_u restriction would cycle to an only_u restriction, but this restriction was ignored because of the bug, causing the turn arrow to turn green (even though that only_u was silently created).

Was this page helpful?
0 / 5 - 0 ratings

Related issues

jidanni picture jidanni  路  3Comments

Sirvanalie picture Sirvanalie  路  3Comments

Chaz6 picture Chaz6  路  3Comments

bhousel picture bhousel  路  3Comments

tordans picture tordans  路  3Comments