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

pkp/pkp-lib#5122 Facilitate the use of Iterators in service classes #2491

Merged
merged 8 commits into from
Oct 10, 2019

Conversation

asmecher
Copy link
Member

@asmecher asmecher commented Oct 3, 2019

No description provided.

foreach ($submissions as $submission) {
if ($submission->getSubmissionProgress() == 0) { // Not incomplete
$this->submissionMetadataChanged($submission);
$this->submissionFilesChanged($submission);
Copy link
Contributor

Choose a reason for hiding this comment

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

Not sure, but should this only include published submissions? If so, you can add a status property to the getMany call:

Services::get('submission')->getMany(['contextId' => $journal->getId(), 'status' => STATUS_PUBLISHED]);

Copy link
Member Author

Choose a reason for hiding this comment

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

Depends on our indexing strategy -- there's value in indexing unpublished content if we don't re-index fully on publication, which may be the case. This needs an audit/clean-up -- I'll do a small assessment as part of this issue and invariably leave some for pkp/pkp-lib#3180 as well.

$templateMgr = TemplateManager::getManager($request);
if ($this->_articleGalley) $templateMgr->assign(array(
'representationId' => $this->_articleGalley->getId(),
'articleGalley' => $this->_articleGalley,
'articleGalleyFile' => $this->_articleGalley->getFile(),
));
$journal = $request->getJournal();
Copy link
Contributor

Choose a reason for hiding this comment

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

$context = $request->getContext(); :)

Copy link
Member Author

Choose a reason for hiding this comment

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

Just juggling already-existing code, but yes, fixed!

package.json Outdated
"less-loader": "^4.1.0",
"lint-staged": "^8.1.6",
"lint-staged": "^8.2.1",
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a lot of version bumps here. Usually when I run an update like this, I do some manual checking to try to identify any regressions... We also need to keep the versions here in sync with the version in the UI Library.

So I'd suggest either not including these changes in a commit (I'm happy to run an update whenever if you'd like) or making sure that the same changes happen in UI Library and doing some testing on it...

Copy link
Member Author

Choose a reason for hiding this comment

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

OK, happy to remove these!

@asmecher asmecher force-pushed the 5122-fix branch 2 times, most recently from 08acb5a to 4a45120 Compare October 3, 2019 15:10
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