Modify

Opened 3 years ago

Closed 2 years ago

Last modified 2 years ago

#21988 closed defect (fixed)

[Github-Patch] Tag2link rule get formatter URL with deprecated rank

Reported by: pyrog Owned by: team
Priority: normal Milestone: 22.12
Component: Core tag2link Version:
Keywords: Cc: pangoSE

Description

for i.e. UAI code JOSM return the 2 formatter URLs that are deprecated:

In wikidata an obsolete value isn't deleted, but ranked as deprecated.

Attachments (0)

Change History (6)

comment:1 by pyrog, 3 years ago

JOSM no longer run SPARQL queries on Wikidata and Data Items.

Rules are stored in the static file inside a webjars.

Unfortunately, this file must be updated manually.
The doc is not yet up to date !

Note: An issue was opened in the appropriate repository.

Fixes: Formatter URL are sorted by rank (Preferred first) and Deprecated are removed.

Sophox SPARQL query

SELECT (CONCAT("Key:", ?permanent_key_ID) as ?OSM_key) ?formatter_URL ?rank ?source WHERE {
  ?item osmdt:P2 osmd:Q7.
  ?item osmdt:P16 ?permanent_key_ID.
  ?item osmp:P8 [osmps:P8 ?formatter_URL; wikibase:rank ?rank;].
  BIND("osmwiki:P8" AS ?source ).
  FILTER (?rank != wikibase:DeprecatedRank)
}
ORDER BY ?OSM_key DESC(?rank)

Wikidata SPARQL query

SELECT ?OSM_key ?formatter_URL ?rank ?source WHERE {
  { ?item wdt:P1282 ?OSM_key. }
  FILTER(STRSTARTS(?OSM_key, 'Key:')) .

  {
    { ?item p:P1630 [ps:P1630 ?formatter_URL; wikibase:rank ?rank;]. BIND("wikidata:P1630" AS ?source ). }
    UNION
    { ?item p:P3303[ps:P3303 ?formatter_URL; wikibase:rank ?rank;]. BIND("wikidata:P3303" AS ?source ). }
  }
  FILTER (?rank != wikibase:DeprecatedRank)
}
ORDER BY ?OSM_key DESC(?rank)
Last edited 3 years ago by pyrog (previous) (diff)

comment:2 by pangoSE, 2 years ago

Cc: pangoSE added

comment:3 by skyper, 2 years ago

Component: CoreCore tag2link
Summary: Tag2link rule get formatter URL with deprecated rank[Github-Patch] Tag2link rule get formatter URL with deprecated rank

comment:4 by taylor.smock, 2 years ago

Milestone: 22.12
Resolution: fixed
Status: newclosed

In 1faab01.

This will be fixed in the next tag2link dependency update. It is a bit late for me to do the update this cycle, so I'm going to update it next week.

comment:5 by taylor.smock, 2 years ago

Milestone: 22.1222.11

comment:6 by taylor.smock, 2 years ago

Milestone: 22.1122.12

Milestone renamed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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