Modify

Opened 3 years ago

Last modified 3 years 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 by KorneySan, 3 years ago

Description: modified (diff)

comment:2 by skyper, 3 years ago

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. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to KorneySan.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.