Page MenuHomeSoftware Heritage

Origin visits API: should sort by visit id
Closed, MigratedEdits Locked

Description

https://archive.softwareheritage.org/api/1/origin/65629228/visits/?last_visit=130 shows visits sorted in a random order.

They should really be sorted by visit id. Note that this somehow prevents from seeing the next page.

Event Timeline

Actually the visits are sorted in ascending order based on their termination date (see https://forge.softwareheritage.org/source/swh-storage/browse/master/swh/storage/db.py;86d68a672bc3243fe8d3252b7c757675e734c478$520).
So I think, the best option here is to change the ordering of visits directly in swh-storage (either by id or by date).

zack claimed this task.
zack added a subscriber: zack.

@olasd was right with the duplicate mention wrt T1050. I'm keeping that one instead of this one, as the problem statement since clearer there.
I've no specific idea/preference of where this should be implemented (storage v. webui)