Add & Edit Forms via wbeditentity
Closed, ResolvedPublic5 Story Points

Description

AC:

  • wbeditentity allows adding and editing of Lexeme forms per the same business logic implemented in wbladdform & wbleditformelements
    • forms can be editited as properties of Lexeme (using lexeme id [e.g. L1] as entity identifier to wbeditentity)
    • individual forms can be editited as form entities (using form id [e.g. L1-F2] as entity identifier to wbeditentity)
  • id is used instead of formId to identify forms inside wbeditentity (forms[]{ id: ... }), wbladdform, wbleditformelements

Info:

  • Rename of formId to id was done for wblremoveform in T189673 / https://gerrit.wikimedia.org/r/#/c/422099/
  • RemoveFormConstraint::many() describes (parts of) a Lexeme entity, not only the forms part as the name suggests. To allow for more actions (add, edit), this should be split - e.g. a collection in RemoveFormConstraint::many(), and a LexemeConstraint that describes the properties and different (action) constraints for them
Restricted Application added a project: Wikidata. · View Herald TranscriptMar 28 2018, 8:40 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Pablo-WMDE updated the task description. (Show Details)Mar 28 2018, 8:49 AM
RazShuty set the point value for this task to 5.
Pablo-WMDE updated the task description. (Show Details)Apr 6 2018, 6:37 AM
Pablo-WMDE added subscribers: WMDE-leszek, Addshore.
Pablo-WMDE claimed this task.
Pablo-WMDE removed Pablo-WMDE as the assignee of this task.Apr 10 2018, 7:26 AM

As it came out in the discussion documented in T190060 I note that it was decided that single representation should be represented using a structure: { "language": "en", "value": "colour" }. Note the "value" property being used instead of "representation".
That structure is intended to be used in all API dealing with doing changes to a form, i.e. not only wbeditentity, but also wbladdform, and wbleditformelements.

Pablo-WMDE updated the task description. (Show Details)Apr 17 2018, 12:42 PM

Change 431530 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] FormStore: Encapsulate logic used to update forms

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

Change 431791 had a related patch set (by Pablo Grass (WMDE)) published:
[mediawiki/extensions/Wikibase@master] ChangeOps: Add exception type for apply-time

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

Change 431791 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] ChangeOps: Add exception type for apply-time

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

This is almost done. One bug fixing patch (not handling the error in a particular use case) still awaits review before this goes to product review: https://gerrit.wikimedia.org/r/#/c/433751/

WMDE-leszek removed WMDE-leszek as the assignee of this task.May 19 2018, 7:33 AM
WMDE-leszek moved this task from Doing to Peer Review on the Wikidata-Turtles-Sprint #5 board.
Lydia_Pintscher closed this task as Resolved.May 23 2018, 9:38 AM
Lydia_Pintscher claimed this task.