WordPress.org

Make WordPress Core

Opened 2 months ago

Closed 6 weeks ago

#52513 closed enhancement (fixed)

Display version number in `update-core.php` Update button for beta/RC

Reported by: afragen Owned by: afragen
Milestone: 5.8 Priority: normal
Severity: normal Version: 5.7
Component: Upgrade/Install Keywords: has-patch has-screenshots needs-testing commit
Focuses: Cc:

Description (last modified by afragen)

In #51774 we added the version numbers to the buttons for Re-install. When the user is updating to a nightly, beta, or RC the button always displays Update to latest nightly.

I propose that we change this display Update to latest nightly only when the user is updating to nighties.

If the user is updating to the latest beta or RC, given their settings in the WP_AUTO_UPDATE_CORE constant or their settings in the Beta Tester plugin, then we should display that version number in the button. This would look like Update to version 5.7-beta3

It will also display the version in the next release, Update to version 5.7

This would provide better and more clear understanding of what the update will be.

Attachments (6)

update-nightly.png (84.0 KB) - added by afragen 2 months ago.
update-beta.png (87.3 KB) - added by afragen 2 months ago.
update-RC.png (67.5 KB) - added by afragen 2 months ago.
release.png (21.4 KB) - added by afragen 2 months ago.
RC3.png (56.7 KB) - added by afragen 7 weeks ago.
We should commit this :wink:
52513.diff (1.2 KB) - added by SergeyBiryukov 7 weeks ago.

Download all attachments as: .zip

Change History (19)

@afragen
2 months ago

@afragen
2 months ago

This ticket was mentioned in PR #998 on WordPress/wordpress-develop by afragen.


2 months ago

In #51774() we added the version number to the 'Re-install' button on update-core.php.

I propose we add the version number to the 'Update' button when the user is set to update to the next beta/RC whether they are using the WP_AUTO_UPDATE_CORE constant or the Beta Tester plugin.

The patch identifies the $update->current as a beta or rc offer by prep_match for 2 hyphens in the version number. 2 hyphens indicate a nightly, where a single hyphen indicates a beta or RC offer.

Trac ticket: https://core.trac.wordpress.org/ticket/52513

#2 @afragen
2 months ago

  • Owner set to afragen
  • Status changed from new to assigned

@afragen
2 months ago

#3 @afragen
2 months ago

  • Description modified (diff)

#4 @SergeyBiryukov
2 months ago

  • Milestone changed from Awaiting Review to 5.8

This ticket was mentioned in Slack in #core by afragen. View the logs.


2 months ago

#6 @afragen
2 months ago

Props @pbiron for working through this with me.

This ticket was mentioned in Slack in #core by afragen. View the logs.


7 weeks ago

#8 @hellofromTonya
7 weeks ago

  • Keywords needs-testing added

#9 @afragen
7 weeks ago

This should only effect non-nightly releases.

Easiest way to test is when using the Beta Tester plugin, uncomment the line in WP_Beta_Tester::filter_http_request() - line 165 and replace the data in the array with a "next version" to test.

$url = add_query_arg( 'pretend_releases', array( '5.7-RC2' ), $url );

Then go to update-core.php

The update-RC.png shows what a next RC release would look like, this screenshot was taken during beta cycle.

release.png shows what it will look like during the release to 5.7

Anything matching the prep_match() will display update-nightly.png as the version will be something like 5.7-RC1-12345 and this would designate a nightly.

@afragen
7 weeks ago

We should commit this :wink:

@SergeyBiryukov
7 weeks ago

#10 @SergeyBiryukov
7 weeks ago

Thanks for the patch!

In my testing, I've found that "Update to latest nightly" could use some additional clarity, as, depending on the settings, it could mean the latest nightly in the 5.6 or 5.7 branches, or trunk.

52513.diff would provide the following results:

5.6.3-alpha-50405Update to latest 5.6 nightly
5.7-RC3-50503Update to latest 5.7 nightly
5.8-alpha-50427Update to latest 5.8 nightly
5.6.2Update to version 5.6.2
5.7-RC3Update to version 5.7-RC3
5.7Update to version 5.7

Thoughts? :)

Last edited 7 weeks ago by SergeyBiryukov (previous) (diff)

This ticket was mentioned in PR #1077 on WordPress/wordpress-develop by afragen.


6 weeks ago

Update from Sergey's patch. It now works for beta/RC releases.

Trac ticket: https://core.trac.wordpress.org/ticket/52513

#12 @afragen
6 weeks ago

  • Keywords commit added

@SergeyBiryukov I've tested and can confirm that it works!

I say commit.

#13 @SergeyBiryukov
6 weeks ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 50506:

Upgrade/Install: Display version number on the "Update now" button on WordPress Updates screen.

Additionally, adjust the "Update to latest nightly" button to include the major version number of the nightly build.

This makes the button labels more accurate and provides more clear understanding of what the update will be.

Follow-up to [49984].

Props afragen, pbiron, SergeyBiryukov.
Fixes #52513.

Note: See TracTickets for help on using tickets.