Page MenuHomePhabricator

[Task] Create mediainfo entity on demand when adding a statement the first time
Closed, ResolvedPublic

Description

This ticket is about creating a mediainfo entity on demand when adding a statement for the first time. A related task is T134259 which is about creating a mediainfo entity on demand when hitting save the first time after adding labels, descriptions and/or aliases.

Discussed with @daniel. Possible task breakdown:

  • Refactor EntitySavingHelper:
    • Simple refactoring (without introducing new functionality) of EntityLoading and SavingHelper to EntitySavingHelper extends EntityLoadingHelper. Or use composition so that the SavingHelper gets a LoadingHelper.
    • Add new features to Loading and SavingHelper to support auto-creation of entities.
  • Support editing non-existing MediaInfo entities via SetClaim API module
    • Support auto-creation and the new parameter in all API modules that are not based on ModifyEntity.
    • Possibly discuss if the new parameter really should be supported by all API modules.

Details

Related Gerrit Patches:
mediawiki/extensions/Wikibase : master[WIP] AQllow entity creation from API modules that use EntitySavingHelper
mediawiki/extensions/Wikibase : masterFix doc and consistency issues in EntitySavingHelper(Test)
mediawiki/extensions/Wikibase : masterFix bad check for $revid.
mediawiki/extensions/Wikibase : masterMove logic for creating entities on the fly into EntitySavingHelper.
mediawiki/extensions/Wikibase : masterMove logic for getting IDs from parameters into EntityLoadingHelper.
mediawiki/extensions/Wikibase : masterGeneric handling of baserevid for EntitySavingHelper
mediawiki/extensions/Wikibase : masterMake EntitySavingHelper extend EntityLoadingHelper.

Related Objects

Event Timeline

Restricted Application added subscribers: Zppix, Aklapper. · View Herald TranscriptJul 19 2016, 2:16 PM

@daniel if there are already patches up that go in this direction, can you please link them?

Change 294365 had a related patch set uploaded (by Tobias Gritschacher):
Allow entities to be created from more API modules.

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

@daniel I've changed the commit message of https://gerrit.wikimedia.org/r/294365 to point to this task.

Change 294365 had a related patch set uploaded (by Daniel Kinzler):
Allow entities to be created from more API modules.

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

thiemowmde triaged this task as Medium priority.Aug 8 2016, 3:05 PM
thiemowmde updated the task description. (Show Details)
thiemowmde edited subscribers, added: thiemowmde, Jonas, Lydia_Pintscher; removed: gerritbot.

Change 303585 had a related patch set uploaded (by Daniel Kinzler):
Make EntitySavingHelper extend EntityLoadingHelper.

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

Change 303600 had a related patch set uploaded (by Daniel Kinzler):
Generic handling of baserevid for EntitySavingHelper

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

Change 303812 had a related patch set uploaded (by Thiemo Mättig (WMDE)):
Fix doc and consistency issues in EntitySavingHelper(Test)

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

Change 303585 merged by jenkins-bot:
Make EntitySavingHelper extend EntityLoadingHelper.

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

Change 303844 had a related patch set uploaded (by Daniel Kinzler):
[WIP] Move logic for getting IDs from parameters into EntityLoadingHelper.

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

Change 303600 merged by jenkins-bot:
Generic handling of baserevid for EntitySavingHelper

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

Jonas assigned this task to daniel.Aug 12 2016, 11:35 AM
Jonas moved this task from Backlog to Doing on the Wikidata-Sprint-2016-08-02 board.

Change 303844 merged by jenkins-bot:
Move logic for getting IDs from parameters into EntityLoadingHelper.

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

Change 303616 merged by jenkins-bot:
Move logic for creating entities on the fly into EntitySavingHelper.

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

hoo updated the task description. (Show Details)Aug 19 2016, 1:48 AM
hoo updated the task description. (Show Details)

I believe this is done, but have not confirmed.

hoo added a subscriber: hoo.Aug 19 2016, 2:14 PM

I believe this is done, but have not confirmed.

The second bullet point from the task description is still open, isn't it?

Change 306236 had a related patch set uploaded (by Daniel Kinzler):
Fix bad check for $revid.

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

Change 306236 merged by jenkins-bot:
Fix bad check for $revid.

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

daniel closed this task as Resolved.Aug 24 2016, 9:31 AM
daniel moved this task from Review to Done on the Wikidata-Sprint-2016-08-16 board.

Change 303812 merged by jenkins-bot:
Fix doc and consistency issues in EntitySavingHelper(Test)

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

Change 294521 abandoned by Daniel Kinzler:
[WIP] AQllow entity creation from API modules that use EntitySavingHelper

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