Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix incorrect recurrence display for events with invalid schedules #99

Conversation

MiguelAxcar
Copy link
Contributor

@MiguelAxcar MiguelAxcar commented Aug 25, 2023

Overview

This pull request is address issue reported in #52, where a cron event with invalid schedule was showing invalid information in the recurrence column.

Changes

  • A Test-Driven Development (TDD) approach is used for write tests first, reproducing the issue.
  • Code has been updated for handling scenario where schedule was previously valid but no longer exists.
  • If recurrence schedule for event is missing, recurrence column now display "Non-repeating", adhering to user expectations.

Details

  • Modified Cron_Event_Command class to check if schedule exists before formatting recurrence.
  • Added scenario in feature tests for cover both cases where schedule exists and where it not.

Testing

The pull request include new test cases that cover described scenario, ensure that recurrence display is handled correct.

Impact

This fix make better reliability of wp cron event list command, providing accurate informations about event recurrence.

I kindly request review of these changes, and I'm available for any further discussion or adjustments as needed.

I would like to also thank @schlessera and @danielbachhuber for the support provided during 2023 WordCamp US Contributor Day.

Related wp-cli/wp-cli#5832

@MiguelAxcar MiguelAxcar requested a review from a team as a code owner August 25, 2023 03:14
@swissspidy swissspidy linked an issue Aug 25, 2023 that may be closed by this pull request
@danielbachhuber danielbachhuber added this to the 2.2.3 milestone Aug 27, 2023
Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work on this, @MiguelAxcar ! Way to stick with it 💪

@danielbachhuber danielbachhuber merged commit 3de548b into wp-cli:main Aug 27, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants