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
New campaign condition: Contacts campaign #4800
New campaign condition: Contacts campaign #4800
Conversation
Label: Ready to test |
if (!empty($options['dataAddedLimit'])) { | ||
$q->andWhere( | ||
$q->expr()->{$options['expr']}('l.date_added', ':dateAdded') | ||
)->setParameter('dateAdded', $options['dateAdded']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the 2 lines above 4 spaces to the left.
@@ -596,6 +597,11 @@ | |||
'class' => 'Mautic\LeadBundle\Form\Type\CampaignEventLeadSegmentsType', | |||
'alias' => 'campaignevent_lead_segments', | |||
], | |||
'mautic.form.type.campaignevent_lead_campaigns' => [ | |||
'class' => 'Mautic\LeadBundle\Form\Type\CampaignEventLeadCampaignsType', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use ::class instead of string
$q->expr()->eq('l.lead_id', ':leadId'), | ||
$q->expr()->in('l.campaign_id', $options['campaigns']) | ||
) | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Move the 5 lines above 4 spaces to the left.
Use $q->expr()->in('l.campaign_id', ':campaignIds')
and $q->setParameter('campaignIds', $options['campaigns'], \Doctrine\DBAL\Connection::PARAM_INT_ARRAY)
to make this secure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's review now.
Hello @kuzmany, could you please fix CS fixer issues? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is working for me. CS fixer issues has to be resolved only. I will approve PR then.
@Maxell92 Since kuzmany is on vacation, can we do the code formatting for him? Looks straightforward, and it's unfortunate timing we just realized this when he is out. |
07d7784
to
b8fe681
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rebased and fixed CS fixer issue.
What happened with this merge? Does this mean it was released? |
@tony-brandner you can see the release in the right hand column as the milestone. It was merged to release 2.13.0 |
Description:
PR added new campaign condition based on campaign membership and date added to campaign.
Use cases
Steps to test this PR: