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

Enhancement: only include correspondent 'last_correspondence' if requested #6792

Merged
merged 6 commits into from
May 22, 2024

Conversation

shamoon
Copy link
Member

@shamoon shamoon commented May 20, 2024

Proposed change

After reading the linked issues, I wondered if the annotation query to pull out 'last_correspondence' is unnecessarily slowing things down. Im not really sure how to test other than asking the users (at least one seems briefly to confirm so far) but I think this would still be an improvement for all users (e.g. faster) and we only use last_correspondence in one place currently (I think), in the list of correspondents, in which case the records are paginated already.

I suppose there's the question of whether this qualifies as a breaking change as getting the value in a list of correspondents would now require passing last_correspondence=true. As always welcome any thoughts in general or of course if I'm missing anything.

Note: the changes to document-detail here are just a side-effect of this, we previously used the presence of last_correspondence on an object to check what type it was, but didnt actually use it there. That is significantly cleaner now anyway.

Closes #6782 (and perhaps relevant to #4872?)

Type of change

  • Bug fix: non-breaking change which fixes an issue.
  • New feature / Enhancement: non-breaking change which adds functionality. Please read the important note above.
  • Breaking change: fix or feature that would cause existing functionality to not work as expected.
  • Documentation only.
  • 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.

@shamoon shamoon requested review from a team as code owners May 20, 2024 19:42
@paperless-ngx-secretary paperless-ngx-secretary bot added backend frontend non-trivial Requires approval by several team members labels May 20, 2024
@github-actions github-actions bot added the enhancement New feature label May 20, 2024
Copy link

codecov bot commented May 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 97.21%. Comparing base (3e62f13) to head (f6b08d5).
Report is 1 commits behind head on dev.

Current head f6b08d5 differs from pull request most recent head ed056dc

Please upload reports for the commit ed056dc to get more accurate results.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #6792   +/-   ##
=======================================
  Coverage   97.21%   97.21%           
=======================================
  Files         438      438           
  Lines       18069    18087   +18     
  Branches     1518     1532   +14     
=======================================
+ Hits        17565    17583   +18     
+ Misses        504      501    -3     
- Partials        0        3    +3     
Flag Coverage Δ
backend 95.90% <100.00%> (+<0.01%) ⬆️
frontend 98.64% <100.00%> (+<0.01%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@shamoon shamoon added this to the Next Release milestone May 20, 2024
@shamoon shamoon enabled auto-merge (squash) May 20, 2024 22:01
@shamoon shamoon disabled auto-merge May 20, 2024 22:01
@shamoon shamoon enabled auto-merge (squash) May 20, 2024 22:01
@shamoon shamoon changed the title Enhancement: only include correspondent last_correspondence if requested Enhancement: only include correspondent 'last_correspondence' if requested May 20, 2024
Copy link
Member

@stumpylog stumpylog left a comment

Choose a reason for hiding this comment

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

I guess it's kind of breaking, but seems pretty minor

@shamoon shamoon merged commit 8abb0cd into dev May 22, 2024
25 checks passed
@shamoon shamoon deleted the feature-no-last-correspondence branch May 22, 2024 23:15
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. See our contributing guidelines for more details.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 22, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backend enhancement New feature frontend non-trivial Requires approval by several team members
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants