guergana.tzatchkova created this task. guergana.tzatchkova added a project: Wikidata Query Builder. Restricted Application added a subscriber: Aklapper. Restricted Application added a project: Wikidata.
TASK DESCRIPTION **List of steps to reproduce** (step by step, including full links if applicable): - select property P18 <https://phabricator.wikimedia.org/P18> (image) it is automatically regardless of value) - create a different property and unite with OR or AND again with P18 <https://phabricator.wikimedia.org/P18> - click "Run Query" button Example in QB <https://w-beta.wmflabs.org/Hj> **Actual Results (what happens?)**: Error: `Query is malformed: BNodeID already used in another scope: anyValueP18` because `anyValueP18` should have an index. should be `anyValueP18_0` and `anyValueP18_1`: SELECT DISTINCT ?item WHERE { { ?item p:P281 ?statement0. ?statement0 (ps:P281) "6200". } UNION { ?item p:P18 ?statement1. ?statement1 (ps:P18) _:anyValueP18. } { ?item p:P30 ?statement2. ?statement2 (ps:P30/(wdt:P279*)) wd:Q46. } UNION { ?item p:P18 ?statement3. ?statement3 (ps:P18) _:anyValueP18. } } LIMIT 100 **Expected Results (what should have happened?)**: The following SPARQL should have been generated SELECT DISTINCT ?item WHERE { { ?item p:P281 ?statement0. ?statement0 (ps:P281) "6200". } UNION { ?item p:P18 ?statement1. ?statement1 (ps:P18) _:anyValueP18_0. } { ?item p:P30 ?statement2. ?statement2 (ps:P30/(wdt:P279*)) wd:Q46. } UNION { ?item p:P18 ?statement3. ?statement3 (ps:P18) _:anyValueP18_1. } } LIMIT 100 TASK DETAIL https://phabricator.wikimedia.org/T279945 WORKBOARD https://phabricator.wikimedia.org/project/board/4990/ EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: guergana.tzatchkova Cc: Aklapper, guergana.tzatchkova, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs