Page MenuHomePhabricator

wbeditentity: try to use appropriate autocomment instead of the generic one
Open, HighPublic

Description

When changing an item's content with the wbeditentity API, the extension always uses 'wikibase-item-summary-wbeditentity-update' as autocomment, while it should autodetect changes and use, e.g. 'wikibase-item-summary-wbsetlabel-add', 'wikibase-item-summary-wbsetdescription-set', etc.
Also for adding/editing claims, references and qualifiers.

so we could avoid workarounds like Gerrit change https://gerrit.wikimedia.org/r/#/c/130811/

*not* a duplicate of T44947

See also: T93853

Details

Reference
bz65846

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 3:11 AM
bzimport set Reference to bz65846.
bzimport added a subscriber: Unknown Object (MLST).

Guys: Can you say something about how hard/time-consuming this is to do?

As a further improvement, but less important: the software could build even more specific autocomments like "added a sitelink and 2 statements, removed 3 labels and 18 aliases".

Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
Lydia_Pintscher removed a subscriber: Unknown Object (MLST).
thiemowmde raised the priority of this task from Low to High.Aug 4 2015, 2:50 PM
thiemowmde set Security to None.
thiemowmde added a subscriber: thiemowmde.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptAug 4 2015, 2:50 PM

This was recently discussed in https://gerrit.wikimedia.org/r/130811 and T107712: Use narrow API calls instead of wbeditentity in Pywikibot. Raising priority because in my opinion this is part of T90435: [Epic] Wikidata watchlist improvements (client), which is part of our annual plan.

jayvdb awarded a token.Aug 6 2015, 3:29 PM
Ricordisamoa updated the task description. (Show Details)Sep 4 2015, 1:14 AM
Addshore added a comment.EditedSep 7 2015, 10:57 AM

partly related T111649

Change 236537 had a related patch set uploaded (by Ricordisamoa):
[WIP] wbeditentity: use specific summary if only label or description changes

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

daniel added a comment.Sep 7 2015, 2:21 PM

How about letting the ChangeOp generate the summary? If tehre is only one change op, use that summary. Otherwise, generate a generic one.

Addshore updated the task description. (Show Details)Feb 3 2016, 10:40 AM
Addshore updated the task description. (Show Details)
Addshore updated the task description. (Show Details)

A while back I started a very rough concept of how this might work.
https://github.com/wmde/WikibaseDataModelServices/commit/7eaaf4ed7f3ce16333eabafbd9b0659715c6697c
Something takes to versions of an Entity and tries to describe the changes between them.
Might be even easier to do with Diff... (if we can get easy structured info about what has changed).
Wikibase could then just make a summary out of this.

One open question is where to store the extended summary. The revision table only has room for 255 bytes (the UI allows 200 characters). See T6714: Epic: Increasing the length of the edit summary.

For the recentchanges table, we can get around that limit by storing an extended version in the rc_info blob. Would it be feasible to add such a field to the revision table? Or add a revision_props table, similar to the page_props table?

One open question is where to store the extended summary. The revision table only has room for 255 bytes (the UI allows 200 characters). See T6714: Epic: Increasing the length of the edit summary.

Yep, size of the summary field would be a big issue. (Note: T6714 is on the GTWL but not been tackled yet.)

For the recentchanges table, we can get around that limit by storing an extended version in the rc_info blob. Would it be feasible to add such a field to the revision table? Or add a revision_props table, similar to the page_props table?

Whatever happens it defiantly has to also happen for the revision table.
I mean, it might make sense for core to be able to handle structured summaries? Store a blob describing the summary, and then things can render that however they choose? ;)

For reference, please see what I have done in SpecialSetLabelDescriptionAliases::modifyEntity(). It tries hard to minimize the generic summary line "changed … label, description and aliases" (wikibase-entity-summary-wbsetlabeldescriptionaliases) to either "changed … label" or "… description" or "… aliases", if only one changed.

Addshore moved this task from incoming to ready to go on the Wikidata board.May 11 2016, 1:49 PM

Bumping this as we're getting more requests to get this done.