Page MenuHomePhabricator

Send edit request containing Sense data
Closed, ResolvedPublic8 Story Points

Description

Narrative:
As an editor of Wikidata-Lexeme I want to be able to Send edit request containing Sense data and the Lexeme will be saved entirely

Acceptance Criteria:

Given: Lexeme L1 exists
When: I send a change request to wbeditentity API that contains change to Sense data and references L1
Then: Lexeme L1 is saved
AND Requested changes to sense(s) are applied

By-example specification of the sense-related API request parts

Adding a sense

  • "via lexeme"
    • id = L1
    • data =
{
...
"senses": [
...
{
"add": "",
"glosses": { "en": { "language": "en", "value": "A widely cultivated plant, Solanum lycopersicum, having edible fruit." } }
}
...
]
...
}
  • "via sense"
    • new = sense
    • data =
{
"lexemeId": "L1",
"glosses": { "en": { "language": "en", "value": "A widely cultivated plant, Solanum lycopersicum, having edible fruit." } }
}

Editing sense glosses

  • "via lexeme"
    • id = L1
    • data =
{
...
"senses": [
...
{
"id": "L1-S2",
"glosses": { "en": { "language": "en", "remove": "" } }
}
...
]
...
}
  • "via sense"
    • id = L1-S2
    • data =
{
"glosses": { "en": { "language": "en", "remove": "" } }
}

Deleting a sense

  • "via lexeme" only
    • id = L1-S2
    • data =
{
...
"senses": [
...
{
"id": "L1-S2",
"remove": ""
}
...
]
...
}

Note: similar like in case of forms, changes to sense statement data using wbeditentity are NOT considered here.

Personas to take into account:
Alex - Data user in small startup

Details

Related Gerrit Patches:
mediawiki/extensions/WikibaseLexeme : masterWire sense deserialization into LexemeChangeOpDeserializer
mediawiki/extensions/WikibaseLexeme : masterAdd SenseListChangeOpDeserializer
mediawiki/extensions/WikibaseLexeme : masterAdd ChangeOpsSensesEdit

Event Timeline

Restricted Application added a project: Wikidata. · View Herald TranscriptJun 3 2018, 11:40 AM
Vvjjkkii renamed this task from Send edit request containing Sense data to lqbaaaaaaa.Jul 1 2018, 1:06 AM
Vvjjkkii triaged this task as High priority.
Vvjjkkii updated the task description. (Show Details)
CommunityTechBot renamed this task from lqbaaaaaaa to Send edit request containing Sense data.Jul 1 2018, 11:41 PM
CommunityTechBot raised the priority of this task from High to Needs Triage.
CommunityTechBot updated the task description. (Show Details)
WMDE-leszek updated the task description. (Show Details)Aug 21 2018, 11:14 AM
WMDE-leszek set the point value for this task to 8.
Restricted Application added a project: User-Ladsgroup. · View Herald TranscriptAug 21 2018, 11:36 AM

Change 454351 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/WikibaseLexeme@master] Add ChangeOpsSensesEdit

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

Change 454352 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/WikibaseLexeme@master] Add SenseListChangeOpDeserializer

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

Change 454353 had a related patch set uploaded (by Ladsgroup; owner: Amir Sarabadani):
[mediawiki/extensions/WikibaseLexeme@master] Wire sense deserialization into LexemeChangeOpDeserializer

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

The wbeditentity support via sense id is already supported and you can try it out. The patches I put up add the support via lexeme id.

Change 454351 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Add ChangeOpsSensesEdit

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

Change 454352 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Add SenseListChangeOpDeserializer

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

Change 454353 merged by jenkins-bot:
[mediawiki/extensions/WikibaseLexeme@master] Wire sense deserialization into LexemeChangeOpDeserializer

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

I just went through and tested all of the cases described in the ticket and they all work for me :)

Lydia_Pintscher closed this task as Resolved.Aug 27 2018, 9:12 AM