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

import Native xml, restrict review stages #10697

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

withanage
Copy link
Member

@withanage withanage commented Dec 12, 2024

Copy link
Collaborator

@bozana bozana left a 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!

@withanage
Copy link
Member Author

withanage commented Jan 18, 2025

Thanls a lot @bozana , I changed the implementation according to your suggestion and pushed.

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

I think this use-case does not arise, when we handle it in the filter.

@bozana
Copy link
Collaborator

bozana commented Jan 18, 2025

Hi @withanage, thanks a lot!
I think one change is still needed: the review round parameter is missing. Else, just cosmetic comments... :-)
Thanks a lot!

@withanage
Copy link
Member Author

withanage commented Jan 19, 2025

@bozana thanks for the review, I updated a revised commit

@bozana
Copy link
Collaborator

bozana commented Jan 19, 2025

Hi @withanage, great! All good! Thanks a lot!
Would you maybe like to enable the test it('Imports submissions from XML', function() { in NativeXmlImportExportSubmission.cy.js in a PR for OJS, OMP and OPS, and also add this submodule update, so that we see if the test passes then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants