From 526623934156effdb12574ac4cfa1a9f2ca00fb8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 30 Oct 2020 07:47:25 +1100 Subject: [PATCH 1/3] Fix for nullability on assigned_user_id --- ...29_204434_tasks_table_project_nullable.php | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 database/migrations/2020_10_29_204434_tasks_table_project_nullable.php diff --git a/database/migrations/2020_10_29_204434_tasks_table_project_nullable.php b/database/migrations/2020_10_29_204434_tasks_table_project_nullable.php new file mode 100644 index 000000000000..516c71735907 --- /dev/null +++ b/database/migrations/2020_10_29_204434_tasks_table_project_nullable.php @@ -0,0 +1,32 @@ +unsignedInteger('assigned_user_id')->nullable()->change(); + + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + // + } +} From afa5f2338cf08a91bcaf90127a68a2a842650f9d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 30 Oct 2020 07:59:47 +1100 Subject: [PATCH 2/3] Fixes for account plan --- app/Jobs/Ninja/RefundCancelledAccount.php | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/app/Jobs/Ninja/RefundCancelledAccount.php b/app/Jobs/Ninja/RefundCancelledAccount.php index b57b57b266b1..9bc2e40ea74c 100644 --- a/app/Jobs/Ninja/RefundCancelledAccount.php +++ b/app/Jobs/Ninja/RefundCancelledAccount.php @@ -41,15 +41,17 @@ class RefundCancelledAccount implements ShouldQueue $plan_details = $this->account->getPlanDetails(); - /* Trial user cancelling early.... */ - if ($plan_details['trial_active']) { + if(!$plan_details) return; - } - /* Is the plan Active? */ - if (! $plan_details['active']) { + /* Trial user cancelling early.... */ + if ($plan_details['trial_plan']) return; - } + + /* Is the plan Active? */ + if (! $plan_details['active']) + return; + /* Refundable client! */ From ba6c45c08a3a44b5a61af20cdf885437551b3dc8 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 30 Oct 2020 08:00:35 +1100 Subject: [PATCH 3/3] fix task status id on update --- app/Http/Requests/Task/UpdateTaskRequest.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Http/Requests/Task/UpdateTaskRequest.php b/app/Http/Requests/Task/UpdateTaskRequest.php index 902e51a60c82..e51e4c692f27 100644 --- a/app/Http/Requests/Task/UpdateTaskRequest.php +++ b/app/Http/Requests/Task/UpdateTaskRequest.php @@ -50,6 +50,10 @@ class UpdateTaskRequest extends Request { $input = $this->decodePrimaryKeys($this->all()); + if (array_key_exists('status_id', $input) && is_string($input['status_id'])) { + $input['status_id'] = $this->decodePrimaryKey($input['status_id']); + } + $this->replace($input); } }