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

Email draft feature #13613

Open
wants to merge 14 commits into
base: 5.x
Choose a base branch
from
Open

Email draft feature #13613

wants to merge 14 commits into from

Conversation

dadarya0
Copy link
Contributor

@dadarya0 dadarya0 commented Apr 9, 2024

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

Description:

Add 'email_draft_enabled' => true in local.php for enable email draft functionality.

Users would like to be able to edit a published email and be able to preview changes without them being published.

Workflow :

  • A user has a published email and wants to make a change to it.
  • The user will will create a draft from the email which is a clone of the email HTML content.
  • The user will make the changes in the draft email HTML.
  • The user may send the draft (webview preview) email to review to other person.
  • When the change is approved the user can merge the change back to the original email or discard draft anytime.

Steps to test this PR:

  1. Open this PR on Gitpod or pull down for testing locally (see docs on testing PRs here)
  2. Add 'email_draft_enabled' => true in local.php for enable email draft functionality.
  3. verify Icon on Email List page to show Draft if draft saved
  4. User must be able to save their edits as a draft from the Edit Email screen using Save draft button
  5. Verify Preview Draft URL must reflect draft state if it exists. verify email Preview should work as it is.
  6. User must be able to push draft state to published state using Apply Draft button
  7. User must be able to discard draft using discard draft button

Liju P M and others added 2 commits April 9, 2024 15:47
@dadarya0 dadarya0 added the WIP PR's that are not ready for review and are currently in progress label Apr 9, 2024
@dadarya0 dadarya0 requested a review from mabumusa1 as a code owner April 9, 2024 10:38
Copy link

codecov bot commented Apr 19, 2024

Codecov Report

Attention: Patch coverage is 85.89744% with 33 lines in your changes are missing coverage. Please review.

Project coverage is 61.46%. Comparing base (714ba98) to head (ae209b0).

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##                5.x   #13613      +/-   ##
============================================
+ Coverage     61.39%   61.46%   +0.07%     
- Complexity    34034    34122      +88     
============================================
  Files          2240     2244       +4     
  Lines        101714   101926     +212     
============================================
+ Hits          62443    62652     +209     
- Misses        39271    39274       +3     
Files Coverage Δ
...undles/EmailBundle/Controller/PublicController.php 56.64% <100.00%> (+1.05%) ⬆️
app/bundles/EmailBundle/Entity/Email.php 91.28% <100.00%> (+0.98%) ⬆️
...bundles/EmailBundle/Event/EmailEditSubmitEvent.php 100.00% <100.00%> (ø)
app/bundles/EmailBundle/Form/Type/EmailType.php 98.08% <100.00%> (+0.26%) ⬆️
app/bundles/EmailBundle/Helper/EmailConfig.php 100.00% <100.00%> (ø)
app/bundles/EmailBundle/Model/EmailDraftModel.php 82.35% <82.35%> (ø)
...es/CoreBundle/Doctrine/AbstractMauticMigration.php 6.77% <0.00%> (-0.50%) ⬇️
...bundles/EmailBundle/Controller/EmailController.php 61.00% <91.83%> (+5.78%) ⬆️
...dles/EmailBundle/EventListener/EmailSubscriber.php 81.39% <85.10%> (+3.34%) ⬆️
app/bundles/EmailBundle/Entity/EmailDraft.php 68.75% <68.75%> (ø)

... and 1 file with indirect coverage changes

@RCheesley
Copy link
Sponsor Member

Awesome looking feature @dadarya0 - it looks like there's some conflicts to be resolved before we can test :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WIP PR's that are not ready for review and are currently in progress
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants