Page MenuHomePhabricator

Select a federated property to make a statement
Closed, ResolvedPublic8 Estimated Story Points

Description

When I select a federated property in the +add statement workflow, currently I get an error message that says "It is not possible to define a new value for a deleted Property."

We need to make it possible to select a federated property and add a statement before the saving story (T247593) can be worked on.

Event Timeline

From task breakdown:

https://phabricator.wikimedia.org/T248838

We found https://phabricator.wikimedia.org/T170245 that is slightly related to the area of code that we are thinking about

JS approach & trying to not do a wbgetentities api call here...

/**
*-1 - Fix https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/583301/ to actually wire up the data type meta data thingy

  • 0 - Create some kind of service thing that stores the property -> data type id map?
  • 0 - OR make sure we have the data type id at hand (from search or XXX)
  • 1 - The property already has a statement on the Item
  • - Can get the data-type from the entity data loaded via the entity data hook
  • 2 - Adding a new statement where the property has not been used before
  • - Need to remember the datatype from the search that was selected to be added */

Wikibase/view/resources/jquery/wikibase/snakview/snakview.variations.Value.js line 179 (.get call which causes wbgetentities call)

Wikibase/lib/resources/lib/jquery.ui/jquery.ui.suggester.js line 640 (_getSuggestions)
Wikibase/view/resources/jquery/wikibase/jquery.wikibase.entityselector.js line 283 (_getSearchApiParameters)
Wikibase/view/resources/jquery/wikibase/jquery.wikibase.entityselector.js line 556 (_getSuggestions)
Wikibase/lib/resources/lib/jquery.ui/jquery.ui.suggester.js line 519 (search)

#Creation of the entityselector for property selection
Wikibase/view/resources/jquery/wikibase/snakview/snakview.js line 382 (_getPropertySelector)

....................................................................................................

PHP & GetEntities approach

... TBA

Steps decided

  1. Write ticket to and investigate the JS approach and how possible it would be to not call wbgetentities to get to the property data type and instead do something else (see above)
  2. Fix https://gerrit.wikimedia.org/r/#/c/mediawiki/extensions/Wikibase/+/583301/ to actually wire up the data type meta data thingy
  3. Reconvene on Tuesday to discuss breakdown once more?

Change 584922 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/Wikibase@master] Avoid api request for looking up a property's data type

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