Wikipedia:Bots/Requests for approval/DannyS712 bot 15

DannyS712 bot 15

[[User:DannyS712 bot|DannyS712 bot 15]]

{{Newbot|DannyS712 bot|15}}

Operator: {{botop|DannyS712}}

Time filed: 08:34, Saturday, March 16, 2019 (UTC)

Automatic, Supervised, or Manual: automatic

Programming language(s): JavaScript

Source code available:

Function overview: {{tq|adding {{tlg|Germany district OSM map|parent_subdivision=QXXXX}} to the 'map' parameter of {{tlg|Infobox District DE}}, where QXXXX is the Wikidata ID of the German state the district belongs to}}

Links to relevant discussions (where appropriate): WP:BOTREQ#OSM location map for German districts

Edit period(s): One time run

Estimated number of pages affected: <400

Exclusion compliant (Yes/No): No

Already has a bot flag (Yes/No): Yes

Function details: Using the API, retrieve the wikidata wikibase_item for a page, and then add the corresponding parameter to {{tl|Infobox District DE}}.

=Discussion=

  • {{ping|Underlying lk|GreenC}} filed! --DannyS712 (talk) 08:35, 16 March 2019 (UTC)

{{BotTrial|edits=50}} {{re|DannyS712}} I thought I'd done this last night, but apparently not. Anyways, approved for trial. As usual, please post the diffs here when done and take all the time you need. --TheSandDoctor Talk 18:03, 17 March 2019 (UTC)

:{{ping|TheSandDoctor}} {{BotTrialComplete}} see the 49 edits made at [https://en.wikipedia.org/w/index.php?limit=1000&title=Special%3AContributions&contribs=user&target=DannyS712+bot&namespace=0&tagfilter=&start=2019-03-24&end=2019-03-24]. {{ping|Underlying lk}} I didn't see any errors, but I also am not as familiar with the template and its use as you are. Can you take a look? --DannyS712 (talk) 00:28, 24 March 2019 (UTC)

::parent_subdivision should be the QID of the state, for instance {{Q|1197}} for Hildesheim (district) and all the other districts in Niedersachsen; see [https://en.wikipedia.org/w/index.php?title=Hildesheim_(district)&diff=889177848&oldid=889176348 this diff].--eh bien mon prince (talk) 00:36, 24 March 2019 (UTC)

:::{{ping|Underlying lk}} hang on, so its not the QXXXX of the page itself? Then how do I find what page it is for? I'm rolling back the edits, since they were all wrong then. --DannyS712 (talk) 00:40, 24 March 2019 (UTC)

::::{{ping|DannyS712}} [https://query.wikidata.org/#SELECT%20%3Frural_district_of_Germany%20%3Frural_district_of_GermanyLabel%20%3Flocated_in_the_administrative_territorial_entity%20%3Flocated_in_the_administrative_territorial_entityLabel%20WHERE%20%7B%0A%20%20SERVICE%20wikibase%3Alabel%20%7B%20bd%3AserviceParam%20wikibase%3Alanguage%20%22%5BAUTO_LANGUAGE%5D%2Cen%22.%20%7D%0A%20%20%7B%20%3Frural_district_of_Germany%20p%3AP31%2Fps%3AP31%2Fwdt%3AP279%2A%20wd%3AQ22865%20.%7D%0A%20%20UNION%0A%20%20%7B%20%3Frural_district_of_Germany%20p%3AP31%2Fps%3AP31%2Fwdt%3AP279%2A%20wd%3AQ106658%20.%20%7D%20%20%0A%20%20%3Frural_district_of_Germany%20wdt%3AP131%2A%20%3Flocated_in_the_administrative_territorial_entity.%0A%20%20%3Flocated_in_the_administrative_territorial_entity%20wdt%3AP31%20wd%3AQ1221156%20.%0A%7D This query] can be used for that.--eh bien mon prince (talk) 14:08, 24 March 2019 (UTC)

:::::{{ping|Underlying lk}} so just to confirm, the actual Q value to be added is the one listed under "located_in_the_administrative_territorial_entity", for each page labeled "rural_district_of_Germany". Thanks, --DannyS712 (talk) 18:53, 24 March 2019 (UTC)

::::::{{ping|DannyS712}} Correct.--eh bien mon prince (talk) 18:58, 24 March 2019 (UTC)

:::::::{{ping|Underlying lk}} So I should use User:DannyS712 test/infobox3.json instead of User:DannyS712 test/infobox2.json for the source? --DannyS712 (talk) 19:15, 24 March 2019 (UTC)

::::::::{{ping|DannyS712}} seems right to me.--eh bien mon prince (talk) 19:36, 24 March 2019 (UTC)

:::::::::{{ping|Underlying lk}} in that case, {{ping|TheSandDoctor}} would you be willing to approve an extended trial? I'll check the first bunch of edits the bot makes to ensure that it links to a correct map. Thanks, --DannyS712 (talk) 19:38, 24 March 2019 (UTC)

{{BotExtendedTrial|edits=25}} {{re|DannyS712}} --TheSandDoctor Talk 03:21, 25 March 2019 (UTC)

:{{ping|TheSandDoctor}} shouldn't this be {{tl|BotExtendedTrial}}? --DannyS712 (talk) 03:41, 25 March 2019 (UTC)

::{{re|DannyS712}} You're right, it was a case of "thought I did one thing, but did another." Fixed {{smiley|wink}} --TheSandDoctor Talk 05:14, 25 March 2019 (UTC)

:::{{ping|TheSandDoctor}} {{BotTrialComplete}} 25 edits made [https://en.wikipedia.org/w/index.php?limit=1000&title=Special%3AContributions&contribs=user&target=DannyS712+bot&namespace=0&tagfilter=&start=2019-03-25&end=2019-03-26]. Code is at User:DannyS712 test/Map bot.js, actual list of pages to edit is at User:DannyS712 test/infobox4.json (infobox3 but removing pages that don't exist on enwiki). So of those listed won't be edited because they have to map parameter to replace. {{ping|Underlying lk}} I looked, and don't see any errors. --DannyS712 (talk) 00:30, 26 March 2019 (UTC)

:Edits look fine to me.--eh bien mon prince (talk) 13:24, 26 March 2019 (UTC)

::I checked a few more, and all the maps seem to be working. --DannyS712 (talk) 17:03, 28 March 2019 (UTC)

:::Since there was no error on this, and the (limited) response seems positive, and no one objected after about 2-3 weeks, {{botapproved}}. Headbomb {t · c · p · b} 03:36, 3 April 2019 (UTC)

:The above discussion is preserved as an archive of the debate. Please do not modify it. To request review of this BRFA, please start a new section at WT:BRFA.