-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Enhancement: support workflow path matching of barcode-split documents #10723
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
base: dev
Are you sure you want to change the base?
Enhancement: support workflow path matching of barcode-split documents #10723
Conversation
Hello @DerRockWolf, Thank you very much for submitting this PR to us! This is what will happen next:
You'll be hearing from us soon, and thank you again for contributing to our project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea, please drop the rename commit
593c5b9
to
bdcfa8d
Compare
done ✅ |
bdcfa8d
to
17dbb20
Compare
Formatting is now also fixed. It was included in the dropped commit 😅 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This LGTM but I'll hold off on merging until our main backend dev has a chance to take a look.
(does need a rebase) |
Head branch was pushed to by a user without write access
17dbb20
to
973d4b9
Compare
Thanks for your time 🙂 Rebase is also done. What I have now also noticed, is that this doesn't solve it for people using I'm not yet 100% sure how the solution could look like, but I'm going to further hack around and will open another PR for the "subdirs as tags" case. |
…sing original consumption path
6bdd576
to
06851e9
Compare
Proposed change
Closes #10709
This change introduces a new optional field in the
ConsumableDocument
class:original_path
. It can be used to add the actual original document path for later use. In this change theoriginal_path
is used for matching the document path in workflows.Previously documents split by barcode wouldn't match workflows that were using a filter path in the trigger.
Now, if a
ConsumableDocument
hasoriginal_path
set, the workflow match logic will use it instead of thepath
where the document is currently (at the time of matching) located. The current path, for split documents, is a temporary directory without the sub directories of the consume folder.I've also renamed theoriginal_file
field ofConsumableDocument
topath
as it more clearly communicates what this field is used to. If you don't like it, feel free to just drop the commit.This can be tested with any workflow that assigns metadata to consumed documents based on the consumption path:
test
) in the consume directory*/test/*
/consume/test/
Previously these workflow triggers didn't match for PDFs with PATCHT barcodes as the split PDFs are copied to a temporary directory and therefore didn't retain any information about the original consumption path.
Type of change
Checklist:
pre-commit
hooks, see documentation.