This comes down to EditEntity::clearEntity which will make an api request to wbeditentity for a lexeme with the clear parameter forget about the formid counter.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Open | None | T194253 Configure the CI job that runs WikibaseLexeme's browser tests against test wikidata | |||
Resolved | Addshore | T168260 Deploy WikibaseLexeme extension on Wikimedia cluster | |||
Resolved | Addshore | T191457 Deploy WikibaseLexeme on www.wikidata.org | |||
Resolved | Addshore | T191458 Deploy WikibaseLexeme on test.wikidata.org | |||
Resolved | Lydia_Pintscher | T168263 WikibaseLexeme functional baseline | |||
Resolved | Jakob_WMDE | T192264 Clearing a Lexeme via wbeditentity will reset the FormId counter for the entity. |
Event Timeline
It might make sense for EntityDocument to have a clear() method in the interface. This could also be in some other service and not attached to the document itself.
Then in EditEntity::clearEntity instead of creating a new Entity you could create a copy() and call clear() which would have special handling for Lexeme (and also special handling for Property, which is currently hard coded in EditEntity)
Change 429792 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/Wikibase@master] [DNM] Let entities clear themselves
Change 430327 had a related patch set uploaded (by Addshore; owner: Addshore):
[mediawiki/vendor@master] Update wikibase/data-model to 7.4.0
Change 430372 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/WikibaseLexeme@master] Implement ClearableEntity for Form and Lexeme
Change 430386 had a related patch set uploaded (by Jakob; owner: Jakob):
[mediawiki/extensions/WikibaseLexeme@master] Test that using clear with wbeditentity does not reset nextFormId for lexemes
Change 430327 merged by jenkins-bot:
[mediawiki/vendor@master] Update wikibase/data-model to 7.5.0
Change 430372 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Implement ClearableEntity for Form and Lexeme
Change 429792 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Let entities clear themselves
Change 430386 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Test that using clear with wbeditentity does not reset nextFormId for lexemes
@Lydia_Pintscher https://wikidata-lexeme.wmflabs.org/index.php?title=Lexeme:L587&action=history
- created, added F1
- cleared
- added form -> assigned id is F2