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

ignore site for submissions with same batchUid (WP-874) #518

Merged
merged 1 commit into from
Mar 4, 2024

Conversation

vsolovei-smartling
Copy link
Contributor

No description provided.

if ($activeProfileCount !== 1) {
$this->getLogger()->notice("Active profile count=$activeProfileCount while processing upload of submission");
}
$params[SubmissionEntity::FIELD_TARGET_BLOG_ID] = $this->getSettingsManager()
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't understand how it worked before and now. You add the filter by target locale, as result you automatically exclude all other locales. So the code below will not work as expected

            /**
             * Looking for other locales to pass filters and create placeholders.
             */
            $submissions = $this->getSubmissionManager()->find($params);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Before, this always took a single applicable profile and added a filter based on the profile's target blogs.
My assumption is that when multiple active profiles are present for a source blog, the plugin might take one that doesn't have all target blogs, so after the change, I expect source blog filter to be applied only if the profile is the only applicable profile. I've added a test in #519

Copy link
Contributor

Choose a reason for hiding this comment

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

Ok, I even didn't think about such case.
But even if we assume that the client has a single profile, I still suspect we will do multiple uploads.

@vsolovei-smartling vsolovei-smartling merged commit 42a374d into master Mar 4, 2024
@vsolovei-smartling vsolovei-smartling deleted the WP-874-group-submissions-upload branch March 4, 2024 05:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants