Skip to content

Fixing boolean field filters in dynamic email content #14791

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

Open
wants to merge 2 commits into
base: 7.x
Choose a base branch
from

Conversation

dongilbert
Copy link
Member

… correctly.

Q A
Bug fix? (use the a.b branch) ✔️
New feature/enhancement? (use the a.x branch)
Deprecations?
BC breaks? (use the c.x branch)
Automated tests included?
Related user documentation PR URL mautic/user-documentation#...
Related developer documentation PR URL mautic/developer-documentation-new#...
Issue(s) addressed Fixes #...

Description

This PR fixes how boolean type custom fields render in dynamic content within the email builder. Currently, the options available for boolean fields are 0, 1, but it should be No, Yes as shown in the screenshot. This PR adds a new twig filter formFieldFlipBooleanList to address the issue.

Screenshot 2025-03-24 at 12 36 01 PM

📋 Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)

Copy link

codecov bot commented Mar 24, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 65.61%. Comparing base (167a04a) to head (5297210).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##                7.x   #14791   +/-   ##
=========================================
  Coverage     65.61%   65.61%           
- Complexity    34951    34952    +1     
=========================================
  Files          2299     2299           
  Lines        140579   140583    +4     
=========================================
+ Hits          92245    92248    +3     
- Misses        48334    48335    +1     
Files with missing lines Coverage Δ
...s/FormBundle/Twig/Extension/FormFieldExtension.php 94.11% <100.00%> (+1.80%) ⬆️

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@escopecz escopecz requested review from a team, dadarya0 and rahuld-dev and removed request for a team March 27, 2025 16:43
@escopecz escopecz added bug Issues or PR's relating to bugs custom-fields Anything related to custom fields unforking Used for PRs in the Acquia's unforking initiative dynamic-content ready-to-test PR's that are ready to test labels Mar 27, 2025
@escopecz escopecz added the code-review-needed PR's that require a code review before merging label Mar 27, 2025
@escopecz escopecz changed the title Add formFieldFlipBooleanList so that boolean fields render their list… Fixing boolean field filters in dynamic email content Mar 27, 2025
@escopecz escopecz moved this to 🦸🏻 Needs 2 tests in Open Source Fridays Mar 27, 2025
Copy link
Contributor

@dadarya0 dadarya0 left a comment

Choose a reason for hiding this comment

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

Thanks @dongilbert

@dadarya0 dadarya0 assigned rahuld-dev and unassigned dadarya0 Mar 28, 2025
Copy link
Contributor

@dadarya0 dadarya0 left a comment

Choose a reason for hiding this comment

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

Tested working fine.

image

@dadarya0 dadarya0 added ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged code-review-passed PRs which have passed code review user-testing-passed PRs which have been successfully tested by the required number of people. and removed ready-to-test PR's that are ready to test code-review-needed PR's that require a code review before merging ready-to-commit PR's with 2 successful tests, 1 approval, automated tests and docs and is ready to be merged labels Apr 1, 2025
@dadarya0 dadarya0 requested review from a team and nileshlohar and removed request for rahuld-dev and a team April 1, 2025 04:55
@dadarya0 dadarya0 requested a review from rahuld-dev April 1, 2025 04:55
@dadarya0 dadarya0 assigned nileshlohar and unassigned rahuld-dev Apr 1, 2025
@dadarya0 dadarya0 removed the request for review from rahuld-dev April 1, 2025 04:56
Copy link
Contributor

@nileshlohar nileshlohar left a comment

Choose a reason for hiding this comment

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

Code changes LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issues or PR's relating to bugs code-review-passed PRs which have passed code review custom-fields Anything related to custom fields dynamic-content unforking Used for PRs in the Acquia's unforking initiative user-testing-passed PRs which have been successfully tested by the required number of people.
Projects
Status: 🦸🏻 Needs 2 tests
Development

Successfully merging this pull request may close these issues.

5 participants