Page MenuHomePhabricator

[Bug] Property suggestions for qualifiers and references are bad when adding new statements
Open, HighPublic

Description

When adding the first new statement together with qualifiers, property suggestions for qualifiers are same as for the main snak. The initial suggestion on empty items is P31 and P279. After clicking on [add qualifier], the suggestion for qualifiers is also P31 and P279. The same issue happens with references.

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
DuplicateNone
OpenFeatureNone
OpenFeatureNone
DuplicateNone
ResolvedNone
ResolvedNone
ResolvedNone
DuplicateNone
InvalidLydia_Pintscher
OpenNone
OpenNone
StalledNone
OpenNone
ResolvedAddshore
Resolvedthiemowmde
ResolvedAddshore
OpenNone
OpenNone

Event Timeline

matej_suchanek raised the priority of this task from to Needs Triage.
matej_suchanek updated the task description. (Show Details)
matej_suchanek added a project: Wikidata.
Lydia_Pintscher renamed this task from Property suggestions for qualifiers are useless to [Bug] Property suggestions for qualifiers are useless.Sep 7 2015, 2:19 PM
Lydia_Pintscher triaged this task as Medium priority.
matej_suchanek renamed this task from [Bug] Property suggestions for qualifiers are useless to [Bug] Property suggestions for qualifiers are sometimes useless.Sep 10 2015, 4:19 PM
matej_suchanek updated the task description. (Show Details)
Lydia_Pintscher renamed this task from [Bug] Property suggestions for qualifiers are sometimes useless to [Bug] Property suggestions for qualifiers and references are bad when adding new statements.Dec 30 2015, 10:33 PM
Lydia_Pintscher updated the task description. (Show Details)

Is it possible to hide these until we have a decent solution? People are getting confused by these, like adding statements as qualifiers.

Meanwhile I found where the bug comes from:
https://github.com/Wikidata-lib/PropertySuggester/blob/master/modules/ext.PropertySuggester.EntitySelector.js#L142-L152

_getPropertyContext: function() {
	if ( this._isInNewStatementView() ) {
		return 'item';
	} else if ( this._isQualifier() ) {
		return 'qualifier';
	} else if ( this._isReference() ) {
		return 'reference';
	} else {
		return null;
	}
},

Maybe if the order of these conditions changed...

I keep running into this one and it's quite annoying. I'm editing on https://www.wikidata.org/wiki/Q17343103 . I get the suggestion to add inception (P571) , so far so good. I enter "1822" and click add qualifier. My browser calls https://www.wikidata.org/w/api.php?action=wbsgetsuggestions&search=&context=item&format=json&language=en&continue=0&entity=Q17343103 (give me some property suggestions for item Q17343103), that's just the wrong API call. It should call https://www.wikidata.org/w/api.php?action=wbsgetsuggestions&properties=P571&context=qualifier . That returns the right properties.

Could you please either kill suggestions for qualifiers or fix this?

thiemowmde raised the priority of this task from Medium to High.May 15 2017, 10:15 AM

Change 356071 had a related patch set uploaded (by Matěj Suchánek; owner: Matěj Suchánek):
[mediawiki/extensions/PropertySuggester@master] Don't show suggestions for qualifiers/references of new statements

https://gerrit.wikimedia.org/r/356071

Change 356071 merged by jenkins-bot:
[mediawiki/extensions/PropertySuggester@master] Don't show suggestions for qualifiers/references of new statements

https://gerrit.wikimedia.org/r/356071

Hello,

@thiemowmde Are you still working on this issue?

Maybe this has been done with T102324#3474167 and it can be continued in T147117.

Maybe this has been done with T102324#3474167 and it can be continued in T147117.

When I create a new statement, I still don't have any suggestions for qualifiers (it's OK only after saving the statement). The bug was described in T186097 before being merged here.

Thanks for pinging again about this issue. This task is not worked on at the moment, I will check if we can bring it to the development process soon.

Thank you for the reply and for having clarified that this issue has no assignee at the moment.