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.

Event Timeline

@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

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

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)

I believe this is done, but have not confirmed.

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

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