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

Add new condition for organizer reminder #1328

Merged
merged 11 commits into from
Jun 3, 2024

Conversation

renintw
Copy link
Contributor

@renintw renintw commented May 27, 2024

Closes #1327

Description

In this PR, the checkbox For transparency report - triggered when NOT 'Running money through WPCS PBC' is added. As long as this option is checked, the reminder will determine whether the current WordCamp is running money through WPCS PBC. If not, it will send the email according to the time set below.

image
image

Testing Cases

  1. For transparency report - triggered when NOT 'Running money through WPCS PBC' is CHECKED
  • -30 days:

    • Running money through WPCS PBC -> Email is NOT sent.
    • NOT Running money through WPCS PBC -> Email is sent.
      image
      image
  • 7 days:

    • Running money through WPCS PBC -> Email is NOT sent.
    • NOT Running money through WPCS PBC & "Transparency Report Received" checked -> Email is NOT sent.
    • NOT Running money through WPCS PBC & "Transparency Report Received" NOT checked -> Email is sent.
      image
      image
  • 14 days:

    • Running money through WPCS PBC -> Email is NOT sent.
    • NOT Running money through WPCS PBC & "Transparency Report Received" checked -> Email is NOT sent.
    • NOT Running money through WPCS PBC & "Transparency Report Received" NOT checked -> Email is sent.
      image
      image
  1. For transparency report - triggered when NOT 'Running money through WPCS PBC' is first CHECKED

The test here is to ensure that if For transparency report - triggered when NOT 'Running money through WPCS PBC is not checked, then this reminder email should be sent regardless of whether "Running money through WPCS PBC" is checked or not.

  • Running money through WPCS PBC -> Email is NOT sent.

Then NOT CHECKED

  • Running money through WPCS PBC -> Email is sent.

image

How to test the changes in this Pull Request:

Same as #1290 (comment)

@renintw renintw force-pushed the add-new-condition-for-ogreminder branch from 430ded6 to 2762c30 Compare May 28, 2024 01:07
@renintw renintw marked this pull request as ready for review May 28, 2024 03:22
@renintw renintw requested a review from pkevan May 30, 2024 15:03
update_post_meta( $post->ID, 'wcor_send_when', $new_meta['wcor_send_when'] );
}
}

delete_post_meta( $post->ID, 'wcor_transparency_report' );
if ( isset( $new_meta['wcor_transparency_report'] ) ) {
update_post_meta( $post->ID, 'wcor_transparency_report', $new_meta['wcor_transparency_report'] );
Copy link
Contributor

Choose a reason for hiding this comment

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

lets make sure to have some sanitization around this since it's just saving from $_POST

Copy link
Contributor Author

@renintw renintw Jun 3, 2024

Choose a reason for hiding this comment

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

Copy link
Contributor

@pkevan pkevan left a comment

Choose a reason for hiding this comment

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

As per inline comment.

@renintw renintw requested a review from pkevan June 3, 2024 05:14
@renintw renintw force-pushed the add-new-condition-for-ogreminder branch from 296890e to cd7999e Compare June 3, 2024 06:34
Copy link
Contributor

@pkevan pkevan left a comment

Choose a reason for hiding this comment

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

👍

@renintw renintw merged commit 2ecbc65 into production Jun 3, 2024
3 checks passed
@renintw renintw deleted the add-new-condition-for-ogreminder branch June 3, 2024 20:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The reminder email should only be sent if the event is not "Running money through WPCS PBC"
2 participants