-
Notifications
You must be signed in to change notification settings - Fork 451
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
import Native xml, restrict review stages #10697
base: main
Are you sure you want to change the base?
Conversation
882c6ca
to
10177c8
Compare
10177c8
to
a06dfdd
Compare
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.
Hi @withanage,
I think it would be better to implement it in the appropriate filter, i.e. in NatvieXmlSubmissionFilter, in the function handleElement():
The new code is only for submissions, on submission level. You do check it in the function addReviewStage, but I believe it is cleaner and better/easier to read it all in the NativeXmlSubmissionFilter, because a developer would look at the code for submission import there and would not know/have in mind that something is also happening here.
Also, I am not 100% sure, but could it be that $this->processResult could contain multiple submissions? You are considering only one in the function addReviewStage: $submission = $this->processResult[0];
.
Thanks a lot!
a06dfdd
to
94cef1a
Compare
Thanls a lot @bozana , I changed the implementation according to your suggestion and pushed.
I think this use-case does not arise, when we handle it in the filter. |
plugins/importexport/native/filter/NativeXmlSubmissionFilter.php
Outdated
Show resolved
Hide resolved
plugins/importexport/native/filter/NativeXmlSubmissionFilter.php
Outdated
Show resolved
Hide resolved
Hi @withanage, thanks a lot! |
Hi @withanage, great! All good! Thanks a lot! |
Issue