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

When a user creates an event, she should be attending right away #105

Merged
merged 4 commits into from
Feb 21, 2024

Conversation

amieiro
Copy link
Collaborator

@amieiro amieiro commented Feb 19, 2024

When a user creates an event, she should be attending right away.

To test this PR:

  • Create a new event, clicking in the "Publish event" button just after filling the text fields. You should be attending to the event.
  • Create a new event, clicking in the "Save Draft" button just after filling the text fields. You should not be attending to the event. Update some text field and click in the "Publish event" button. Now you should be attending to the event.

Fixes #88.

@amieiro amieiro requested review from trymebytes, psrpinto and akirk and removed request for trymebytes and psrpinto February 19, 2024 19:10
@@ -222,6 +227,18 @@ function submit_event_ajax() {
);
$response_message = 'Event updated successfully!';
}
// The user who creates the event will assist to it when it's published.
if ( ( 'create_event' === $action && 'publish' === $event_status ) || ( 'edit_event' === $action && 'publish' === $event_status && 'draft' === $previous_status ) ) {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@amieiro amieiro requested a review from akirk February 19, 2024 20:10
Copy link
Member

@psrpinto psrpinto left a comment

Choose a reason for hiding this comment

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

Tested 👌

@amieiro amieiro merged commit f896a69 into trunk Feb 21, 2024
2 checks passed
@amieiro amieiro deleted the attend-own-events branch February 21, 2024 08:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

When you create an event, you should be attending right away
3 participants