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

dev/core#1270 - fix email processor dropping attachments - ALTERNATE #15438

Merged

Conversation

demeritcowboy
Copy link
Contributor

@demeritcowboy demeritcowboy commented Oct 8, 2019

Overview

This is an alternate to #15344

https://lab.civicrm.org/dev/core/issues/1270

The email processor will drop attachments if there's more in the incoming email than the limit set at system settings - misc. The setting is intended for activity creation in the UI, but shouldn't cause the email processor to drop attachments.

Before

Some attachments can be lost.

After

It files and keeps all the attachments.

Technical Details

Adds a new admin setting for non-UI processes parallel to the existing max_attachments setting which is then only used for UI processes.

Comments

Unfortunately the existing max_attachments setting seems to be in limboland where it currently has a hack, so to add the new setting I copied that. I'm not sure that's desired.

@pfigel

@civibot civibot bot added the master label Oct 8, 2019
@civibot
Copy link

civibot bot commented Oct 8, 2019

(Standard links)

@demeritcowboy
Copy link
Contributor Author

Hmm, regarding test failure looks like I might have used something php 7.2-ish. Remembering now that tests run on 7.0. Fixing...

@demeritcowboy demeritcowboy force-pushed the emailprocessor-still-hungry-alt branch from 3674f77 to 8913e91 Compare October 8, 2019 02:54
Copy link
Contributor

@pfigel pfigel left a comment

Choose a reason for hiding this comment

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

Thanks @demeritcowboy, this LGTM! I'm not sure if I can make an educated judgment on the setting hack, but I'd be okay with it, so leaving that to the merger 😁.

For more details on the rationale behind adding a new setting, see the discussion starting here.

  • General standards
    • (r-explain) PASS: Explains the rationale behind why a new setting is needed/preferred.
    • (r-user) PASS: User would expect attachments not to be dropped.
    • (r-doc) PASS: New setting is sufficiently described, old setting has been amended to make the difference clear.
    • (r-run) PASS: I've verified that:
      • The bug is fixed (i.e. up to 100 attachments are created)
      • The setting form works
      • Attachment limits aren't affected in the UI
  • Developer standards
    • (r-tech) PASS:
    • (r-code) PASS-ISH: I'm uncertain about the setting hack, but wouldn't be opposed to merging as I don't see a trivial alternative and it doesn't really make things worse.
    • (r-maint) PASS: Adds tests
    • (r-test) PASS

@seamuslee001
Copy link
Contributor

Makes sense to me merging

@seamuslee001 seamuslee001 merged commit 55a6d94 into civicrm:master Oct 8, 2019
@demeritcowboy
Copy link
Contributor Author

Thanks! @pfigel @seamuslee001

@demeritcowboy demeritcowboy deleted the emailprocessor-still-hungry-alt branch October 8, 2019 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants