[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-06-16 Thread hoo
hoo added a comment. In T179155#4293641, @Lydia_Pintscher wrote: Has it been added to the Lua documentation page? I updated it now: mw.wikibase.getReferencedEntityId.TASK DETAILhttps://phabricator.wikimedia.org/T179155EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-06-15 Thread Lydia_Pintscher
Lydia_Pintscher added a comment. Has it been added to the Lua documentation page?TASK DETAILhttps://phabricator.wikimedia.org/T179155EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hoo, Lydia_PintscherCc: gerritbot, Agabi10, Lucas_Werkmeister_WMDE,

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-06-11 Thread gerritbot
gerritbot added a comment. Change 437629 merged by jenkins-bot: [mediawiki/extensions/Wikibase@master] Introduce mw.wikibase.getReferencedEntityId https://gerrit.wikimedia.org/r/437629TASK DETAILhttps://phabricator.wikimedia.org/T179155EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-06-11 Thread gerritbot
gerritbot added a comment. Change 438117 merged by jenkins-bot: [mediawiki/vendor@master] Update "wikibase/data-model-services" to 3.10.0 https://gerrit.wikimedia.org/r/438117TASK DETAILhttps://phabricator.wikimedia.org/T179155EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-06-07 Thread gerritbot
gerritbot added a comment. Change 438117 had a related patch set uploaded (by Hoo man; owner: Hoo man): [mediawiki/vendor@master] Update "wikibase/data-model-services" to 3.10.0 https://gerrit.wikimedia.org/r/438117TASK DETAILhttps://phabricator.wikimedia.org/T179155EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-06-05 Thread gerritbot
gerritbot added a comment. Change 437629 had a related patch set uploaded (by Hoo man; owner: Hoo man): [mediawiki/extensions/Wikibase@master] WIP Introduce mw.wikibase.getReferencedEntityId https://gerrit.wikimedia.org/r/437629TASK DETAILhttps://phabricator.wikimedia.org/T179155EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-05-30 Thread hoo
hoo added a comment. This needs https://github.com/wmde/WikibaseDataModelServices/pull/196 (and then the actual release). Afterwards the dependency in Wikibase needs to be bumped to this and mediawiki/vendor needs updating.TASK DETAILhttps://phabricator.wikimedia.org/T179155EMAIL

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-04-06 Thread thiemowmde
thiemowmde added a comment. Should this be part of the services interface? As written in https://github.com/wmde/WikibaseDataModelServices/pull/193#issuecomment-379189512: In my opinion an array does not make much sense. The method would need to return two entity IDs then: the closest end point

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-04-05 Thread hoo
hoo added a comment. In T179155#4108520, @thiemowmde wrote: […] you will end up supporting a search from multiple source IDs to the target IDs anyways, because you’ll get into that situation as soon as there’s more than one link to follow anywhere in the chain. Yes, I think this will be the

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-04-05 Thread thiemowmde
thiemowmde added a comment. Do you think we should have the simple boolean version as well? Would be a convenience shortcut mostly. Yes, I also think an additional boolean version is worth it. […] you will end up supporting a search from multiple source IDs to the target IDs anyways, because

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-04-05 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment. I suspect that, when implementing this, you will end up supporting a search from multiple source IDs to the target IDs anyways, because you’ll get into that situation as soon as there’s more than one link to follow anywhere in the chain. And in that case, I

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-04-04 Thread hoo
hoo added a comment. In T179155#4104857, @thiemowmde wrote: My personal remarks: Please find variable names that are more specific than fromId, toId(s), and propertyId. fromId could be named childId. toIds could be named parentIds. propertyId could be named hasParentPropertyId or

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-04-04 Thread hoo
hoo added a comment. In T179155#4104367, @Lucas_Werkmeister_WMDE wrote: What happens when Kreuzberg has more than one “instance of” statements? Should the surrounding Lua code then call mw.wikibase.isInHierarchy / mw.wikibase.getClosestInHierarchy in a loop? I wonder if it’s necessary to support

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-04-04 Thread Lucas_Werkmeister_WMDE
Lucas_Werkmeister_WMDE added a comment. What happens when Kreuzberg has more than one “instance of” statements? Should the surrounding Lua code then call mw.wikibase.isInHierarchy / mw.wikibase.getClosestInHierarchy in a loop? I wonder if it’s necessary to support a list of fromIds instead of a

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-04-04 Thread hoo
hoo added a comment. Moved this to review to gather comments about my proposal (T179155#4102708).TASK DETAILhttps://phabricator.wikimedia.org/T179155EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To: hooCc: Lucas_Werkmeister_WMDE, thiemowmde, Lydia_Pintscher,

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-04-03 Thread hoo
hoo added a comment. Given what I saw, I suggest the following interfaces: mw.wikibase.isInHierarchy( fromId, toId, propertyId ) -> bool or nil (returns nil in case the maximum recursion depth or some other limit was exhausted) Say we want to find out whether "Kreuzberg" (Q308928) is a

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-04-03 Thread hoo
hoo added a comment. Just as a note: I looked into (ab)using the pagelinks table for this purpose. If we want to link an entity to its parent, the pages in question must also be (indirectly) page-linked together. My idea was to get the (indirect) pagelinks from a to b first, and then check the

[Wikidata-bugs] [Maniphest] [Commented On] T179155: Find a better solution for dewiki's Modul:Wikidata isParent

2018-03-27 Thread hoo
hoo added a comment. So I looked into this a bit, to evaluate what is currently done. I was able to find the following variants of such a transitive lookup: dewiki-version: function p.isSubclass(frame) frwiki-versions (1, 2): function p.isSubclass(class, item, maxdepth)/function