Skip to content

Commit

Permalink
Merge pull request #38 from tattersoftware/travel-again
Browse files Browse the repository at this point in the history
Clear stage on travel
  • Loading branch information
MGatner committed Aug 6, 2021
2 parents 652cc64 + 5c62d98 commit d3ddd0d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Entities/Job.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ protected function _next($stages): ?Stage
{
// look through the stages
$stage = current($stages);

do
{
// Check if this is the current stage
Expand Down Expand Up @@ -355,7 +356,10 @@ public function travel(int $actionId, bool $checkRequired = true): array

// Update the Job
model(JobModel::class)->update($this->attributes['id'], ['stage_id' => $target->id]);

$this->attributes['stage_id'] = $target->id;
$this->stage = null;
$this->stageFlag = false;

return $results;
}
Expand Down

0 comments on commit d3ddd0d

Please sign in to comment.