Modify

Opened 5 months ago

Last modified 5 months ago

#22350 new enhancement

[TaggingPreset] Add some values for "match" attribute to determine negative results of matching

Reported by: KorneySan Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: tagging preset match Cc:

Description (last modified by KorneySan)

Current version of match has five values:

  • none: neutral, i.e., do not consider this item for matching
  • key: positive if key matches, neutral otherwise
  • key!: positive if key matches, negative otherwise
  • keyvalue: positive if key and value matches, neutral otherwise
  • keyvalue!: positive if key and value matches, negative otherwise

It becomes necessary to have negative match result only in some cases.

I propose to add some new values with following meaning:

  • !key: negative if key matches, neutral otherwise
  • !key!: negative if key matches, positive otherwise
  • !keyvalue: negative if key and value matches, neutral otherwise
  • !keyvalue!: negative if key and value matches, positive otherwise

It is required because some tag keys have multiple values that partly belongs to different subjects.
For example, with public_transport=stop_position we can use bus=yes which belongs to "road" ways and train=yes which belongs to "rail" ways. Using

<key
    key="train"
    match="!key"
    />

we can ensure that "rail" stop_position preset will not be shown for "road" stop_position.

Attachments (0)

Change History (2)

comment:1 Changed 5 months ago by KorneySan

Description: modified (diff)

comment:2 Changed 5 months ago by skyper

Component: Internal presetCore
Keywords: tagging preset added

Similar to #19012.
Does match_expression="" work for you?

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set.
to The owner will be changed from team to the specified user.
The owner will change to KorneySan
as duplicate The resolution will be set to duplicate.The specified ticket will be cross-referenced with this ticket
The owner will be changed from team to anonymous.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.