Opened 8 years ago

Closed 8 years ago

#3366 closed defect (fixed)

PL2: "advanced" tab: possible to create tags with empty key

Reported by: sebastiank Owned by: potlatch-dev@…
Priority: minor Milestone:
Component: potlatch2 Version:
Keywords: Cc:

Description

It shouldn't be possible to create a tag with either key or value is the string of length 0.

(See http://www.openstreetmap.org/browse/node/1019041185/history for an example.)

On top of that, it should always trim spaces at the start and at the end of a key or value string.

I'd suggest to render "(new tag)" and "(new value)" in italic font and not count it as a tag change unless both fields have been edited. It shouldn't be necessary to initialize the cell editor with this placeholder string because you never enter something ot that kind.

Why not rename "(new tag)" --> "(new key)"?

(Used the Potlatch 2 version that

Change History (2)

comment:1 Changed 8 years ago by sebastiank

... is installed in the edit tab 0.5 b 24558)

comment:2 Changed 8 years ago by Richard

Resolution: fixed
Status: newclosed

This should be fixed in r24973. The UI isn't particularly elegant if you try and blank a key (the DataGrid? row sticks around until you select another entity) but unfortunately my poor brane gets confused when faced with DataGrid? events and the tag architecture and wotnot.

Note: See TracTickets for help on using tickets.