Page MenuHomePhabricator

Messages "Apihelp-query+revisions-param-startid" and "Apihelp-query+revisions-param-endid" have wrong wording
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What should have happened instead?:

  • Rewrite to: "Start enumeration at this revision's ID.". / : "Stop enumeration at this revision's ID."

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

Event Timeline

Change #1089273 had a related patch set uploaded (by Wargo; author: Wargo):

[mediawiki/core@master] Replace `timestamp` to `ID`

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

@thiemowmde thanks for the comment. I am replying here, because it is better place and I cannot make replies there.

What should I put in these fields? What if I put a timestamp? Note there also pair of timestamp fields in this API.

I'm afraid I don't understand your questions, sorry. What about Enumerate starting with the timestamp from the given revision. The revision must exist, but doesn't necesssarily need to belong to this page.?

We are talking about rvstartid, not, rvstart.
These are two separate options.
https://www.mediawiki.org/w/api.php?action=help&modules=query%2Brevisions

I know. What's left being unclear?

You suggest rvstartid is for providing timestamp instead of revision ID?

I'm really sorry, but I don't understand what you mean. There is an existing field for providing a timestamp called "start". But that's not what's discussed here. I found it helpful to read the code to understand better how the different "start"/"startid" and "end"/"endid" fields interact.

Yes, this is how it converts them internally. But purpose is to provide (in API call) ID to startid and if you want to provide timestamp instead, start.

https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/api/ApiQueryRevisions.php$458 (yes, timestamps can be integer as number of seconds but this is not the case here).

https://phabricator.wikimedia.org/source/mediawiki/browse/master/includes/api/ApiQueryRevisions.php$250 to line 257 explain what is searched using this field.

Here you can look in practice: https://www.mediawiki.org/wiki/Special:ApiSandbox#action=query&format=json&prop=revisions&list=&formatversion=2 Note two pairs of fields and their types.

I really don't know what else I could add. The change currently suggested in https://gerrit.wikimedia.org/r/1089273 is wrong or at least misleading. Start enumeration from this revision's ID sounds like the entries would be filtered and odered based on their revision ids. But this is not what happens. The entries are filtered and ordered starting with the timestamp of the revision identified by the revision id in start.

Update from discussion on Gerrit.

The part 's has important impact on understanding this message.

There is proposal from @Tacsipacsi for making this clearer. What all do you think?

Change #1089273 merged by jenkins-bot:

[mediawiki/core@master] Clarify apihelp-query+revisions-param-startid/endid

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

matmarex subscribed.

So to summarize, the previous message was technically correct, but very easy to misunderstand.

In the final version of the patch, it was rephrased to: "Start enumeration from the timestamp of the revision with this ID".