Page MenuHomePhabricator

Protection log api parameters should have formatted description
Open, Needs TriagePublic

Description

In the watchlist api (and others) for protection log entries the parameters include a description, but it lacks the formatting of the displayed description, which comes from ProtectLogFormatter::createProtectDescription()

We should expand the details into the displayed form, perhaps saving it with a separate key so that anything relying on the current description isn't broken.

For example, for https://meta.wikimedia.org/w/index.php?title=Special:Log&logid=43068557 the rendered description is
[Edit=Allow only autoconfirmed users] (indefinite) [Move=Allow only autoconfirmed users] (indefinite) but the api description is ‎[edit=autoconfirmed] (indefinite)‎[move=autoconfirmed] (indefinite)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 716098 had a related patch set uploaded (by DannyS712; author: DannyS712):

[mediawiki/core@master] ProtectLogFormatter: include parsed description for api

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

I'm sorry that I haven't handled this task. I recently returned from a long bout of unexpected inactivity, and while I plan to resume my contributions here on Phabricator its unfair to claim tasks that I might not work on when others may be interested in handling them. I'm removing myself as the assignee in a batch-action, but if someone feels that I really should be the one to handle this task feel free to re-assign me and I'll take a look.