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

Fix: Only create a Correspondent if the email matches rule filters #4431

Merged
merged 1 commit into from Oct 26, 2023

Conversation

stumpylog
Copy link
Member

Proposed change

I agree this isn't correct behavior or at the very least unexpected. This small fix makes it so Correspondents are only created if there is a message or attachment matching the filters, in addition to matching the IMAP criteria. So if a "From" or "Subject" matches, but the attachment filename doesn't, there will not be a Correspondent created early.

Fixes #4429

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Other (please explain):

Checklist:

  • I have read & agree with the contributing guidelines.
  • If applicable, I have included testing coverage for new code in this PR, for backend and / or front-end changes.
  • If applicable, I have tested my code for new features & regressions on both mobile & desktop devices, using the latest version of major browsers.
  • If applicable, I have checked that all tests pass, see documentation.
  • I have run all pre-commit hooks, see documentation.
  • I have made corresponding changes to the documentation as needed.
  • I have checked my modifications for any breaking changes.

@stumpylog stumpylog requested a review from a team as a code owner October 23, 2023 16:39
@paperless-ngx-secretary paperless-ngx-secretary bot added backend non-trivial Requires approval by several team members labels Oct 23, 2023
@github-actions github-actions bot added the bug Bug report or a Bug-fix label Oct 23, 2023
@codecov
Copy link

codecov bot commented Oct 23, 2023

Codecov Report

Merging #4431 (0d30b9e) into dev (cb271de) will decrease coverage by 0.01%.
The diff coverage is 85.71%.

@@            Coverage Diff             @@
##              dev    #4431      +/-   ##
==========================================
- Coverage   95.90%   95.89%   -0.01%     
==========================================
  Files         359      359              
  Lines       13709    13712       +3     
  Branches     1094     1094              
==========================================
+ Hits        13147    13149       +2     
- Misses        558      559       +1     
  Partials        4        4              
Flag Coverage Δ
backend 94.52% <85.71%> (-0.02%) ⬇️
frontend 97.50% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
src/paperless_mail/mail.py 88.25% <85.71%> (-0.21%) ⬇️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@shamoon shamoon left a comment

Choose a reason for hiding this comment

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

Great catch, thanks. I'll let you decide re coverage

@stumpylog stumpylog enabled auto-merge (squash) October 26, 2023 00:23
@stumpylog stumpylog merged commit dcc2cc5 into dev Oct 26, 2023
34 checks passed
@stumpylog stumpylog deleted the fix/4429-correspondents branch October 26, 2023 00:34
Copy link
Contributor

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new discussion or issue for related concerns.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend bug Bug report or a Bug-fix non-trivial Requires approval by several team members
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants