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
- site installed 8.x-1.0
- 8.x-1. is a supported branch
- 8.x-1.1 release is in the XML and is shown to the user
- 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
- site installed 8.x-1.0
- 8.x-1. is a supported branch
- 8.x-1.1 release is in the XML but is either unsupported or unpublished so it is not shown to the user
- 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
- site installed 8.x-1.0
- 8.x-1. is NOT a supported branch
- 8.x-1.1 release is in the XML but not shown because it is in a unsupported branch
- 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
- Add fail test for this.
- Update other tests?
- Fix behavior.
- Watch the fail test start passing.
- Review.
- RTBC.
- 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
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:
- 3114408-update-module-labels
changes, plain diff MR !1540
Comments
Comment #2
dwwGood catch, thanks for opening this.
Fixed some formatting and grammar bugs in the summary, fleshed it out a bit.
Thanks,
-Derek
Comment #9
kunal.sachdev commentedChanged 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.
Comment #10
tedbowI 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.
Comment #11
tedbowComment #15
dwwThis came up as a random daily triage target in #bugsmash. I was summoned to review. 😂
Per #10:
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