Page MenuHomePhabricator

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

Assigned To
None
Authored By
Ricordisamoa
May 28 2014, 10:12 AM
Referenced Files
None
Tokens
"Like" token, awarded by Louperivois."Love" token, awarded by Pintoch."Love" token, awarded by thiemowmde."Like" token, awarded by jayvdb."Love" token, awarded by Ricordisamoa.

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

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 subscribed.

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

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)
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.

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

Change 236537 abandoned by Addshore:
[mediawiki/extensions/Wikibase@master] [WIP] wbeditentity: use specific summary if only label or description changes

Reason:

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