addons
addons copied to clipboard
Search results sorted by `updated` can be confusing when compared with the Last update date from the add-on detail page
Describe the problem and steps to reproduce it:
- Open AMO stage and do a blank search
- Sort search results by Recently Updated - https://addons.allizom.org/en-US/firefox/search/?sort=updated
- Go through the sorted results one by one and open their respective detail pages
- Check the Last Update date in the More info section
What happened?
The Last Update dates in the addon detail pages do not always have a recent date, which gives the impression that the sort option is not working properly
What did you expect to happen?
When sorting search results by updated, you'd expect the Last update date from the add-on detail pages to be ordered in a descending order as well.
Anything else we should know?
I thinks this discrepancy happens because the search results are sorted by the add-on last_updated
date, while the detail page is using the current_version
created date to populate the Last update field.
Some examples, since the search result list can change and may not reflect the issue I'm mentioning:
- this addon appears high on the sorted results list, but the detail page says the add-on was updated a month ago; in this add-ons case, a new version was submitted, approved and then deleted, but the add-on
last_update
date still marks that change - this addon appears high on the sorted results list, but the detail page says the add-on was updated three months ago; in this add-ons case, the submission happened three months ago (
current_version
created date) while the actual Approval was done only recently (addonlast_updated
date)
┆Issue is synchronized with this Jira Task
It seems like this is an addons-server issue, regardless of whether the fix is to change the search results or to change what is displayed for an add-on on the detail page for Last update, so I will move it there.
We need to decide what, if anything, needs to change here. @mconnormoz do you have any suggestions?
- this addon appears high on the sorted results list, but the detail page says the add-on was updated three months ago; in this add-ons case, the submission happened three months ago (
current_version
created date) while the actual Approval was done only recently (addonlast_updated
date)
Why isn't frontend displaying the add-on last_updated
field on the detail page? Or is the label not clear on what the date is?
See https://github.com/mozilla/addons/issues/13569 for background info
See mozilla/addons#13569 for background info
😬 right, I should have remembered. /me steps away from the rabbit hole filled with hornets nests.
This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.
Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-83
One simple fix for this would be to ignore last_updated
when searching and use current_version.created
instead, since we're always searching through public add-ons anyway.
We could achieve that through 2 different ways:
- In the index, fill
last_updated
from<Addon>.current_version.created
instead of<Addon>.last_updated
. It's slightly less accurate, introduces a slight inconsistency with the detail API, but probably acceptable - Index
current_version.created
and use that when sorting onupdated
in the search API
The former is entirely backwards-compatible, the latter would require more care to not break search on deploy.