Problem/Motivation

discovered in #3113292: Update module has no tests for changes to status of the installed release (revoked, etc)
The update module uses the label "Also available" when there are updates to other majors than it considers its target major.

Case A

  1. site installed 8.x-1.0
  2. 8.x-1. is a supported branch
  3. 8.x-1.1 release is in the XML and is shown to the user
  4. 8.x-2.0 is available

8.x-1.1 will be shown as "Recommended", 8.x-2.0 will be shown as "Also available". This is correct.

Case B

  1. site installed 8.x-1.0
  2. 8.x-1. is a supported branch
  3. 8.x-1.1 release is in the XML but is either unsupported or unpublished so it is not shown to the user
  4. 8.x-2.0 is available

8.x-2.0 will be shown as "Also available" even though there are no other updates to show. This is incorrect.

Case C

  1. site installed 8.x-1.0
  2. 8.x-1. is NOT a supported branch
  3. 8.x-1.1 release is in the XML but not shown because it is in a unsupported branch
  4. 8.x-2.0 is available

In this case, 8.x-2.0 will be shown as "Recommended". This is correct.

Proposed resolution

Never show "also available" if another update is not being shown.

Remaining tasks

  1. Add fail test for this.
  2. Update other tests?
  3. Fix behavior.
  4. Watch the fail test start passing.
  5. Review.
  6. RTBC.
  7. Commit.

User interface changes

In cases where only 1 update is available, always call it "Recommended", not "Also available".
No string change since "Recommended" and friends already exists.
Doesn't really "change" the UI, it's just fixing a labeling bug and re-using the existing interface for "Recommended".

API changes

Probably none.

Data model changes

None.

Release notes snippet

TBD. Probably not worth it.

Issue fork drupal-3114408

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

tedbow created an issue. See original summary.

dww’s picture

Title: Update module labels updates as "Also available" even when there are no other possible updates. » Update module labels updates as "Also available" even when there are no other possible updates
Issue summary: View changes

Good catch, thanks for opening this.

Fixed some formatting and grammar bugs in the summary, fleshed it out a bit.

Thanks,
-Derek

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

kunal.sachdev made their first commit to this issue’s fork.

kunal.sachdev’s picture

Issue summary: View changes

Changed 8.x-2.0 to 9.x-0.0 in summary as it will never show 8.x-2.0 as "Also Available" as it is the same major version as the installed version.

tedbow’s picture

Issue summary: View changes

I starting to think that the current behavior is correct.

I think originally I think I thought "Also Available" was not correct unless we had a "Recommended version". But currently in "Case B" the update report would show you as "Up to date". So maybe it "Also available makes in sense in that you could stay on 8.x-1.0 or you could update to 8.x-2.0. So "also" would refer to in addition to staying at your current version which is perfectly fine since it is secure and published and supported.

We definitely would not want to label 8.x-2.0 is "recommended" because then we are telling them we recommend they update to a new major when their current major might be fine and 8.x-1.1 might marked published at anytime or 8.x-1.2 or higher might be released.

The fact that nobody beside me @dww or @kunal.sachdev has commented on this issue may indicate that no site owner has found the current wording confusing. Obviously this situation much has happened on sites many times.

tedbow’s picture

Issue summary: View changes

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

dww’s picture

Status: Active » Closed (works as designed)
Issue tags: +Bug Smash Initiative

This came up as a random daily triage target in #bugsmash. I was summoned to review. 😂

Per #10:

I starting to think that the current behavior is correct...

As the original author of the current behavior, I heartily agree. 😅 The 3 scenarios in the summary spell it out. The only time this happens is if you're on a version that's okay, there's nothing newer available to recommend on your series, and another series is available. In that case (B), "Also available" is the right thing to say. You can stay put (which is up to date on your current series), or you can jump to a new series (at your own risk). This is all working as expected. Closing as such.

Thanks,
-Derek