Make WordPress Core

Opened 4 years ago

Closed 4 years ago

#52513 closed enhancement (fixed)

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

Reported by: afragen's profile afragen Owned by: afragen's profile 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 4 years ago.
update-beta.png (87.3 KB) - added by afragen 4 years ago.
update-RC.png (67.5 KB) - added by afragen 4 years ago.
release.png (21.4 KB) - added by afragen 4 years ago.
RC3.png (56.7 KB) - added by afragen 4 years ago.
We should commit this :wink:
52513.diff (1.2 KB) - added by SergeyBiryukov 4 years ago.

Download all attachments as: .zip

Change History (19)

@afragen
4 years ago

@afragen
4 years ago

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


4 years ago
#1

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
4 years ago

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

@afragen
4 years ago

#3 @afragen
4 years ago

  • Description modified (diff)

#4 @SergeyBiryukov
4 years ago

  • Milestone changed from Awaiting Review to 5.8

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


4 years ago

#6 @afragen
4 years ago

Props @pbiron for working through this with me.

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


4 years ago

#8 @hellofromTonya
4 years ago

  • Keywords needs-testing added

#9 @afragen
4 years 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
4 years ago

We should commit this :wink:

@SergeyBiryukov
4 years ago

#10 @SergeyBiryukov
4 years 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 4 years ago by SergeyBiryukov (previous) (diff)

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


4 years ago
#11

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

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

#12 @afragen
4 years ago

  • Keywords commit added

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

I say commit.

#13 @SergeyBiryukov
4 years 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.