Hi,
after upgrading to from OJS 3.3 to OJS 3.4 we noticed that the maxSequence calculation in the for loop always uses the current publication instead of the publication of the submissions it is iterating over:
if (count($otherSubmissionsInSection)) {
$maxSequence = 0;
foreach ($otherSubmissionsInSection as $submission) {
if ($publication->getData('seq')) {
$maxSequence = max($maxSequence, $publication->getData('seq'));
}
}
$publication->setData('seq', $maxSequence + 1);
}
Repo::publication()->publish($publication);
}
Instead it should be (I guess):
if (count($otherSubmissionsInSection)) {
$maxSequence = 0;
foreach ($otherSubmissionsInSection as $submission) {
if ($submission->getCurrentPublication()->getData('seq')) {
$maxSequence = max($maxSequence, $submission->getCurrentPublication()->getData('seq'));
}
}
$publication->setData('seq', $maxSequence + 1);
}
Compare to OJS 3.3:
if (count($otherSubmissionsInSection)) {
$maxSequence = 0;
foreach ($otherSubmissionsInSection as $submission) {
if ($submission->getCurrentPublication()->getData('seq')) {
$maxSequence = max($maxSequence, $submission->getCurrentPublication()->getData('seq'));
}
}
$publication->setData('seq', $maxSequence + 1);
}
Hi,
after upgrading to from OJS 3.3 to OJS 3.4 we noticed that the maxSequence calculation in the for loop always uses the current publication instead of the publication of the submissions it is iterating over:
Instead it should be (I guess):
Compare to OJS 3.3: