Skip to content

FOUR-24887: UI: the progress Bar needs work when the stages are the defaults #8365

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

Open
wants to merge 1 commit into
base: epic/FOUR-22605
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions ProcessMaker/Repositories/CaseParticipatedRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ private function mapCaseToArray(CaseStarted $case, int $userId = null): array
// Define the case status if is not set the stage
if (is_null($case->last_stage_id)) {
$case->last_stage_name = $case->case_status;
$case->progress = 50;
}
$data = [
'case_number' => $case->case_number,
Expand Down
2 changes: 2 additions & 0 deletions ProcessMaker/Repositories/CaseRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ public function create(ExecutionInstanceInterface $instance): void
// Check the case status
if (is_null($instance->last_stage_id)) {
$instance->last_stage_name = $instance->case_status;
$instance->progress = 50;
}

CaseStarted::create([
Expand Down Expand Up @@ -145,6 +146,7 @@ public function updateStatus(ExecutionInstanceInterface $instance): void
if (in_array($caseStatus, [CaseStatusConstants::COMPLETED, CaseStatusConstants::CANCELED])) {
$data['completed_at'] = $instance->completed_at;
$data['last_stage_name'] = $caseStatus;
$data['progress'] = 100;
}

// Update the case started and case participated
Expand Down
Loading