Skip to content
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

Fix - warn user on changing status to undeployable when editing #15492

Merged
merged 4 commits into from
Sep 12, 2024

Conversation

snipe
Copy link
Owner

@snipe snipe commented Sep 11, 2024

A customer in the helpdesk and a few users in MacAdmins pointed out that we were not logging the checkin (or even the status change) if an asset is checked out and an admin changes the status to an undeployable status type. In the code, we were silently checking it in but we were NOT triggering a checkin event, and the edit didn't even show up in the history log:

Before

Snipe_Archived_Behaviour.mp4

After

Screen.Recording.2024-09-11.at.5.33.49.PM.mov

Big thanks for Dan Christovic and Guy for pointing out this bug.

Copy link

what-the-diff bot commented Sep 11, 2024

PR Summary

  • Integration of CheckoutableCheckedIn Event in AssetsController
    An event named CheckoutableCheckedIn got integrated into the AssetsController.php. This is paramount when an item is returned or "checked in" in our system, which helps the application react accordingly.

  • Addition of new Translation String
    A new string 'asset_not_deployable_checkin' has been added to the form.php file. This allows for more descriptive and clear communication to the user if an asset is not deployable upon checking in.

  • Updated Warning Display in edit.blade.php
    The logic in the edit.blade.php file got updated to show different warning messages based on the state of the asset. This results in more accurate notifications to the users.

  • New Test Cases for Asset Editing
    Added new test cases to EditAssetTest.php. These tests validate permissions and newly added check-in logging functionality especially when an asset state changes to undeployable, ensuring the system behaves as intended when these changes occur.

@snipe snipe changed the title Fixes - warn user on changing status to undeployable when editing Fix - warn user on changing status to undeployable when editing Sep 11, 2024
@snipe snipe merged commit 8774da3 into develop Sep 12, 2024
9 checks passed
@snipe snipe deleted the fixes/edit_to_archived_warning branch September 12, 2024 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant