diff --git a/app/Http/Controllers/Api/StatuslabelsController.php b/app/Http/Controllers/Api/StatuslabelsController.php index 7e4851ff5..b3503ff15 100644 --- a/app/Http/Controllers/Api/StatuslabelsController.php +++ b/app/Http/Controllers/Api/StatuslabelsController.php @@ -290,10 +290,12 @@ class StatuslabelsController extends Controller /** * Returns a boolean response based on whether the status label - * is one that is deployable. + * is one that is deployable or pending. * * This is used by the hardware create/edit view to determine whether - * we should provide a dropdown of users for them to check the asset out to. + * we should provide a dropdown of users for them to check the asset out to, + * and whether we show a warning that the asset will be checked in if it's already + * assigned but the status is changed to one that isn't pending or deployable * * @author [A. Gianotto] [] * @since [v4.0] @@ -301,7 +303,7 @@ class StatuslabelsController extends Controller public function checkIfDeployable($id) : string { $statuslabel = Statuslabel::findOrFail($id); - if ($statuslabel->getStatuslabelType() == 'deployable') { + if (($statuslabel->getStatuslabelType() == 'pending') || ($statuslabel->getStatuslabelType() == 'deployable')) { return '1'; } diff --git a/app/Http/Controllers/Assets/AssetsController.php b/app/Http/Controllers/Assets/AssetsController.php index f3b2de3e7..6bd530a0e 100755 --- a/app/Http/Controllers/Assets/AssetsController.php +++ b/app/Http/Controllers/Assets/AssetsController.php @@ -340,15 +340,14 @@ class AssetsController extends Controller $status = Statuslabel::find($request->input('status_id')); - // This is a non-deployable status label - we should check the asset back in. - if (($status && $status->getStatuslabelType() != 'deployable') && ($target = $asset->assignedTo)) { - + // This is an archived or undeployable - we should check the asset back in. + // Pending is allowed here + if (($status) && (($status->getStatuslabelType() != 'pending') && ($status->getStatuslabelType() != 'deployable')) && ($target = $asset->assignedTo)) { $originalValues = $asset->getRawOriginal(); $asset->assigned_to = null; $asset->assigned_type = null; $asset->accepted = null; - - event(new CheckoutableCheckedIn($asset, $target, auth()->user(), 'Checkin on asset update', date('Y-m-d H:i:s'), $originalValues)); + event(new CheckoutableCheckedIn($asset, $target, auth()->user(), 'Checkin on asset update with '.$status->getStatuslabelType().' status', date('Y-m-d H:i:s'), $originalValues)); } if ($asset->assigned_to == '') { diff --git a/config/version.php b/config/version.php index 638c43768..87bd684e8 100644 --- a/config/version.php +++ b/config/version.php @@ -1,10 +1,10 @@ 'v8.0.1', - 'full_app_version' => 'v8.0.1 - build 16992-g18c7cbbbb', - 'build_version' => '16992', + 'app_version' => 'v8.0.2', + 'full_app_version' => 'v8.0.2 - build 17048-g44dd06161', + 'build_version' => '17048', 'prerelease_version' => '', - 'hash_version' => 'g18c7cbbbb', - 'full_hash' => 'v8.0.1-28-g18c7cbbbb', + 'hash_version' => 'g44dd06161', + 'full_hash' => 'v8.0.2-54-g44dd06161', 'branch' => 'master', ); \ No newline at end of file diff --git a/resources/lang/en-US/admin/hardware/form.php b/resources/lang/en-US/admin/hardware/form.php index e50a32bd0..fab19fea1 100644 --- a/resources/lang/en-US/admin/hardware/form.php +++ b/resources/lang/en-US/admin/hardware/form.php @@ -56,7 +56,7 @@ return [ 'asset_location_update_actual' => 'Update only actual location', 'asset_not_deployable' => 'That asset status is not deployable. This asset cannot be checked out.', 'asset_not_deployable_checkin' => 'That asset status is not deployable. Using this status label will checkin the asset.', - 'asset_deployable' => 'That status is deployable. This asset can be checked out.', + 'asset_deployable' => 'This asset can be checked out.', 'processing_spinner' => 'Processing... (This might take a bit of time on large files)', 'optional_infos' => 'Optional Information', 'order_details' => 'Order Related Information', diff --git a/resources/views/reports/custom.blade.php b/resources/views/reports/custom.blade.php index e7802651b..b1eb55bb3 100644 --- a/resources/views/reports/custom.blade.php +++ b/resources/views/reports/custom.blade.php @@ -93,152 +93,152 @@ @@ -248,64 +248,64 @@

{{ trans('general.checked_out_to_fields') }}:

@@ -318,7 +318,7 @@ @foreach ($customfields as $customfield) @@ -549,13 +549,13 @@