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

StatusAssignedTask
Declineddchen
OpenNone
OpenNone
DuplicateNone
OpenNone
ResolvedAbit
OpenNone
DuplicateNone
OpenNone
OpenNone
OpenNone
DuplicateNone
InvalidLydia_Pintscher
OpenNone
OpenNone
StalledNone
OpenNone
OpenNone
Resolvedthiemowmde
OpenNone
OpenNone
OpenNone

Event Timeline

matej_suchanek updated the task description. (Show Details)
matej_suchanek raised the priority of this task from to Needs Triage.
matej_suchanek added a project: Wikidata.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptJun 13 2015, 10:20 AM
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 Normal priority.
Mbch331 added a subscriber: Mbch331.Sep 9 2015, 7:32 AM
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)
Nikki added a subscriber: Nikki.May 30 2016, 11:09 AM

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...

hoo added a subscriber: hoo.Oct 10 2016, 9:14 AM
Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptOct 11 2016, 12:23 PM

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 Normal 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

Restricted Application added a subscriber: PokestarFan. · View Herald TranscriptJul 25 2017, 3:05 PM

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

Envlh awarded a token.Feb 5 2018, 9:17 AM
Envlh added a comment.Apr 13 2019, 2:59 PM

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.

Lea_Lacroix_WMDE removed thiemowmde as the assignee of this task.Apr 17 2019, 12:00 PM

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.

Envlh added a comment.Apr 17 2019, 4:16 PM

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