Skip to content

NEW Add event attendee to mass mailing based on their event attende status#37736

Closed
JonBendtsen wants to merge 15 commits intoDolibarr:developfrom
JonBendtsen:mailing_recipients_from_organized_event_choose_status
Closed

NEW Add event attendee to mass mailing based on their event attende status#37736
JonBendtsen wants to merge 15 commits intoDolibarr:developfrom
JonBendtsen:mailing_recipients_from_organized_event_choose_status

Conversation

@JonBendtsen
Copy link
Copy Markdown
Contributor

@JonBendtsen JonBendtsen commented Apr 3, 2026

NEW Add event attendee to mass mailing based on their event attende status

This PR can add event attendee to mass mailings based on the status of their event attendee registration. If you don't select any status you get them all, status filtering are only done as long as you select 1 or more statuses.

Best of all, these statuses are directly pulled from eventorganisation status fields, so if new are added, or changed, or ... then this should still work.

@JonBendtsen
Copy link
Copy Markdown
Contributor Author

Default view with the new status field

add_event_attendee_status_field

View when 2 statuses has been selected

add_event_attendee_status_field_2selected

}
}

if ($modulename == 'eventorganization') {
Copy link
Copy Markdown
Member

@eldy eldy Apr 7, 2026

Choose a reason for hiding this comment

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

Any filter added for target selection must be added into the method ->formFilter() called line 635 so into file
htdocs/core/modules/mailings/eventorganization.modules.php

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Just to make sure I completely under stand @eldy

Do you mean like this file where there is first a filter on being a supplier or not, and then a filter on status?
https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/core/modules/mailings/thirdparties.modules.php#L372

Similar seen here where first is a filter on payment status and then a filter on the type?
https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/core/modules/mailings/fraise.modules.php#L145

Copy link
Copy Markdown
Member

@eldy eldy Apr 12, 2026

Choose a reason for hiding this comment

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

I mean there is no reason to modify the code into the file targetemailing.php. This file is a generic file common to all targets selector. No specific code for target selector should be find here.

The fields to build a form are inside files
htdocs/core/modules/mailings/xxxx.modules.php
like it is for https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/core/modules/mailings/thirdparties.modules.php, https://github.com/Dolibarr/dolibarr/blob/develop/htdocs/core/modules/mailings/fraise.modules.php, or htdocs/core/modules/mailings/eventorganization.modules.php and more...

You must add all input fields inside one of this file. So your new input filter must be at the same place (same function) that the already existing filter, so into function
public function formFilter() of htdocs/core/modules/mailings/eventorganization.modules.php.

@eldy eldy added the PR to fix - Conflict or CI error to solve The PHP unit tests return something wrong. Check details to know what to fix or solve the conflicts. label Apr 7, 2026
@JonBendtsen
Copy link
Copy Markdown
Contributor Author

replaced with #37889

@JonBendtsen JonBendtsen deleted the mailing_recipients_from_organized_event_choose_status branch April 16, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

PR to fix - Conflict or CI error to solve The PHP unit tests return something wrong. Check details to know what to fix or solve the conflicts.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants