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

Some upgrade queries are improperly scoped #2467

Closed
asmecher opened this issue Apr 24, 2017 · 3 comments
Closed

Some upgrade queries are improperly scoped #2467

asmecher opened this issue Apr 24, 2017 · 3 comments
Assignees
Milestone

Comments

@asmecher
Copy link
Member

asmecher commented Apr 24, 2017

The upgrade code contains, within the "for each journal" loop:

$userGroupDao->update('UPDATE review_assignments SET stage_id = ?', array(WORKFLOW_STAGE_ID_EXTERNAL_REVIEW));

This needs to execute once per install, not once per journal.

Later, it contains:

$userGroupDao->update('UPDATE authors SET user_group_id = ?', array((int) $group->getId()));

This should be per-journal, but executes on the whole site dataset for every journal, resulting in authors referring to groups in other journals.

@asmecher asmecher added this to the OJS 3.1 milestone Apr 24, 2017
@asmecher asmecher self-assigned this Apr 24, 2017
asmecher added a commit to asmecher/ojs that referenced this issue Apr 24, 2017
@asmecher
Copy link
Member Author

PR: pkp/ojs#1364
@bozana, would you mind having a look?

@bozana
Copy link
Collaborator

bozana commented Apr 24, 2017

@asmecher, yes, that looks good :-) Thus, when tests pass it can be merged... :-)

asmecher added a commit to pkp/ojs that referenced this issue Apr 24, 2017
pkp/pkp-lib#2467 Fix author group IDs on upgraded content
@asmecher
Copy link
Member Author

Thanks! Merged into ojs-stable-3_0_2 and cherry-picked to master.

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

No branches or pull requests

2 participants