addons icon indicating copy to clipboard operation
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

Open AlexandraMoga opened this issue 2 years ago • 7 comments

Describe the problem and steps to reproduce it:

  1. Open AMO stage and do a blank search
  2. Sort search results by Recently Updated - https://addons.allizom.org/en-US/firefox/search/?sort=updated
  3. Go through the sorted results one by one and open their respective detail pages
  4. 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 (addon last_updated date)

┆Issue is synchronized with this Jira Task

AlexandraMoga avatar Mar 01 '22 10:03 AlexandraMoga

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.

bobsilverberg avatar Mar 01 '22 12:03 bobsilverberg

We need to decide what, if anything, needs to change here. @mconnormoz do you have any suggestions?

bobsilverberg avatar Mar 01 '22 12:03 bobsilverberg

  • 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 (addon last_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?

eviljeff avatar Mar 02 '22 14:03 eviljeff

See https://github.com/mozilla/addons/issues/13569 for background info

diox avatar Mar 02 '22 15:03 diox

See mozilla/addons#13569 for background info

😬 right, I should have remembered. /me steps away from the rabbit hole filled with hornets nests.

eviljeff avatar Mar 02 '22 15:03 eviljeff

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.

stale[bot] avatar Sep 21 '22 07:09 stale[bot]

Old Jira Ticket: https://mozilla-hub.atlassian.net/browse/ADDSRV-83

KevinMind avatar May 03 '24 17:05 KevinMind

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 on updated in the search API

The former is entirely backwards-compatible, the latter would require more care to not break search on deploy.

diox avatar May 13 '24 14:05 diox