@@ -8,6 +8,7 @@
Loading
8 8
use SilverStripe\Core\Manifest\ModuleLoader;
9 9
use SilverStripe\Forms\Form;
10 10
use SilverStripe\Forms\GridField\GridFieldDetailForm_ItemRequest;
11 +
use SilverStripe\ORM\DataList;
11 12
use SilverStripe\ORM\DataObject;
12 13
use SilverStripe\Security\Permission;
13 14
use SilverStripe\View\Requirements;
@@ -66,6 +67,12 @@
Loading
66 67
        $service = singleton(WorkflowService::class);
67 68
        /** @var DataObject|WorkflowApplicable $record */
68 69
        $record = $form->getRecord();
70 +
        if ($record && $record->ID) {
71 +
            $reload = DataList::create(get_class($record))->byID($record->ID);
72 +
            if ($reload->LastEdited > $record->LastEdited) {
73 +
                $form->loadDataFrom($reload, Form::MERGE_DEFAULT);
74 +
            }
75 +
        }
69 76
        $active = $service->getWorkflowFor($record);
70 77
71 78
        if ($active) {
Files Complexity Coverage
src 873 21.99%
Project Totals (35 files) 873 21.99%
651.2
7.1=.1
TRAVIS_OS_NAME=linux
1
comment: false
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading