add a random sequence number deviation

This commit is contained in:
Uwe Steinmann 2022-11-11 10:42:28 +01:00
parent 28f78baed0
commit 28c2670504

View File

@ -819,10 +819,11 @@ switch($command) {
$controller->setParam('filetype', $fileType);
$controller->setParam('userfiletype', $userfiletype);
$minmax = $folder->getDocumentsMinMax();
$deviation = rand(10, 1000)/10;
if($settings->_defaultDocPosition == 'start')
$controller->setParam('sequence', $minmax['min'] - 1);
$controller->setParam('sequence', $minmax['min'] - $deviation);
else
$controller->setParam('sequence', $minmax['max'] + 1);
$controller->setParam('sequence', $minmax['max'] + $deviation);
$controller->setParam('reviewers', $reviewers);
$controller->setParam('approvers', $approvers);
$controller->setParam('reqversion', 1);