Page MenuHomePhabricator

Clarify the labels for ucstart and ucend
Closed, ResolvedPublic

Description

The labels shown for ucstart and ucend parameters in the list=usercontribs API query are as shown below.

Note that ucstart is the later timestamp and ucend is the earlier one (for example https://en.wikipedia.org/w/api.php?action=query&format=json&list=usercontribs&ucstart=2020-09-14T00%3A00%3A00.000Z&ucend=2019-09-14T00%3A00%3A00.000Z&ucuser=Huji returns results but https://en.wikipedia.org/w/api.php?action=query&format=json&list=usercontribs&ucstart=2019-09-14T00%3A00%3A00.000Z&ucend=2020-09-14T00%3A00%3A00.000Z&ucuser=Huji does not). The current label uses teh word "start timestamp" and "end timestamp" which implies the opposite, unless you know MW well-enough to relize that contribs are shown from later to earlier.

I suggest we change the labels to clearly say "earlier time" and "later time". Perhaps the top one can be changed to "The start timestamp to return form (i.e. revisions before this timestamp)" and the second one to "The end timestamp to return to (i.e. revisions after this timestamp)"

image.png (186×235 px, 2 KB)

Event Timeline

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

Looks straightforward, I'll take this on! :)

Change 690406 had a related patch set uploaded (by Slayful; author: Slayful):

[mediawiki/core@master] ApiQueryUserContribs: Clarify the labels for ucstart and ucend

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

Just switch the order, if the timestamp does not show anything. it is documented there:

https://en.wikipedia.org/w/api.php?modules=query+usercontribs

ucdir
In which direction to enumerate:

newer
List oldest first. Note: ucstart has to be before ucend.
older
List newest first (default). Note: ucstart has to be later than ucend.
One of the following values: newer, older
Default: older

And it works:
https://en.wikipedia.org/w/api.php?action=query&format=json&list=usercontribs&ucstart=2019-09-14T00%3A00%3A00.000Z&ucend=2020-09-14T00%3A00%3A00.000Z&ucuser=Huji&ucdir=newer

Change 690406 merged by jenkins-bot:

[mediawiki/core@master] ApiQueryUserContribs: Clarify the labels for ucstart and ucend

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