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

Feature: Preserve original filename in metadata #1440

Merged
merged 5 commits into from Aug 22, 2022
Merged

Feature: Preserve original filename in metadata #1440

merged 5 commits into from Aug 22, 2022

Conversation

GwynHannay
Copy link
Contributor

Proposed change

This change adds a metadata field to capture the original filename of the document being uploaded. For some, there can be important information in the original filename not captured within the document, so it is important to preserve this information.

Right now this field will only be displayed in the admin UI.

Screen Shot 2022-08-21 at 4 03 38 am

Fixes #874

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 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.

@GwynHannay GwynHannay requested review from a team as code owners August 20, 2022 20:12
@paperless-ngx-secretary paperless-ngx-secretary bot added backend frontend non-trivial Requires approval by several team members labels Aug 20, 2022
@paperless-ngx-secretary
Copy link

Hello @GwynHannay,

thank you very much for submitting this PR to us!

This is what will happen next:

  1. My robotic colleagues will check your changes to see if they break anything. You can see the progress below.
  2. Once that is finished, human contributors from paperless-ngx review your changes. Since this is a non-trivial change, a review from at least two contributors is required.
  3. Please improve anything that comes up during the review until your pull request gets approved.
  4. Your pull request will be merged into the dev branch. Changes there will be tested further.
  5. Eventually, changes from you and other contributors will be merged into main and a new release will be made.

Please allow up to 7 days for an initial review. We're all very excited about new pull requests but we only do this as a hobby.
If any action will be required by you, please reply within a month.

@stumpylog stumpylog added the enhancement New feature label Aug 20, 2022
@stumpylog
Copy link
Member

If you don't mind, I'd like to cherry pick your commits a bit to clean up the history. It will mean you'll need to do a fetch and reset to instead of pull though. Let me know if that's a problem.

@GwynHannay
Copy link
Contributor Author

If you don't mind, I'd like to cherry pick your commits a bit to clean up the history. It will mean you'll need to do a fetch and reset to instead of pull though. Let me know if that's a problem.

Please feel free! :-)

@coveralls
Copy link

coveralls commented Aug 20, 2022

Pull Request Test Coverage Report for Build 2900289856

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 15 unchanged lines in 4 files lost coverage.
  • Overall coverage increased (+0.009%) to 91.871%

Files with Coverage Reduction New Missed Lines %
documents/admin.py 1 98.46%
documents/models.py 3 98.6%
documents/consumer.py 4 94.74%
documents/views.py 7 96.65%
Totals Coverage Status
Change from base Build 2895990682: 0.009%
Covered Lines: 4826
Relevant Lines: 5253

💛 - Coveralls

@stumpylog
Copy link
Member

The changes look good to me. I think it would be nice to extend this just a touch more for people though:

@shamoon
Copy link
Member

shamoon commented Aug 21, 2022

Agree its less useful if its not visible, I will add the frontend part

@shamoon
Copy link
Member

shamoon commented Aug 21, 2022

Screen Shot 2022-08-21 at 8 04 18 AM

All set for doc detail part =)

@GwynHannay
Copy link
Contributor Author

Awesome!! Thank you so much - I couldn't, for the life of me, work out how to add it to the front end, haha.

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 added the value to the post consume data as well. Looks good, thanks for the contribution

Copy link
Member

@qcasey qcasey left a comment

Choose a reason for hiding this comment

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

Thanks to all three of you

@shamoon shamoon merged commit 7844537 into paperless-ngx:dev Aug 22, 2022
@GwynHannay GwynHannay deleted the feature-orig-filename-metadata branch August 23, 2022 02:17
@github-actions
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 Apr 17, 2023
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
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

5 participants