Skip to content

Conversation

eviljeff
Copy link
Member

@eviljeff eviljeff commented Sep 3, 2025

Fixes: mozilla/addons#15804

Description

Fixes the scenario with an add-on with 2 channels, but only one channel available for rollback, where the channel selector was disabled. Now the field on the form is disabled instead so the initial channel value is correctly used.

Also fixes a (separate) bug where the explanation label isn't available because there's no channel selector (and the javascript that sets it is on the channel selector)

Context

I initially thought these two bugs were connected, but turns out they're for different scenarios (two channels, but only one channel available for rollback vs. only one channel)

Testing

  • Set-up an add-on with 2 or more approved versions in the unlisted channel (and nothing in the listed channel)
    • see the explanation text is present and changes with the version selection in the rollback form
    • rollback one of the versions
    • (refresh the versions page afterwards)
  • upload and approve a listed version
    • now the channel selector should be present but disabled on the rollback form
    • rollback an unlisted version again

optional - repeat with listed

  • upload and approve another listed version
  • see the rollback form has a functional channel selector
  • delete all but one unlisted version
  • see the channel selector is disabled and defaulted to listed; the explanation text is there and correct
  • rollback the latest listed version
  • delete the remaining unlisted version
  • see the channel selector is not present; the explanation text is there and correct

Checklist

  • Add #ISSUENUM at the top of your PR to an existing open issue in the mozilla/addons repository.
  • Successfully verified the change locally.
  • The change is covered by automated tests, or otherwise indicated why doing so is unnecessary/impossible.
  • Add before and after screenshots (Only for changes that impact the UI).
  • Add or update relevant docs reflecting the changes made.

@eviljeff eviljeff marked this pull request as ready for review September 3, 2025 12:25
@eviljeff eviljeff requested a review from diox September 3, 2025 12:26
@eviljeff eviljeff mentioned this pull request Sep 3, 2025
5 tasks
@eviljeff eviljeff requested a review from diox September 4, 2025 16:08
@eviljeff eviljeff merged commit 150ac3b into mozilla:master Sep 5, 2025
86 of 90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Cannot rollback to previous version if there is a single version in other channel
2 participants